Vijay
Vijay

Reputation: 67221

check all the processes which are taking more than 5% of cpu

How do I check all the processes which are taking more than 5% of CPU on HPUX

Upvotes: 0

Views: 393

Answers (2)

user332325
user332325

Reputation:

UNIX95=1 ps -eopid,cpu|awk '$2>5{print $1}'

Upvotes: 0

DigitalRoss
DigitalRoss

Reputation: 146073

The usual thing to do is to run top or 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.

Upvotes: 1

Related Questions