Page 1 of 1

high load alert - vmstat

Posted: 26 Jun 2009, 00:54
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?

Posted: 02 Jul 2009, 16:53
by chirpy
I'll look into either adding additional iterations or making it configurable as a wishlist item.

Posted: 13 Jul 2009, 10:21
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.

Posted: 23 Aug 2009, 23:26
by tane
only just spotted this :) thanks!