24 lines
436 B
Plaintext
24 lines
436 B
Plaintext
# $NetBSD: procs,v 1.1 2008/02/20 20:56:35 ad Exp $
|
|
|
|
define procs
|
|
set $i = 0
|
|
|
|
while ($i < 2)
|
|
if ($i == 0)
|
|
set $p = allproc.lh_first
|
|
end
|
|
if ($p)
|
|
printf " proc pid flag stat nlwps comm\n"
|
|
end
|
|
while ($p)
|
|
printf "%16lx %5d %8x %4x %5d %s", \
|
|
$p, $p->p_pid, \
|
|
$p->p_flag, $p->p_stat, $p->p_nlwps, \
|
|
(char *) $p->p_comm
|
|
printf "\n"
|
|
set $p = $p->p_list.le_next
|
|
end
|
|
set $i++
|
|
end
|
|
end
|