0

I have Embedded Linux development board running a few userspace processes. When I run "vmstat 1" I see the following

# vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      0  51028      0   2788    0    0     0     0  293  441  0  0 100  0
 0  0      0  51016      0   2788    0    0     0     0  301  393  0  0 100  0
 0  0      0  51016      0   2788    0    0     0     0  381  382  0  1 99  0
 0  0      0  51040      0   2788    0    0     0     0  254  469  0  0 100  0
 0  0      0  51040      0   2788    0    0     0     0  277  488  0  0 100  0
 0  0      0  51040      0   2788    0    0     0     0  225  397  0  0 100  0
 0  0      0  51040      0   2788    0    0     0     0  310  824  0  1 99  0
 0  0      0  51016      0   2788    0    0     0     0  432  440  1  0 99  0

A reasonable number is shown for the amount of free memory and some memory is used for the VFS cache. Also since there is no swap partition, swpd is 0 as well as the si and so values.

The two values I never see any change in are bi (blocks received from block device) or bo (block sent to block device). Even when I load program from flash or write files to the flash. Is this expected? Has anyone seen these statistics change on an Embedded Linux device? I verified that it does change on my Ubuntu desktop.

Does anyone know where in procfs vmstat gets these statistics?

waffleman
  • 4,159
  • 10
  • 39
  • 63

1 Answers1

0

I don't know how it works. My embedded development system is based on ELDK 4.2. There is no vmstat configured and I don't see an option to enable it in BusyBox.

To find out on your system, maybe there is an strace utility? Try strace vmstat 1: if it works, it will tell you how vmstat works.

wallyk
  • 56,922
  • 16
  • 83
  • 148
  • vmstat is implemented in the kernel. According to this http://www.remote-dba.net/t_tuning_vmstat_utility.htm , the implementation of vmstat is vendor specific and it varies what is actually displayed. I have a feeling that my implementation is broke... – waffleman Sep 21 '11 at 15:04