Want ps with symbolic wait channel info
Dave Yost
day at kovacs.UUCP
Thu Jun 6 05:44:01 AEST 1985
Many years ago at Usenix in Austin, Texas (wadda time!)
the now-famous George Goble of Purdue showed a film of
a continuous ps display running on a sattelite
processor which peeked into the /dev/mem of its planet.
One wonderful little feature of this was that the wait
channel was listed symbolically. Oh, such a useful
feature! I put that capability into the Fortune ps and
kernel a couple of years ago. Has anyone done it for
4.2, and would they please tell me about it and send it
to Berkeley? Thanks.
It's also nice to be able to get valid information no
matter where the vmunix you booted from is. You just
put pointers to everything in nailed-down places in
kernel memory and have ps, pstat, vmstat, etc. look
there instead of in the symbol table of /vmunix.
A Fortune ps looks like this:
% ps alx
FLAGS S UID PID PPID CPU PRI NICE SZ WCHAN TTY TIME CMD
KC S 0 0 0 211 0 20 2 runout ? 534:53 swapper
C S 0 1 0 0 30 20 8 (wait) ? 0:11 /etc/init
C S 0 894 1 0 40 20 23 (pause) ? 0:01 /etc/cron
C S 101 904 1 18 30 20 52 (wait) co 0:21 -csh
C S 0 907 1 0 25 20 8 tty6,2+56 ? 0:00 /etc/init
C S 0 961 1 0 29 20 15 tty6,0+28 02 0:00 - n
C S 101 985 1 3 30 20 43 (wait) 01 0:22 -csh
C R 0 994 985 36 51 20 20 01 0:01 ps alx
C S 101 995 904 15 21 20 45 buf[3] co 0:00 cat /etc/termcap
While we're at it, check these out:
% vmstat -c
--Procs- Traps/sec -----%Cpu----- ---Int priority-- Non-int priority
RQ DW SW INT SYS CSW US NI SY IN ID 5 4 3 2 1 0 5 4 3 2 1 0
1 1 0 0 0 0 2 0 2 0 96 0 0 0 0 0 0 0 0 0 0 0100
And would you believe pstat -u takes a pid instead of a upage address?
% pstat -u 985
upage: in core
command="csh" uid=101 gid=0 ruid=101 rgid=0 segflg=0 error=0
base=2106308 count=900 offset=6555
cdir=fd0a4 dbuf="day" dirp=0 dent=3707, "day" pdir=0
dseg 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 fc8d4 fc8d4 fc8d4 fc8d4 fc8d4
args 7ffe2c 0 391 0 0
sigs 0 0 1 1 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0
tsize=75 dsize=24 ssize=17
utime=19 stime=4 cutime=2 cstime=8
ar0=dfffb0
intflg=0
ttyp=e3af2 ttydev=1,1
rsav dff800 0 2000 7f 3e 2000 10c8 dff84a
7ffdf0 ff7c8 dfff3c dfff1c 6cba
ssav 0 1 0 2b 102 b4 ff7c8 ff834
ff7c8 ff834 dfff6c dfff48 6f3a
qsav ffff 2 fc58 7f 106 2 dffa08 16c48
7ffdf0 dff839 dfffa8 dfff8c a678
% pstat -C
Total Memory = 1024K bytes
Slot A contains Crt, Version 1.1
Slot B contains a board with no ROMs
Slot E contains Hard boot, Version 1.1
--Dave Yost
More information about the Comp.unix.wizards
mailing list