Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • If you have solaris 9, try kstat. Solaris 8 has kstat too but you'll need to get the kstat module off of CPAN.

    • by djberg96 (2603) on 2003.02.03 13:41 (#16669) Journal
      Is prtdiag just another subset of kstat? I wasn't sure. I didn't see anything for getting the cpu temp, for example, although the man page doesn't strike me as complete.

      I downloaded Solaris::Kstat but it's only good for 2.5, 2.6 and 2.7 (so it says). At least that tells me I need to watch out for using kstat functions that aren't in older versions of solaris. I'm sure I'll be able to get some ideas from it, although the documentation is a bit lacking IMHO.

      Hopefully, Sun will provide smaller libs in the future for us mediocre C programmers (such as sys/loadavg.h, available since 2.7) so that we don't have to decipher kstat.h. Right now, comp.unix.solaris is a very good friend. :)

      • ah, right...kstat, the command utility is in 8 as well. The library is pretty much the same across 2.5->9 but the kstat utility, which is perl I might add, is in 8 and up. I didn't think prtdiag had the environmental output before solaris 8 or with earlier sun4u boxes. envctrl_temp is the kstat instance that you want but I'm not sure if the kstat utility will grab that or not...though, since it's perl, you can probably make it do what you need.