Operating System - HP-UX
1747980 Members
4075 Online
108756 Solutions
New Discussion юеВ

memory, CPU, disk usage and network traffic statistics

 
SOLVED
Go to solution
sabinkarvijay
Frequent Advisor

memory, CPU, disk usage and network traffic statistics

Hi All,

Is there any way to find out memory, CPU, disk usage and network traffic statistics in hourly basis for HP-UX B.11.11.

Thanks in Advance,

Regards,
Vijay Sabinkari.
11 REPLIES 11
Steven E. Protter
Exalted Contributor
Solution

Re: memory, CPU, disk usage and network traffic statistics

Shalom,

This script can help:
http://www.hpux.ws/?p=8

http://www.hpux.ws/?p=6

You might need to do some tinkering.

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
G V R Shankar
Valued Contributor

Re: memory, CPU, disk usage and network traffic statistics

hi,

If you have perfstat installed on the system, you can use extract command to get the desired data. You need to stop mwa and ttd and run the command extract. It is pretty easy.

Cheers,

Ravi.
sabinkarvijay
Frequent Advisor

Re: memory, CPU, disk usage and network traffic statistics

Hi Ravi,

The below is the output of the command perfstat:

list of performance tool processes:
----------------------------------

OVPA status:
Running scopeux (OVPA data collector) pid 3417
Running midaemon (Measurement Interface daemon) pid 3411
Running ttd (ARM registration daemon) pid 3209

OVPA Server status:

Running ovcd (OV control component) pid 3455
Running ovbbccb (BBC5 communication broker) pid 3457
Running coda (perf component) pid(s) 3496
Running perfalarm (alarm generator) pid(s) 3445

OVPA Server status:

Running perflbd (location broker) pid 3458

The following data sources have running repository servers:
PID DATA SOURCE
Running rep_server 6422 SCOPE


OV Operation Agent status:

The VPO control agent is currently not running. (OpC30-1045)


************* (end of perfstat -p output) ****************

Can you please tell me what exactly ttd and mwa for and how it can be stopped and how the command extract can be run?

Regards,
Vijay.

Re: memory, CPU, disk usage and network traffic statistics

You don't need to stop mwa or ttd to gather data using extract - I don't know what Ravi is refrring to there...

using extract is pretty easy - just type "extract" and you'll be put into an interactive CLI mode where you can select a guided method to help you get out the data you are interested in...

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: memory, CPU, disk usage and network traffic statistics

and once you learn how to use extract properly it's easy to do things like this:

echo "DATA TYPE GLOBAL
DATE
TIME
GBL_MEM_UTIL
GBL_CPU_TOTAL_UTIL
GBL_DISK_PHYS_BYTE_RATE
GBL_NET_PACKET_RATE" > /tmp/report.cfg

extract -xp -G -r /tmp/report.cfg -f /tmp/report.out,Purge -b TODAY-1 -e TODAY

This will generate a file /tmp/report.out which contains roughly the data you are looking for - in this case I asked for yesterday's data only summarised to the hour.

To understand what these metrics are and what others are available look at the file

/opt/perf/paperdocs/ovpa/C/ovpa-metrics.txt

or

/opt/perf/paperdocs/mwa/C/mwa-metrics.txt

depending on how old your copy of OVPA is.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
sabinkarvijay
Frequent Advisor

Re: memory, CPU, disk usage and network traffic statistics

Hi Duncan,

Yes you are right..

I run the extract command ..I have attached the command output...

But when i tried to open the output file, i am unable to read anything, it's coming in
binary format.

Would you please guide me how can i extract the output of CPU usage from past one week.

Regards,
Vijay.

Re: memory, CPU, disk usage and network traffic statistics

Just CPU usage for last week, summarised by hour:

echo "DATA TYPE GLOBAL
DATE
TIME
GBL_CPU_TOTAL_UTIL" > /tmp/report.cfg

extract -xp -G -r /tmp/report.cfg -f /tmp/report.out,Purge -b TODAY-7 -e LAST

HTH

Duncan

I am an HPE Employee
Accept or Kudo
sabinkarvijay
Frequent Advisor

Re: memory, CPU, disk usage and network traffic statistics

Hi Duncan,

When i run the above command , I am getting the below error:

#/opt/perf/bin/extract -xp -G -r /tmp/report.cfg -f /tmp/report.out,Purge -b TODAY-7 -e LAST


Specified start (04/17/09 00:00) greater than stop (04/14/08 23:59).
Export not performed.

I think we may need to change the options after purge..isn't it?

I tried after changing the Purge options also...

I got the below output:

#/opt/perf/bin/extract -xp -G -r /tmp/report.cfg -f /tmp/report.out,Purge -b TODAY-7 -e TODAY


Writing GLOBAL data to file /tmp/report.out

When i opened the output file, there is nothing written...

#more /tmp/report.out

Date Time CPU %

#

Regards,
Vijay.

Re: memory, CPU, disk usage and network traffic statistics

hmmm that suggests there is data missing from your log files...

can you post (attach) the output of:

utility -xs

This will tell us something about the contents of your log file...

HTH

Duncan

I am an HPE Employee
Accept or Kudo