User Tools

Site Tools

Please note, that this is an old archived version of this site. Check out the new version at!

Memory Usage of a Solaris Container (Zone)

Last week one of my servers ran out of RAM and Swap. Shame on me for not monitoring that, but it's now.

As the server is running several zones, my first question was: Which zone is eating up my RAM? So, here are the commands I used.

Part 1: Find the Zone

To see the memory usage of the running zones:

prstat -Z

From the prstat(1M) man page:

  • -Z Report information about processes and zones. In this mode, prstat displays separate reports about processes and zones at the same time.

Part 2: Find the Process(es) in the Zone

To see which processes use the most RAM in the zone, use one of these commands:

prstat -z zone -s rss
prstat -z zone -s size

From the prstat(1M) man page:

  • -z zoneidlist Report only processes or LWPs whose zone ID is in the given list. Each zone ID can be specified as either a zone name or a numerical zone ID. See zones(5).
  • -s key Sort output lines (that is, processes, lwps, or users) by key in descending order. Only one key can be used as an argument.
    • rss Sort by resident set size.
    • size Sort by size of process image.

Note the upper case -Z in the first an the lower case -z in the second command.

For more information about prstat, see the manual prstat(1M).

blog/2010/memory_usage_solaris_container_zone.txt · Last modified: 2010-04-21 08:17 (external edit)