Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vmstat -w 5 - I need a time stamp on the enteries

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
DK
Hi

I'm having IO issues on a servere, and I want to monitor this problem over time.

I'm using vmstat -w 5 to monitor the problem - but I would realy like to get a timestamp infront og the lines, so that I have a chance og analysing the system.

Any ideers? - I'm wundering if I should make a script that uses vmstat -w 1 2 and takes the last line. - then putting a time stamp infront of that. - but there must be a better way.

/Larshg
 
Or perhaps:

[tt]vmstat -w 5 | while read line ; do echo "$(date): $line" ; done[/tt]

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top