1997-02-13 02:35:06 +03:00
|
|
|
# $NetBSD: xps,v 1.2 1997/02/12 23:35:12 gwr Exp $
|
|
|
|
|
1997-02-13 01:09:45 +03:00
|
|
|
# xps
|
|
|
|
# kernel ps
|
|
|
|
#
|
|
|
|
# @(#)xps 8.3 (Berkeley) 8/22/94
|
|
|
|
|
|
|
|
define xps
|
|
|
|
|
|
|
|
set $i = 0
|
|
|
|
|
|
|
|
while ($i < 2)
|
|
|
|
|
|
|
|
if ($i == 0)
|
|
|
|
set $p = allproc.lh_first
|
|
|
|
end
|
|
|
|
if ($i == 1)
|
|
|
|
set $p = zombproc.lh_first
|
|
|
|
end
|
|
|
|
|
|
|
|
printf " proc pid flag st wchan comm\n"
|
|
|
|
while ($p)
|
|
|
|
printf "%#10x %5d %8x %2x %#10x %s", $p, $p->p_pid, \
|
|
|
|
$p->p_flag, $p->p_stat, $p->p_wchan, \
|
|
|
|
(char *) $p->p_comm
|
|
|
|
if ($p->p_wmesg)
|
|
|
|
printf " (%s)", $p->p_wmesg
|
|
|
|
end
|
|
|
|
printf "\n"
|
|
|
|
set $p = $p->p_list.le_next
|
|
|
|
end
|
|
|
|
set $i++
|
|
|
|
end
|
|
|
|
end
|