1*13e21196Smrg# $NetBSD: procs,v 1.4 2019/05/09 07:59:49 mrg Exp $ 29c235d70Sad 39c235d70Saddefine procs 49c235d70Sad set $i = 0 59c235d70Sad 69c235d70Sad while ($i < 2) 79c235d70Sad if ($i == 0) 89c235d70Sad set $p = allproc.lh_first 99c235d70Sad end 109c235d70Sad if ($p) 114d55497aSeeh printf " proc pid flag stat nlwps lwp comm\n" 129c235d70Sad end 139c235d70Sad while ($p) 140f723754Smrg printf "%16lx %5d %8x %4x %5d %16lx %s\n", \ 159c235d70Sad $p, $p->p_pid, \ 164d55497aSeeh $p->p_flag, $p->p_stat, $p->p_nlwps, $p->p_lwps.lh_first, \ 179c235d70Sad (char *) $p->p_comm 189c235d70Sad set $p = $p->p_list.le_next 199c235d70Sad end 209c235d70Sad set $i++ 219c235d70Sad end 229c235d70Sadend 23*13e21196Smrgdocument procs 24*13e21196Smrglist all processes. 25*13e21196Smrgdisplays struct proc *, pid, flags, status, nlwps, first lwp addr 26*13e21196Smrgand command name. 27*13e21196Smrgend 28