1753878 Members
7204 Online
108809 Solutions
New Discussion юеВ

sar

 
SOLVED
Go to solution
Rafi Sheikh
Occasional Contributor

sar

Is it possible to have sar capture stats for a specific PID? I read information for UNIX95, however, I need to get some sar specific information but I do not want the stats skewed by the activity in the whole server?
9 REPLIES 9
Bharat Katkar
Honored Contributor
Solution

Re: sar

Hi Rafi,
You can have process table status using "sar -v" but doubt if sar can monitor a particular PID.
Regards,
You need to know a lot to actually know how little you know
RAC_1
Honored Contributor

Re: sar

sar is not designed for that. To monitor particular pid, you will have to use glance/custom scripts.

What exactly you want to monitor? Give details.
There is no substitute to HARDWORK
Rafi Sheikh
Occasional Contributor

Re: sar

Well we have two servers RX8420 and RS8620 (RISC & Itanium). On a repeatable code which is CPU bound one takes 10 min (RISC) while ITA takes 25 minutes. We ran some sar related reports (d, q, u, etc.) and looks that there is not much an I/O contention. I knwo we can use iostat and or vmstat but when we ran the analysis we limited the server access, which is not possible today :) (multiple users are on now).

I am open to any suggestions. I am not sure the measureware circular logs are kept for too long or may well be inaccessible and I would like to capture stats.

Any other idea? As I mentioned I am open to tap into your collective expertise.

Much obliged.

Rafi
Arunvijai_4
Honored Contributor

Re: sar

Hello Rafi,

To measure performance, you can use UNIX's built-in tools like, vmstat, top, ps with UNIX95 and iostat.

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

Re: sar

Hi Rafi,

Some more links,

http://www.redhat.com/magazine/011sep05/features/tools/
http://www.hpux.ws/buildmail.hpux.text
(SEP's system performance script)

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Geoff Wild
Honored Contributor

Re: sar

What kind of code?

If it is compiled - did you re-compile on Itanium?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rafi Sheikh
Occasional Contributor

Re: sar

Hi, no actually just a SAS based code run by a user.
AshishJain_USA
Frequent Advisor

Re: sar

Rafi

Since you mentioned that its a code run by the user, you may actuall write a script which should capture

1. grep the process initiated by the user code
2. grep the process id from this

then you may use "top" and find out the stats related to this pid.

rgds..Ashish
RAC_1
Honored Contributor

Re: sar

Did the program take different (quite differnt) when you isolated the system and ran it?? Was it still the same? 10 min on PA and more time on IA? When running on IA, run it with tusc and try to compare it with PA. Does it make any unnecessary sys calls?? Any contention on cpu??
There is no substitute to HARDWORK