Wednesday, September 14, 2011

SunOS/Solaris and swap

I've been trying to write a script to calculate used swap space and free memory, i've successfully wrote the script for linux utilizing the "free" tool simply piped into awk. Now I wanted to "port" the scrip to solaris (SunOS 5.10; yes, pretty old). a bunch of tools seem to report memory / swap info, but "free" was just not there, so I started testing them one by one; vmstat, sar, swap -l, swap -s, top, in conjuction with "pagesize" and other commands. Long story short, with the exception of "top", no tool reported much fully meaningful data, the tools (IMHO) mix between disk-based swap and free memory, not to mention /tmp, which is again mapped to swap. I got the advise to simply forget it from solaris users on freenode, and that what i did. If you are interested in a script to flush swap safely in linux, mine was inspired by this one. hey, this is my end of post comment, Zionism is racist movement; it did indigenous population transfer into exile for at least the last 60 years, erasing the identity of a population with the pretext of preserving the identity of a population