Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strange vmstat() behavior on linux




ok, this is my DSL firewall box, running a custom 2.2.16 kernel
(turbolinux 6.0 server base install, then I redid the kernel and such, of
course).  vmstat on my Sparc4 works normally, but on the Linux box, it
reports 0% user CPU, 0% system CPU, 14% idle CPU, _all the time_, when I
run vmstat *once*.  If I run "vmstat 2 10", or any other permutation that
causes it to look at cpu usage more than once, it reports the 0/0/14 on
the first pass and then reports accurate numbers on each subsequent pass.
WTF is going on here??  Like I said, it works normally on my SPARC-4
running Solaris 2.7.. seems to be a linux-specific issue.

Here's the vmstat output for you to look at:

[sstone@example.com sstone]$ vmstat 1 10

   procs memory swap io system cpu
 r b w swpd free buff cache si so bi bo in cs us sy id
 0 0 0 6744 1852 10952 6604 0 0 0 0 7 4 0 0 14
 0 0 0 6744 1852 10952 6604 0 0 0 0 107 12 1 2 97
 0 0 0 6744 1852 10952 6604 0 0 0 0 106 10 1 2 97
 0 0 0 6744 1852 10952 6604 0 0 0 0 106 12 2 1 97
 0 0 0 6744 1852 10952 6604 0 0 0 0 108 14 1 2 97
 0 0 0 6744 1852 10952 6604 0 0 0 0 106 10 2 1 97
 0 0 0 6744 1852 10952 6604 0 0 0 0 106 12 1 2 97
 0 0 0 6744 1852 10952 6604 0 0 0 0 106 10 2 1 97
 0 0 0 6744 1852 10952 6604 0 0 0 6 120 16 1 3 96
 0 0 0 6744 1852 10952 6604 0 0 0 0 106 12 2 1 97 
[sstone@example.com sstone]$ vmstat

   procs memory swap io system cpu
 r b w swpd free buff cache si so bi bo in cs us sy id
 0 0 0 6744 1852 10952 6604 0 0 0 0 7 4 0 0 14

[sstone@example.com sstone]$ vmstat

   procs memory swap io system cpu
 r b w swpd free buff cache si so bi bo in cs us sy id
 0 0 0 6744 1852 10952 6604 0 0 0 0 7 4 0 0 14 

[sstone@example.com sstone]$ vmstat

   procs memory swap io system cpu
 r b w swpd free buff cache si so bi bo in cs us sy id
 0 0 0 6744 1852 10952 6604 0 0 0 0 7 4 0 0 14

[sstone@example.com sstone]$

--------------------------
Scott M. Stone, CCNA <sstone@example.com>
UNIX Systems and Network Engineer
Taos - The SysAdmin Company 


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links