Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Need to do the same thing.. parse the psinfo structure. An additional complication is that it also needs to run, almost out of the box, in a Linux machine (and I find that the /proc filesystems are not POSIX compliant)

    My solution, for now, is to actually install Proc::ProcessTable on the server, do a shell call from inside C to a script, parse the output from the script and then pack and send onto the client (this is for server process information). sysinfo (native C call) had possibilities, but didnt give enough information to be really useful.

    Any pointers appreciated.. :) thanks.

    • I found two good links. The first is a little C program called "qps" by Kurt Vogel (if I've read the attribution correctly). You can find that one here [sunmanagers.org]. I built it fine on my Solaris 9 box. Works fine - just make sure to run with the -A option to see for yourself that it does, indeed, extend past 80 characters.

      The other link, which I haven't looked at in depth yet but which looked promising, can be found here [sun.com]. It's from a Sun support forum and I think they took a different approach.

      Enjoy!

      • As a followup to my own followup, I should mention (and you'll discover pretty quick) that the code snippets I gave you were for Solaris only. I wasn't aware of the Linux limitation, nor do I know how to solve the problem on Linux, though I haven't searched at all.