Script for CPU ^ RAM Utilize

|^^|

The command shows the information of the number of core | processor | siblings

[rex@ssi ~]$ cat /proc/cpuinfo

The command shows the CPU model and the min and max speed of the processor.

[rex@ssi ~]$ lscpu | grep Hz Model name: Intel(R) Core(TM)2 Duo CPU T6670 @ 2.20GHz CPU MHz: 2200.000 CPU max MHz: 2201.0000 CPU min MHz: 1200.0000

NOTE:

Understanding CPU Loads, When should be worried?

http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages

For the monthly hourly utilization of CPU, kindly create a script with this commands.

sadf -T -d -- -u ALL | grep hostname; for A in `ls -rt /var/log/sa | grep -v sar`; do sadf -s 00:00:01 -e 23:59:59 -T -d $A -- -u ALL | grep 00:0 ; done;

For the monthly hourly utilization of memory, kindly create another script with this commands.

sadf -T -d -- -r | grep hostname; for A in `ls -rt /var/log/sa | grep -v sar`; do sadf -s 00:00:01 -e 23:59:59 -T -d $A -- -r | grep 00:0 ; done;

Then try to run this script. If the script successfully run, run it again then redirect the output to a file.

After running this command, extract the data from the server then open it by using Microsoft Excel.

For getting the peak utilization, the easiest way to get it was by sorting the data after opening it on Microsoft Excel.

If you prefer to just output the report on a terminal, you can remove the "-d" parameters on the scripts.

It seems that there was a difference with our sysstat version.

We've tested the commands with the similar version of OS server.

Kindly change the CPU script with these commands.

sadf -t -d -- -u ALL | grep hostname; for A in `ls -rt /var/log/sa | grep -v sar`; do sadf -s 00:00:01 -e 23:59:59 -t -d /var/log/sa/$A -- -u ALL | grep 00:0 ; done;

Memory utilization.

sadf -t -d -- -r | grep hostname; for A in `ls -rt /var/log/sa | grep -v sar`; do sadf -s 00:00:01 -e 23:59:59 -t -d /var/log/sa/$A -- -r | grep 00:0 ; done;

Then try to re-run these scripts.

It seems that there's still a compatibility issue with your sysstat package and our sysstat.

Can you run these commands and provide us the output files.

man sadf > /tmp/sadf.man man sar > /tmp/sar.man sadf -s 00:00:01 -e 23:59:59 -t -d -- -A > /tmp/sadf.sample cd /tmp

eof