Nmon max and avg for cpu and memory

Hi All,
Anyone know how to capture the nmon avg and max cpu and memory for one of the AIX server for Monthly Utilization Report purposes ?

Thanks.

---------- Post updated at 05:18 AM ---------- Previous update was at 05:07 AM ----------

if possible use shell script to count or sum the file generated from nmon without using the nmon analyzer, the purpose of this is to automate the process without manual intervention.

Thanks

Hi,

sorry but the question is not clear for me.
What did You need exactly?
A graph per month where the CPU- and Memory-Utilization are shown?
Four Numbers for max. and average CPU- and Memory-Utilization?
Is NMON set or are other Tools (like Ganglia Monitoring) possible?

Regards

Thanks for reply the message.
In fact, What I want is to use the nmon generated output report to calculate the AVERAGE and MAX of CPU and MEMORY UTILIZED (Read from nmon raw files) for every month (background process) without using NMON ANALYZER as my ultimate purpose is at the end of Month I want to generate out the MAX / AVERAGE Of CPU and MEMORY UTILIZED in the Month.
This will save time to open the file from nmon analyzer, run analyze.. This is pretty time consuming.

Thanks. I hope you are clear of what I want.

Okay,

before You start to investigate time in such a script, here are few hints:

  1. Did You use dedicated or shared CPUs? If You use shared CPUs You need to maesure or count the real physical CPU usage (User, System, Wait an Idle are useless without that information)

  2. A UNIX/AIX System will allways try to use all available Memory - at least for Filesystem Cache. So it depends on Your application which Values (memory "types" - FS Cache, Prcoess or System) are of interest - I would prefere to monitor any paging space activity or VMM Stats like scans and reclaims!

NMON stores his data in plain text, so it is "relatively simple" to parse this file.

Examle:

# grep "MEMNEW" output.nmon
MEMNEW,Memory New SERVER,Process%,FScache%,System%,Free%,Pinned%,User%
MEMNEW,T0001,31.6,44.5,23.3,0.5,33.9,66.5
MEMNEW,T0002,31.6,44.6,23.3,0.5,33.9,66.5
MEMNEW,T0003,31.5,44.5,23.3,0.7,33.9,66.3
MEMNEW,T0004,31.5,44.6,23.3,0.5,33.9,66.5
MEMNEW,T0005,31.5,44.6,23.3,0.6,33.9,66.4
MEMNEW,T0006,31.5,44.6,23.3,0.6,33.9,66.4
MEMNEW,T0007,31.5,44.6,23.3,0.6,33.9,66.4
MEMNEW,T0008,31.5,44.6,23.3,0.5,33.9,66.5
MEMNEW,T0009,31.5,44.6,23.3,0.6,33.9,66.4

T00xxxx are the Intervals.

For monthly statistics I would at least look at "Advanced Accounting" to see if it will help. My gut feeling is that nmon is not really used for monthly averages. Otherwise you must write your own script/program logic to calculate everything as you scan all the files.

I run nmon reports daily.

make sure nmon is installed and run it manually first to make sure it works.

once you confirm it works add it into a cronjob. I do it every hr.

/usr/bin/nmon -f -t -P -^ -m /logs/perf/nmon 2>/dev/null

after a day of reporting ftp it to your desktop and use nmon analyzer.

I don't know what "Advanced Accounting" contains, but I'd suggest classical UNIX methods, namely "sar". This is what it was invented for and you can directly calculate the averages from its (plain ASCII) output with a few lines of "awk".

What XRay said about having to correlate these data with the number processors actually attached to the system is true, though: X% of 1 processor is not the same as the same X% of many processors, so the activity/utilization report without taking this into account would be meaningless. (Then again, if you want to create charts for management it probably won't matter anyway if the data have any meaning or not. ;-)) )

I hope this helps.

bakunin