Operating System - HP-UX
1752802 Members
5773 Online
108789 Solutions
New Discussion юеВ

tool to sar output to present by day in graph (sar captured every 5 mins)

 
SOLVED
Go to solution
apple
Super Advisor

tool to sar output to present by day in graph (sar captured every 5 mins)

Dear HPUX gurus,
would like to seek your advice. currently we capture the cpu utilisation using sar command, and use excell to present to graph. i don't want to average out the statistic. any way we can present these every 5 mins capturing per day.
crontab entry:
00 09 * * 1,2,3,4,5 /usr/bin/sar 300 156 >> /var/adm/sa/sar4.out

hope to hear from you. thank you
14 REPLIES 14
apple
Super Advisor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

Dear Sir,
Would like to clarify the question.
in this server, we don't have performance capturing tool and we need to capture the server resource utilisation to feed into graph format for server reporting daily throughout the month.
i hv captured sar and vmstat daily during business hour (9 am - 5 pm) and the capture interval is 5 mins.
its very tedious since when i convert the data into graph, the x-axis will become time. if i want to differentiate by day, how to reduce the pain and what is the strategy? if i average out the statistic, it become very low utilised though throughout the day there is certain time the utilisation is very high. if i want to pick the highest utilisation, not fair since the peak is not there all the time.
how do u overcome this dilemma? better way of doing this thing.

hope to hear from you.promise of good points. thank you

Tingli
Esteemed Contributor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

You can put both max and ave to the graph.
Emil Velez
Honored Contributor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

Check


You probably have measureware if you have the enterprise or mission critical OE.

If you do not why not load measureware on your servers it will work for 60 days and you can tune your system quite a bit for 60 days.

You can extract the data using extract or graph it using Performance Manager on a remote windows box (or unix) and it will run for 60 days too.

Try the tools free.. 60 days can be long enough to baseline your system and solve your issues.
apple
Super Advisor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

dear Sir, thank you for the replies. its very convincing. was thinking the first option to "put both max and ave to the graph", can we automate this? as need to run thorough the 30 days data and everyday it is running every 5 mins.

hoep to hear from you. thank you
RUET
Regular Advisor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

If you hava a glance licence, you can use glance in batch mode, something like this :

Create a glance advisor commande file, by eaxmple containing :

headers_printed = headers_printed

if headers_printed == 0 then {
print "Time Total Cpu Used"
headers_printed = 1
}

print gbl_stattime, " ", GBL_CPU_TOTAL_UTIL

Then run glance in advisor mode:

glance -adviser_only -syntax ./cpu_total -j 30 > cpu_total.out

wher 30 is in second ...
Then read this output.out in excel and that's done ..

regards
pat
rana sarkar
Advisor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

Do
/usr/sbin/sar 300 156 | grep -v "average" >> /var/adm/sa/sar4.out
rana sarkar
Advisor
Solution

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

Write a script instead:

sar 300 156 >> /var/adm/sa/sar4.out
cat /var/adm/sa/sar4.out| grep -ie "average" >> /tmp/sar.out
rana sarkar
Advisor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

Write a script instead:

sar 300 156 >> /var/adm/sa/sar4.out
cat /var/adm/sa/sar4.out| grep -v "Average" >> /tmp/sar.out
apple
Super Advisor

Re: tool to sar output to present by day in graph (sar captured every 5 mins)

Dear Sir,
thank you for your replies.its interesting and great.

# cat /var/adm/sa/sartest.out |grep -i "average" >> /tmp/sar.out

when i see the output, the average taht is used by usr is only 8%? then i just plot to graph in excel rite

# more /tmp/sar.out
%usr %sys %wio %idle
Average 4 2 0 94
Average 6 2 0 92
Average 8 2 0 90
Average 2 2 2 95
Average 8 2 0 90
Average 4 2 0 94

i heard there is a free tool that can convert the sar output to graph and also there is programming in excell that can populate this. i think the way you give is great. thank you