- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- get only average value for multiple sar files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2008 03:05 AM
тАО04-17-2008 03:05 AM
get only average value for multiple sar files
sar reports are automatically storing in a dir in every predefined times...while "sar -f sarfile" gives value of 5sec*4times, also average at the bottom..now to analyse average value we need to give sar for every files,.
if anyone tells, how to get average value of multiple sar files? will be useful.I need the average value only
Thnz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2008 03:47 AM
тАО04-17-2008 03:47 AM
Re: get only average value for multiple sar files
A different collection script might be helpful.
http://www.hpux.ws/?p=6
Otherwise cut and paste the results into a spreadsheet perhaps.
With a lot of work in shell scripting and string parsing, you might be able to pull results out of these various files and get your averages. It depends on how much work you are weilling to do.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2008 04:06 AM
тАО04-17-2008 04:06 AM
Re: get only average value for multiple sar files
If the values are in nice colums, awk(1) can find the values and average them.
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2008 04:29 AM
тАО04-17-2008 04:29 AM
Re: get only average value for multiple sar files
Even if the columns wobble, as long as the field of interest is in the same ordinal position, 'awk' will allow you to do real arithmetic. For example, if the field you want to average is in column-3 (one-relative):
# awk '{SUM=SUM+$3;COUNT++};END{printf "Avg = %4.2f\n",SUM/COUNT}' file1 file2 file3 ...
That is, you can specify the multiple files to be read and summarized as arguments to the script.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2008 04:34 AM
тАО04-17-2008 04:34 AM
Re: get only average value for multiple sar files
Right. The only problem with multiple files is skipping titles and footers with in-file averages or subtotals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2008 06:16 AM
тАО04-17-2008 06:16 AM
Re: get only average value for multiple sar files
> Dennis: Right. The only problem with multiple files is skipping titles and footers with in-file averages or subtotals.
...while true, that's simply resolved by matching appropriate patterns and skipping lines representing those entities. Of course, this can apply for single as well as multiple files.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 01:03 PM
тАО09-18-2008 01:03 PM