vmstat -SM doesn't work but vmstat -S M does

Solution Verified - Updated -

Issue

  • The vmstat program  does not use the standard getopt and, consequently, it does not work quite like a program should with regards to command line options.
  • For example, note that the "S M" arguments given to vmstat will not work unless a space is inserted between them.  Applications should be able to specify the option
    and option-argument in the same argument string without intervening <blank> characters:

    #vmstat -SM 5
    -S requires k, K, m or M (default is kb)
    
    #vmstat -S M 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    230     21     72    234    0    0     4     5    6    0  5  1 94  0  0
     0  0    230     21     72    234    0    0     0     6 1059  802  1  0 99  0  0
    

Environment

  • Red Hat Enterprise Linux 6 Beta1

  • procps-3.2.8-4.el6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.