high load alert - vmstat

Post Reply
tane
Junior Member
Posts: 4
Joined: 17 Apr 2008, 02:46

high load alert - vmstat

Post by tane »

I'm just wondering if I can get a 'vmstat 1 10' or such with a high load alert, because on most of the systems I administrate the vmstat commands first line of output is a cache.

illustrated..:

[root@holiday csf]# date && vmstat 1 1
Fri Jun 26 11:51:56 NZST 2009
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 398580 1009028 28476 265884 16 13 94 46 2 1 5 0 92 3


[root@holiday csf]# date && vmstat 1 1
Fri Jun 26 11:52:07 NZST 2009
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 398580 1007116 28500 265980 16 13 94 46 2 1 5 0 92 3


[root@holiday csf]# date && vmstat 1 1
Fri Jun 26 11:52:37 NZST 2009
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
1 0 398580 1007444 28560 266580 16 13 94 46 2 1 5 0 92 3


[root@holiday csf]# date && vmstat 1 5
Fri Jun 26 11:52:47 NZST 2009
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 398580 1005828 28584 266920 16 13 94 46 2 1 5 0 92 3
0 0 398580 1006052 28592 266912 0 0 12 96 1035 184 7 1 91 1
0 0 398580 1006500 28592 266912 0 0 0 0 1034 90 0 0 100 0
1 0 398580 1007076 28592 266912 0 0 0 0 1012 207 0 0 100 0
1 0 398580 1007028 28592 266912 0 0 0 0 1036 386 5 0 95 0

As you can see from the above, swap/io/system/cpu values aren't truly reflected with a 'vmstat 1 1'

ideas?
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

I'll look into either adding additional iterations or making it configurable as a wishlist item.
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

After a bit of thought, there's a simply way to do this. Amend:

VMSTAT = "/usr/bin/vmstat"

to:

VMSTAT = "/usr/bin/vmstat 1 10"

Then restart lfd.
tane
Junior Member
Posts: 4
Joined: 17 Apr 2008, 02:46

Post by tane »

only just spotted this :) thanks!
Post Reply