Operating System - Linux
1824963 Members
3468 Online
109678 Solutions
New Discussion юеВ

sar command to get the average percentage of total disk utilisation for the whole day

 
SOLVED
Go to solution
vvsha
Frequent Advisor

sar command to get the average percentage of total disk utilisation for the whole day

I am able to take Average percentage of total CPU utilisation for the whole day by using the following command.
#sar -u -f sa30
&
Also I am able to take Average percentage of total Memory utilisation for the whole day by using the following command.
#sar -r -f sa30

Can any one help me to get a command for Average percentage of total Disk utilisation for the whole day.


I want a sar command to get the total disk utilisation for the whole day.

Please help me regarding on the same.

Thanks in advance.
8 REPLIES 8
Ivan Ferreira
Honored Contributor

Re: sar command to get the average percentage of total disk utilisation for the whole day

Are you aware of?:

# sar -d -f sa30

Also, you should give a look to collectl:

http://collectl.sourceforge.net/
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor
Solution

Re: sar command to get the average percentage of total disk utilisation for the whole day

BTW, I see in your profile "I have assigned points to 33 of 57 responses to my questions."

Please keep asigning points, here are your "unrated" answers:

http://forums11.itrc.hp.com/service/forums/pageList.do?userId=CA1475111&listType=unassigned&forumId=1
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
vvsha
Frequent Advisor

Re: sar command to get the average percentage of total disk utilisation for the whole day

its giving the following message,

$ sar -d -f sa23
Requested activities not available in file


but If I try with -b option I am getting the following output

#sar -b -f sa23

22:00:00 tps rtps wtps bread/s bwrtn/s
23:50:00 0.00 0.00 0.00 0.00 0.00
Average: 0.00 0.00 0.00 0.00 0.00

All values are zeros.....

Please help me ....



Ivan Ferreira
Honored Contributor

Re: sar command to get the average percentage of total disk utilisation for the whole day

>>> Requested activities not available in file

This error message means that you are trying to extract non-existent activities from the data file. Usually sadc reads all the available activities from the system and stores them in the data file. However, to prevent data files from taking too much space on disk, some activities must be explicitly set on the command line to be read by sadc. One example is -I option which must be used together with sadc to be able to extract statistics for individual interrupts from the data file. Another example is -d option for disks statistics.


Plese check the man pages for sadc to see if the -d option should be enabled. If so, then verify the sa1 script or you sysstat cron job. You can check the location of the scripts using:

rpm -ql sysstat
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
vvsha
Frequent Advisor

Re: sar command to get the average percentage of total disk utilisation for the whole day

then Is there any way to check last week disk utilisation?
Ivan Ferreira
Honored Contributor

Re: sar command to get the average percentage of total disk utilisation for the whole day

Not right now, untill you modify your script and log disk activities.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
vvsha
Frequent Advisor

Re: sar command to get the average percentage of total disk utilisation for the whole day

Hi Ivan,

Thank you very much for your support.

It was realy helpful.

But for Disk still I am not getting data.

Is there any other utility built in linux to check last 10 days total disk utilisation?

Please let me know any other way can I get the same details

Please let me know what need to be changed in the script also.

Your help is realy great.
Ivan Ferreira
Honored Contributor

Re: sar command to get the average percentage of total disk utilisation for the whole day

>>> Please let me know any other way can I get the same details

As I said in a previous post, collectl can provide you that information.

>>> Please let me know what need to be changed in the script also.

Please attach in a file the content of:

/etc/cron.d/sysstat
/etc/sysconfig/sysstat
/usr/lib/sa/sa1
/usr/lib/sa/sa2
/usr/lib/sa/sadc -h

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?