All Unix's are not created equal
By user12618589 on May 08, 2008
Working for Sun I normally prefer Solaris but as a Directory Engineer and Author of Dirtracer I need to understand and support the Directory and Dirtracer on the platforms the Directory Server is supported on; Windows is an exception.
When I created Stracer (Dirtracers predecessor) I wrote it only for Solaris. Solaris includes many commands that other Unix flavors don't and vice versa. Such commands include gcore, pstack, prstat and all proctool related commands.
How are they used?
- Gcore is a way to instantly drop a binary file that is equivalent to a process Core file; i.e. a Solaris Crash Dump.
- Pstack is a text based dump of the processes threads and the functions each thread was using when the pstack was taken.
- Prstat shows output of each threads size, run state and cpu% used.
All these commands are extremely useful when debugging memory leaks, high cpu issues or bottlenecks with operations. It is also a fundamental part of the Main (data gathering) Loop in Dirtracer.
Enough about Solaris for now.
The point of this blog was I thought I would mention not all of my posts are Solaris specific but some parameter sets used by Dirtracer may not apply to other flavors like Linux and HP-UX.
Linux and HP-UX have OpenSource ports of some of the above mentioned commands but they are untested (from me) and they would have to be installed on their respective OS's by the Customer/Admin so I cannot rely on them.
Dirtracer has the basic same code whether it is used on Solaris, Linux or HP-UX but if these commands are not found they are ignored. As a result, the Customer nor Sun Support cannot benefit from the availability of this data if it were available.