显示用户man,woman的进程 。
ps Uman,woman -o pid,user,sz,vsz,args, stat
每个进程显示 pid, user, size, virtual size, args命令名称。
以树形结构输出进程
ps --forest Uman
显示线程
$ps -Lf -Uroot | grep thread
$UID PID PPID LWP C NLWP STIME TTY TIME CMD
root 21000 1 21000 0 1 13:12 ? 00:00:00 gvim thread.c
root 21428 14644 21428 0 3 13:12 pts/53 00:00:00 ./thread
root 21428 14644 21429 0 3 13:12 pts/53 00:00:00 ./thread
root 21428 14644 21430 0 3 13:12 pts/53 00:00:00 ./thread
显示进程的属性
ps --forest -s 7088 -o stat,pid,ppid,pgid,sid,tpgid,comm