Thread: vmstat on Solaris?

  1. #1
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545

    vmstat on Solaris?

    From the description in man, it looks like vmstat is the command I'd use to see the memory statistics on Solaris, but I'm not sure how to use it or read the output.
    The man page says the -S K or -S M switches should display the numbers in KB or MB, but I tried both and the numbers are exactly the same.

    All I really want to know is how much total memory the system has and how much free memory is available. I also tried the free command, but it's not installed.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    According to this, -S is for swap activity, not a size selection.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Salem View Post
    According to this, -S is for swap activity, not a size selection.
    Damn. I was looking at the man page on my Linux system and thought it was a common enough command that the parameters would mean the same thing...

    Do you know how I'd tell how much physical RAM the system has?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    I didn't see anything in the sar man pages about total memory. Although when I run it I just get an error anyways.
    Someone else suggested prtconf which works perfectly.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Solaris SMF problem?
    By cpjust in forum Tech Board
    Replies: 0
    Last Post: 02-24-2009, 01:46 PM
  2. Use system() in Solaris
    By y0gus in forum Linux Programming
    Replies: 3
    Last Post: 02-02-2009, 02:52 PM
  3. Solaris 10
    By anirban in forum Tech Board
    Replies: 4
    Last Post: 07-27-2007, 12:31 AM
  4. mkdir - solaris 10
    By StevieT in forum C Programming
    Replies: 4
    Last Post: 08-17-2006, 03:36 AM
  5. Fatal error with solaris socket
    By WaterNut in forum Linux Programming
    Replies: 10
    Last Post: 05-26-2005, 01:12 PM