Update of /cvsroot/ssic-linux/openssi/procps/proc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9934/procps/proc
Modified Files:
Tag: OPENSSI-RH
readproc.c readproc.h
Log Message:
SSI specific options to ps :
*) --shownode displays the node column to ps
*) --node option displays only processes on that node
Index: readproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/procps/proc/readproc.c,v
retrieving revision 1.1.3.1.2.1
retrieving revision 1.1.3.1.2.2
diff -C2 -d -r1.1.3.1.2.1 -r1.1.3.1.2.2
*** readproc.c 21 Jan 2004 23:32:45 -0000 1.1.3.1.2.1
--- readproc.c 28 Jan 2004 10:25:09 -0000 1.1.3.1.2.2
***************
*** 156,159 ****
--- 156,170 ----
}
+ /*
+ * OpenSSI : This routine fills the proc_t->enode field
+ */
+ static void where2proc (char* S, proc_t* P) {
+
+ /*
+ * Read the node num into the proc_t structure
+ */
+ sscanf (S, "%d", &P->enode);
+ }
+
/* stat2proc() makes sure it can handle arbitrary executable file basenames
for `cmd', i.e. those with embedded whitespace or embedded ')'s. Such
names
***************
*** 510,513 ****
--- 521,533 ----
}
/* }*/
+
+ /*** OpenSSI: : Read the /proc/#/where file ***/
+ if ((file2str(path, "where", sbuf, sizeof sbuf)) != -1 )
+ where2proc(sbuf, p);
+ else
+ p->enode = -1;
+
+ /*** End: OpenSSI : Read the /proc/#/where file ***/
+
/* some number->text resolving which is time consuming */
Index: readproc.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/procps/proc/readproc.h,v
retrieving revision 1.1.3.1.2.1
retrieving revision 1.1.3.1.2.2
diff -C2 -d -r1.1.3.1.2.1 -r1.1.3.1.2.2
*** readproc.h 21 Jan 2004 23:32:45 -0000 1.1.3.1.2.1
--- readproc.h 28 Jan 2004 10:25:10 -0000 1.1.3.1.2.2
***************
*** 119,123 ****
tpgid, /* terminal process group id */
tgid, /* thread group id */
! thread; /* is this a member of a thread group? */
unsigned int
pcpu; /* %CPU usage (is not filled in by readproc!!!)
*/
--- 119,124 ----
tpgid, /* terminal process group id */
tgid, /* thread group id */
! thread, /* is this a member of a thread group? */
! enode; /* OpenSSI : Execution node on which the
process is executing */
unsigned int
pcpu; /* %CPU usage (is not filled in by readproc!!!)
*/
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
|