HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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

HTH

Duncan

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

HTH

Duncan
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

HTH

Duncan
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

HTH

Duncan
sabinkarvijay
Frequent Advisor

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

Yes you are right..

Now I run the same where the logfiles are updating...

Now I successfully extracted the script as below:

#more /tmp/report.out

Date Time CPU %
04/17/2009 00:00 22.13
04/17/2009 01:00 22.43
04/17/2009 02:00 22.18
04/17/2009 03:00 23.54
04/17/2009 04:00 26.48
04/17/2009 05:00 25.10
04/17/2009 06:00 27.77
04/17/2009 07:00 28.36
04/17/2009 08:00 38.85
04/17/2009 09:00 39.03
04/17/2009 10:00 39.52
04/17/2009 11:00 39.51
04/17/2009 12:00 39.02
04/17/2009 13:00 28.03
04/17/2009 14:00 24.65
04/17/2009 15:00 28.17
04/17/2009 16:00 24.79
04/17/2009 17:00 24.56

Thanks for your help...

Regards,
Vijay Sabinkari.
sabinkarvijay
Frequent Advisor

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

Hi Duncan.

Thanks for your assistance

I need a report daily where i can get the statistics hourly basis and this report need to be sent to my mail id?

Is there any way to do that?