Operating System - HP-UX
1753636 Members
6140 Online
108798 Solutions
New Discussion юеВ

Re: CPU consumed by a Process

 
SOLVED
Go to solution
Cenoce_2
Advisor

CPU consumed by a Process

Hi all,

Supose if i know a process id then how to find out CPU consumed by that process.
11 REPLIES 11
Robert-Jan Goossens
Honored Contributor
Solution

Re: CPU consumed by a Process

Hi,

# UNIX95= ps -eo pcpu,pid,args | grep PID

Regards,
Robert-Jan
Arunvijai_4
Honored Contributor

Re: CPU consumed by a Process

Hello,


# UNIX95= ps -ef -o pid,ruser,pcpu,args|tr -d "%" |awk '{if($4>=90) print $0}'

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Mark Nieuwboer
Esteemed Contributor

Re: CPU consumed by a Process

Hi Cenoce,

Use glance

grtz. Mark
Yogeeraj_1
Honored Contributor

Re: CPU consumed by a Process

hi,

you can use Glance Plus.

e.g.
--------------------------------------------------------------------------------
Resources PID: 19711, rwrun PPID: 16127 euid: 124 User: ias
--------------------------------------------------------------------------------
CPU Usage (util): 41.3 Log Reads : 735 Wait Reason : PRI
User/Nice/RT CPU: 39.7 Log Writes: 0 Total RSS/VSS : 28.0mb/ 30.0mb
System CPU : 0.4 Phy Reads : 0 Traps / Vfaults: 969/ 0
Interrupt CPU : 0.8 Phy Writes: 0 Faults Mem/Disk: 0/ 0
Cont Switch CPU : 0.0 FS Reads : 0 Deactivations : 0
Scheduler : HPUX FS Writes : 0 Forks & Vforks : 0
Priority : 243 VM Reads : 0 Signals Recd : 0
Nice Value : 21 VM Writes : 0 Mesg Sent/Recd : 359/ 359
Dispatches : 1345 Sys Reads : 0 Other Log Rd/Wt: 360/ 359
Forced CSwitch : 905 Sys Writes: 0 Other Phy Rd/Wt: 0/ 0
VoluntaryCSwitch: 359 Raw Reads : 0 Proc Start Time
Running CPU : 1 Raw Writes: 0 Thu Feb 9 14:26:03 2006
CPU Switches : 73 Bytes Xfer: 0kb :


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Arunvijai_4
Honored Contributor

Re: CPU consumed by a Process

Hello,

You can also use "top" .

"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: CPU consumed by a Process

You can use like,

UNIX95= ps -ef -o pid,comm,cpu,cpu | grep 'pid of process'

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: CPU consumed by a Process

you can use top but it may not be accurate always. Some times process will not be coming in list. Better go with UNIX95 for default or use glanceplus.

--
Muthu
Easy to suggest when don't know about the problem!
Steven E. Protter
Exalted Contributor

Re: CPU consumed by a Process

http://www.hpux.ws/system.perf.sh

sar packages that run background for as long as you designate.

This is a complete package that started out from HP and were fixed/improved by me.

Any reason why the replies to this thread are broken into such small pieces?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cenoce_2
Advisor

Re: CPU consumed by a Process

Thanks all

Can anybody explain how UNIX95 works