Implement /usr/proc/bin tools like Solaris has.
The prstat command is interesting, like top in batch mode.
+SCO has a pstat command.
Don't these really belong in the procps package?
killall pstree fuser lsof who
(they are maintained elsewhere, which causes version problems)
+OpenBSD has a pfind command.
+
Cache results of dev_to_tty.
---------------------- kernel -------------------------
The normal PID limit is 5 digits; it can go up to 10.
The normal CPU limit is 1 digit; it can go to 3 or 4.
+don't truncate long usernames
+
+have a --config option
+
---------------- ps for now, maybe move to libproc ------------------
With forest output and a tty named /dev/this_is_my_tty, the position
(related to RUID, EUID, tty, etc. -- but maybe ignore root power)
Add a nice display option for killing things.
-ruser,euser,ppid,pid,pmem,stime,args isn't too bad
+ruser,euser,ppid,pid,pmem,stime,args
+
+For RT stuff:
+pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
+
+For job control:
+stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
Make the column alignment algorithm support this:
FOO BAR
unsigned int *restrict running, unsigned int *restrict blocked,
unsigned int *restrict btime, unsigned int *restrict processes) {
static int fd;
+ unsigned long long llbuf = 0;
int need_vmstat_file = 0;
int need_proc_scan = 0;
const char* b;
else need_vmstat_file = 1;
b = strstr(buff, "intr ");
- if(b) sscanf(b, "intr %u", intr);
+ if(b) sscanf(b, "intr %Lu", &llbuf);
+ *intr = llbuf;
b = strstr(buff, "ctxt ");
- if(b) sscanf(b, "ctxt %u", ctxt);
+ if(b) sscanf(b, "ctxt %Lu", &llbuf);
+ *ctxt = llbuf;
b = strstr(buff, "btime ");
if(b) sscanf(b, "btime %u", btime);