pstat (BSD)
Print Statistics utility is useful for examining system tables and system swap space.
The command /etc/pstat –s, shows system swap space activity. An example output:
589944 used, 667364 free, 61864 wasted
avail (num*size): 316*2048 5*1024 6*512 13*256 21*128 38*64 54*32
Note: For a description of the output units, see your operating system guide or online MAN pages. On some machines output is in bytes (as in this example). On others it is in units equal to the machine’s page size.
The command /etc/pstat -T gives a list of used and free slots in various system tables. Here is a sample output:
1717/3216 files
937/2384 inodes
333/1300 processes
266/325 mfiles
595176/1256780 swap
The pstat utility can be used to give other useful information if the user has knowledge of the UNIX kernel. It can tell you, for example, the state of a running process, which files are open, which operating system locks apply and which processes have which files open.