Monitoring Swap Space

Somehow we need to check how our swap space is being used. We can't check it in the same way we would check a filesystem. The reason for this is that when a swap area is created, whether it's a raw partition or a file, we simply create the “full thing” and pass it onto the system to use as it sees fit. For example, earlier we defined a disk partition that was around 80 MB in size. At this time, we have no idea how full it is. Similarly, we created a 100 MB swap file. Utilities such as df and du will report its size correctly, but again will be unable to tell us how much of it is actually used at present.

So, now let's look at some ways of determining what's happening with swap. First, we can see the current swap allocation ...

Get Solaris™ Operating Environment Boot Camp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.