1748245 Members
3799 Online
108760 Solutions
New Discussion юеВ

logging processes

 
James Grice
Occasional Advisor

logging processes

Can anyone tell me if there's a way to log the top 5 or 10 processes ? Is there a product that can be purchased? Here's HP's reply :

As I understand it from the case notes, the customer is looking for a method to take a snapshot of the top ten or so processes at a settable interval. The following may meet their needs.

If I were collecting this data, I'd use the undocumented "-f" option of top(1), along with the "-d" flag. I'd set up a cron job to run every 5 minutes and execute this command:

/usr/bin/top -n 10 -f /path/filename

The "-n" flag specifies the number of processes you wish to see, sorted by CPU utilization. The "-f" flag specifies the pathname you want the results printed to, but also specifies that you want just a single snapshot. The file will not contain the cursor control characters you'd have if you redirected top's output to a file using ">". And if top finds the file already there (as it would, in this case), it will append to it. Thanks in advance-Peace
6 REPLIES 6
Uday_S_Ankolekar
Honored Contributor

Re: logging processes

Hi,

If you have perfview then it is easy to get the report from measureware agent you can collect data.

Also set cron for sar regular interval.

GoodLuck
-USA..
Good Luck..
James R. Ferguson
Acclaimed Contributor

Re: logging processes

Hi James:

For ad hoc, short periods, I don't see anything particularly bad about this response. For long-term serious performance analysis, I'd look at Glance/Measureware or somthing like it.

Regards!

...JRF...
Alan Riggs
Honored Contributor

Re: logging processes

I have used that top functionality before and have had no problem,s. For more detailed/refined reports you might want to set up a glance advisor which generates teh report that you wish.
Christopher McCray_1
Honored Contributor

Re: logging processes

Measureware is a great tool that I have been getting familiar with. You will be able to not only extract current performance data, but historical as well. Perfview is a separate product all together, but allows you to create graphs of metrics without having to ftp the data file to a pc an use excel. You can also centrally manage data collection from a single server with Perfview.

Hope this helps
Chris
It wasn't me!!!!
Mladen Despic
Honored Contributor

Re: logging processes

James,

I've attached a Glance Adviser Syntax example. You can save it to a file in your current directory. Let's say we call it top5.syntax. Then you can run something like:

glance -adviser_only -syntax top5.syntax -j10

I hope this helps ... Mladen
Roger Baptiste
Honored Contributor

Re: logging processes

James,

The top command should do
fine ,except that i have
found top to be off-mark
on odd occasions.

Glance is a good alternative.

-raj
Take it easy.