tags:

views:

35

answers:

2

Looking for a very simple thing to do in Solaris.

I have a solaris box which has lot of zones ( so not only the host box, also the total available including zones ), i would want to see

  • What is the total memory available, used and free.
  • What is the total swap available, used, and free.

Am a linux guy, top gives me everything in Linux. What is the command to do it in Solaris.

Note: I cannot install any commands, so please tell me with the basic available commands that ship with OS installation.

+1  A: 

One of them is prtdiag. Others like vmstat, iostat also worth taking a look

ghostdog74
no above command is exact... I require it straight forward, like 1GB memory available 780 MB used. 2GB swap available, 200 MB used.Or atleast give me exact commands which can give me a good idea of available and used. prtdiag -v shows available memory. ( but where to find currently used [ including all zones ] ?! )vmstat shows available swap. ( but where to find current usage ?! )+1 for am able to see all available now.
thegeek
top is available for Solaris also, and current usage, do some shell scripting and calculate that value yourself.
Anders
+2  A: 

You really want prstat - it does what top does, but it can take setting some switches to get what you want. For example prstat -L for lwp's.

The display is very much like top. And if you require to look like top exactly then you will have to script things together. Linux is BSD, Solaris is system V. A different world.

In general, the the unix rosetta stone helps finding 'commands like xxx from zzz on yyy unix':

http://bhami.com/rosetta.html

jim mcnamara
Yes, "prstat -Z" will be particularly useful for a machine with a lot of zones.
jlliagre