Operating System - HP-UX
1748242 Members
4055 Online
108759 Solutions
New Discussion юеВ

Re: capturing weighted cpu

 
SOLVED
Go to solution

capturing weighted cpu

I run scripts using "top -d1" and piped to a file. Then I string the file and grep for my process and check the wcpu because of the programs memory leak and it run up to 100%. Is there another command to use to capture the weighted cpu or when the process gets to 100%. When it reaches 100% it locks up where nobody can not do any work on the system.
hilo
7 REPLIES 7
RAC_1
Honored Contributor
Solution

Re: capturing weighted cpu

You can do as follows.

UNIX95= ps -ef =o pid,ppid,ruser,cpu,pcpu,args|grep "your_processes"

Then whatever you want to do...
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: capturing weighted cpu

Shalom,

Try this:

http://hpuxconsulting.com/mem.mon

Consider it beta code, but its coming along nicely.

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

Re: capturing weighted cpu

Thanks for your answer. One of the reasons for writing was to check if any utility or command was put out by HP that I may of missed. Both answers use the ps command and it shows time used by the process not weighted cpu. This process runs 24x7 and it's the weighted cpu that concerns me because when the process reaches 100% wcpu nothing else gets done on the server.
hilo
Dennis Handly
Acclaimed Contributor

Re: capturing weighted cpu

You do know about the "top -f file" option to give text output? I don't know if top allows you to use "-" as the file so you can send it to your pipe?

You mentioned CPU and memory leak. Why do you think there is a connection?
Dennis Handly
Acclaimed Contributor

Re: capturing weighted cpu

If you are worried about a memory leak, you can download wdb and use it's leak detection commands:
set heap-check on
info leaks

Re: capturing weighted cpu

We are running a Vendors application and it is known to go high with it's Weighted CPU usage. About once a month I have to kill the process because it goes high on it's wcpu and you can see it using top. I do know about the -f command with top, thanks. It's the vendor's application that's bad and because we're using it, I have to watch this problem. Thanks for your help and informaion.
hilo

Re: capturing weighted cpu

Thanks to all for your information.
hilo