Operating System - HP-UX
1819803 Members
3098 Online
109607 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
Doug O'Leary
Honored Contributor

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

Hey;

A long time ago, in fact, more than 10 years ago, I used gnuplot (http://hpux.connect.org.uk/hppd/hpux/Development/Tools/gnuplot-4.2.5/) to graph sar data. There was some other application that I had to use to convert the plots to jpgs but I can't remember that one off the top of my head.

Gnuplot's fairly easy for basic graphs. You can apparently do some things with it that very quickly leave my sphere of limited mathmatic understanding...

HTH;

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
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 overwhelming respond. its very helpful. how can i this command to take usr% maximum?

cat /var/adm/sa/sar4.out| grep -v "max" >> /tmp/sar.out

hope to hear from you. thank you
apple
Super Advisor

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

dear Sir,
cat /var/adm/sa/sar4.out| grep -v "Average" >> /tmp/sar.out
when i use this command, it will average out the entire day command or use algortithm find the average throughout the day?

how to find the max throughout the day of sar output capturing?
hope to hear from you.thank you
apple
Super Advisor

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

dear Sir,
how to get the maximum from the sar output?

hope to hear from you. i tried to use the same command just change the
cat /var/adm/sa/sartest.out |grep -i "maximum" >> /tmp/sar.out, but nothing was captured in /tmp/sar.out. the output was 0 in size.
would really appreciate your advice. many thanks in advance
Steven E. Protter
Exalted Contributor

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

Shalom to you apple,

When trying to compose your grep statement, look at the raw output. The word maximum either does not appear or may have capitalization differences, making it impossible for you to accomplish your goal.

It would appear from your feedback that members have provided you meaningful answers. If true, please show feed back in the form of awarding points to answers based on their value.

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=140137

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