I have to get (via command line) the number of interrupts per seconds in a given moment (OpenBSD 5.5 amd64).

I noticed that the number shown by vmstat is different from the one shown from systat. For example, here are the interrupts shown from systat:

 Interrupts
16457 total
  400 clock
    1 ipi
 7894 em1
    1 ehci0
 8161 em3
      ehci1
      ahci0
      ichiic0

And at the same moment this is the output of vmstat:

 procs    memory       page                    disks    traps          cpu
r b w avm fre flt re pi po fr sr sd0 sd1 int sys cs us sy id 1 2 0 35852 7717980 269 0 0 0 0 0 0 0 12181 499 23 0 13 87


It seems that the systat values are more realistic but I wasn't able to "capture" them in a non interactive way. It seems that "-b" or "-B" options don't work in the "vmstat" view of systat. As I specify the "-b" or "-B" options the only output is:

2 users Load 0.29 0.33 0.33 Wed Jan 28 11:35:11 2015


So:

1) Is there a way to capture the "systat vmstat" output?

2) Why systat and vmstat give different values?


Thanks.

Reply via email to