The swap utility provides an administrative interface to the management of the system swap areas. A standard swap partition which is not under the volume manager control cannot be resized, but swap space can be added using swap files.
Create a swapfile of 512MB in /local:
mkfile 512M /local/swapfile01
Add the swap to system swap space:
swap -a /local/swapfile01 swap -a /dev/dsk/c0t0d0s1
Add /etc/vfstab entry to add the swap space to make sure it is recognized after reboot:
/local/swapfile01 - - swap - no - /dev/dsk/c0t0d0s1 - - swap - no -
Delete a swap space:
swap -d /local/swapfile01 swap -d /dev/dsk/c0t0d0s1
The /etc/vfstab entry has to be removed after removing the swap space.
List swap space:
List swap space statistics: