How to list the status of swap in Solaris

List the status of all swap areas.

# swap -l
swapfile dev swaplo blocks free
dev/dsk/c0t0d0s1 32,9 16 8425712 8425712

The output has five columns:
path
The path name for the swap area.

dev
The major/minor device number in decimal if it is a block special device; zeroes otherwise.

swaplo
The swaplow value for the area in 512-byte blocks.

blocks
The swaplen value for the area in 512-byte blocks.

free
The number of 512-byte blocks in this area that are not currently allocated.

To find the status of total swap usage use the -s option.

# swap -s
total: 180928k bytes allocated + 28456k reserved = 209384k used, 10691424k available

List the status of all the swap areas. The output has five columns:

path
The path name for the swap area.

dev
The major/minor device number in decimal if it is a block special device; zeroes otherwise.

swaplo
The swaplow value for the area in 512-byte blocks.

blocks
The swaplen value for the area in 512-byte blocks.

free
The number of 512-byte blocks in this area that are not currently allocated.

The total amount of swap space in bytes currently allocated for use as backing store.

reserved
The total amount of swap space in bytes not currently allocated, but claimed by memory mappings for possible future use.

used
The total amount of swap space in bytes that is either allocated or reserved.

available
The total swap space in bytes that is currently available for future reservation and allocation.

These numbers include swap space from all configured swap areas as listed by the -l option, as well swap space in the form of physical memory.

About Andrew Lin

Hi, I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects. Andrew Lin

View all posts by Andrew Lin →