Roxen.git / server / config_actions / proc.pike

version» Context lines:

Roxen.git/server/config_actions/proc.pike:1:   /* -  * $Id: proc.pike,v 1.7 1998/02/05 00:59:24 js Exp $ +  * $Id: proc.pike,v 1.8 1998/08/05 18:51:54 grubba Exp $    */      inherit "wizard";      constant name= "Status//Extended process status";   constant doc = "Shows detailed process status on Solaris 2.5 and 2.6.";      constant more=1;      void create()
Roxen.git/server/config_actions/proc.pike:88:   string cred(object id)   {    string r = "", s;    int uid, gid;    if(sscanf(proc("cred",id->variables->pid), "%*d:\te/r/suid=%d "    "e/r/sgid=%d\n\tgroups:%s\n", uid, gid, s) != 4)    return "-<br>";    array groups = ((s||"")/" ") - ({ "" });   #if constant(getgrgid)    for(int i = 0; i < sizeof(groups); i++) -  groups[i] = getgrgid((int)groups[i])[0]; +  groups[i] = (getgrgid((int)groups[i]) || ({ (string)groups[i] }))[0];    return sprintf("e/r/suid: %s<br>e/r/sgid: %s<br>groups: %O\n", -  getpwuid(uid)[0], getgrgid(gid)[0], +  (getpwuid(uid) || ({ (string)uid }))[0], +  (getgrgid(gid) || ({ (string)gid }))[0],    String.implode_nicely(groups));   #else    return sprintf("e/r/suid: %s<br>e/r/sgid: %d<br>groups: %O\n", -  getpwuid(uid)[0], gid, +  (getpwuid(uid) || ({ (string)uid }))[0], +  gid,    String.implode_nicely(groups));   #endif /* constant(getgrgid) */   }      mixed page_0(object id, object mc)   {    string map = proc("map -x",(int)id->variables->pid);    if(sscanf(map, "%*sShared%*s") != 2)    map = process_map(proc("map",(int)id->variables->pid));    else
Roxen.git/server/config_actions/proc.pike:121:    tree+    "</pre><font size=+1>Misc status for "+(id->variables->pid||getpid())    +"</font><pre>Memory Usage: "+map+"\n\nCredentials:<br>"+cred(id)+    "\nCurrent working directory: "+    ((proc("wdx",id->variables->pid)/":")[1..]*":")+   // "Stack: "+(proc("stack",id->variables->pid)/":")[1..]*":"+    "</pre>");   }      mixed handle(object id) { return wizard_for(id,0); } +