Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-07-2006, 03:01 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
Question regarding vmstat output

Hello ...

I am quite new to Linux.....

I have a query regarding vmstat and manipulation to be done on its output.

vmstat gives output that contains averages, calculated from the time the system was last booted.

vmstat 1 10 gives output displays one new line per second, but only for the next ten seconds

Now if I take output of both the command at an interval of 1 minutes,
vmstat gives one constant o/p., whereas, vmstat 1 10 gives variations in results as far as cpu time is concerned.

Is it possible to extract o/p of vmstat 1 10 and get avg of cpu usage for every one minute ?

Do I have to write my own code for this ?
If yes ... can someone of you give me a little start ? Or some ref. book or name of the site from where I can get little help ?

Thanks in advance....
Old 07-07-2006, 09:01 AM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Forgive me if I am not understanding the problem, but doesn't

vmstat 60 N

(where N is an integer, or left out) do what you are wanting?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
vmstat UltraSoul Solaris / OpenSolaris 9 07-14-2006 11:11 PM
Free Memory according to vmstat Camino Linux - Newbie 3 02-27-2006 10:27 AM
Difference between Sar and Vmstat blurblur Linux - Newbie 3 05-03-2005 10:14 PM
vmstat shows swpd as 0 Skazi Linux - General 4 03-11-2005 04:39 AM
Vmstat and hit rates kiwi_bloke Linux - General 0 08-29-2004 07:44 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration