【发布时间】:2011-02-21 17:34:58
【问题描述】:
如何检查在 HPUX 上占用超过 5% CPU 的所有进程
【问题讨论】:
标签: unix command-line shell
如何检查在 HPUX 上占用超过 5% CPU 的所有进程
【问题讨论】:
标签: unix command-line shell
通常的做法是运行top 或top -o cpu。
top(1) top(1)
NAME
top - display and update sorted information about processes
SYNOPSIS
top [-a | -d | -e | -c <mode>]
[-F | -f]
[-h]
[-i <interval>]
[-l <samples>]
[-ncols <columns>]
[-o <key>] [-O <skey>]
[-R | -r]
[-S]
[-s <delay>]
[-n <nprocs>]
[-stats <keys>]
[-pid <processid>]
[-user <username>]
[-U <username>]
[-u]
DESCRIPTION
The top program periodically displays a sorted list of system process-
es. The default sorting key is pid, but other keys can be used in-
stead. Various output options are available.
【讨论】:
UNIX95=1 ps -eopid,cpu|awk '$2>5{print $1}'
【讨论】: