Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

I am trying to understand the network activity from a few servers along with CPU utilization for 48 hours only. I am new to sar and maybe i am not writing the syntax correctly.

sar %util -n ALL eth0 -e[48:00:00] -f /tmp/piyush

asked 06 Mar '13, 10:57

piyush128k's gravatar image

piyush128k
1111
accept rate: 0%

edited 06 Mar '13, 11:03

jeremy's gravatar image

jeremy ♦♦
1.0k1516

Did this work for you?

(12 Mar '13, 11:13) rfelsburg ♦



A couple of things.

1.) eth0 isn't an option for -n. You can use ALL or a number of other items, look at man sar for a list. -n ALL, would output all network stats.

2.) -e 48:00:00, this will never work, -e signifies the ending time, there is no 48:00:00 o'clock. 23:59:59 is the highest you can get.

3.) %util is only a field displayed by -d. not an option.

so you're actually looking for something like sar -d -n ALL. The only way I'm aware of getting a specific 48 hours would be to look at each file that encompasses that time period, and use -s and the starting time in 24 hour notation, and -e for the ending time in 24 hour notation. You'd have to do it one file at a time though.

For instance, if i wanted 09:00 on 3/1/2013 through 09:00 3/3/2013. I'd need to use the file for 3/1/2013 and -s 09:00:00, and then get all data for the file for 3/2, and an ending time of -e 09:00:00 for 3/3.

link

answered 06 Mar '13, 23:45

rfelsburg's gravatar image

rfelsburg ♦
6061618
accept rate: 25%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×11
×3
×1

Asked: 06 Mar '13, 10:57

Seen: 11,208 times

Last updated: 12 Mar '13, 11:13

powered by OSQA