Operating System - HP-UX
1753518 Members
5184 Online
108795 Solutions
New Discussion юеВ

Re: script for collecting system stats

 
SOLVED
Go to solution
James Ellis_1
Super Advisor

script for collecting system stats

Hi ya all,
I am running a HP-UX 11.0 9000 server. I would like to collect system information on CPU Utilization, Percent Memory Utilization, and I/O Statistics. I know some or all of these system stats can be found under the 'vmstat' command, but when running this command, I get more statistics than I need. Is there another command that will give me specific information, i.e. information on CPU Utilization only? Also, can anyone indicate where there is a repository where various scripts exists, so I can learn more about scripting? Thanks in advance, Jim
"In the middle of difficulty lies opportunity" -Einstein
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: script for collecting system stats

Hi,

The most universal tool is a command called sar. You can also get it to take snapshots at regular intervals. Another command which can colloct the data for you is 'top'. Perhaps the best toolset is a bundlr called 'MeasureWare' but it's not free. The others I've mentioned are.

Man sar, top for details.

Regards, Clay
If it ain't broke, I can fix that.
Junior C.
Frequent Advisor

Re: script for collecting system stats

James,

Glance or PerfView will produce what you are looking for. Attach is a pv script I created. Modify to your need.
f. halili
Trusted Contributor

Re: script for collecting system stats

You may use sar " system activity reporter"
There are many options you may use in sar as an example:

# sar 5 20

You may also use top which will give you useful info and it automatically updates. You will also see activity if per processor if you have multiple processors.
# top

- fnhalili

derekh
Richard Darling
Trusted Contributor

Re: script for collecting system stats

James, this is unrelated...but are you the "JEllis" PERL programmer that I was speaking with at CMGI?
Richard Darling
rdarling@southwickclothing.com
James Ellis_1
Super Advisor

Re: script for collecting system stats

Richard,

No, I am not that person you were referring to on Perl. My name is quite common, especially Ellis.

Regards,
Jim
"In the middle of difficulty lies opportunity" -Einstein
James Ellis_1
Super Advisor

Re: script for collecting system stats

All,

Thanks for your reply. I will look into sar and top and see what they involve, and get back to you all.

Regards,
Jim
"In the middle of difficulty lies opportunity" -Einstein
James Ellis_1
Super Advisor

Re: script for collecting system stats

I forgot to mention one other thing. I will look into Glance, as someone mentioned that this would work. But I work in a classified environment, and they have a network management application running so monitor all the servers. I was told not to use Glance, but I can inquire and ask again.

Thanks,
Jim
"In the middle of difficulty lies opportunity" -Einstein
Geetam
Frequent Advisor

Re: script for collecting system stats

I use sar, cheap and cheerful

There are scripts to collect data (in binary format) for a running month. See man for the commands: sar, sa1, sa2 and sadc.