Welcome to the Linux Foundation Forum!

LFS 201 - vmstat - Memory Monitoring and Usage

hello,
I came back after a period busy for work and later on after some weeks on vacatiion.

Just re-begun to study.

If delay is given in seconds, the report is repeated at that interval count times; if count is not given, vmstat will keep reporting statistics forever, until it is killed by a signal, such as Ctrl-C.

That's not true. I checked on both Debian and Centos: vmstat print just one line.

Comments

  • serewicz
    serewicz Posts: 1,000

    Hello,

    The operative part of the sentence is "If delay is given in seconds" If you don't give the delay, then it prints once. If you do give a delay it prints for that duration forever, unless a count is also given.

    $ vmstat -h
    Usage:
    vmstat [options] [delay [count]]
    $ vmstat 5
    procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
    r b swpd free buff cache si so bi bo in cs us sy id wa st
    0 0 0 26034960 65820 2452412 0 0 25 11 85 209 6 2 92
    0 0 0 26016564 65820 2458972 0 0 0 0 4645 6950 1 0 99 0 0
    2 0 0 26005168 65820 2459484 0 0 0 88 5086 8673 1 0 98 0 0

    And on and on.

    Regards,

  • ok,
    thank you for the clarification!

    Have a nice day!

  • serewicz
    serewicz Posts: 1,000

    Great!

    You too.

Categories

Upcoming Training