[rescue] sun4d temp

Skeezics Boondoggle skeezics at q7.com
Tue Jun 4 14:00:42 CDT 2002


On Tue, Jun 04, 2002 at 11:46:15AM -0400, Michael Schiller wrote:
> I know that the sun4d machines (SS1000, SC2000,etc) have temp sensors
> under each CPU module, and will shut down the machine if the temp goes
> over 55c. I was wondering if there's any way to access these sensors so
> I can see how close to that temp the machine is? 

The only sun4d I currently have access to is running Solaris 2.5.1.  
Poking around with prtdiag and "netstat -k", there's no indication that 
temperature stats are available... perhaps they exposed the environmental 
stuff for sun4d in 2.6 or later?

Look at libkstat - there's tons of kewl stuff in there.  If you grep
through the copious output of "netstat -k" on a later Solaris look for a
node called "temperature".  I wrote various programs to hook into Cricket
that use libkstat to pull out temperature stats and avoid the fragile and
slow "parse prtdiag output with grep" method... and with the Sun-provided
Perl in Solaris 8 you can even get at this stuff with the Solaris::Kstat
module (or just compile up the one on CPAN - although I had to hack in
temperature support by hand for Solaris 7).  On an E4500, for example:

id=204, module='unix', inst=16, class='misc', name='temperature'
id=205, module='unix', inst=16, class='misc', name='temperature override'
id=207, module='unix', inst=0, class='misc', name='temperature'
id=208, module='unix', inst=0, class='misc', name='temperature override'
id=209, module='unix', inst=2, class='misc', name='temperature'
id=210, module='unix', inst=2, class='misc', name='temperature override'
id=211, module='unix', inst=4, class='misc', name='temperature'
id=212, module='unix', inst=4, class='misc', name='temperature override'
id=213, module='unix', inst=6, class='misc', name='temperature'
id=214, module='unix', inst=6, class='misc', name='temperature override'
id=215, module='unix', inst=1, class='misc', name='temperature'
id=216, module='unix', inst=1, class='misc', name='temperature override'
id=217, module='unix', inst=3, class='misc', name='temperature'
id=218, module='unix', inst=3, class='misc', name='temperature override'

"inst" just happily corresponds to the board slot; inst=16 is the system
(actually, clock board) ambient temperature.  I think the 'temperature
override' node allows you to melt your machine into a puddle of slag for
burn-in test or other brutal and nefarious factory procedures.

Ultimately it may be that you just can't get that info out of the kernel
on sun4d machines, although various sun4u platforms do make it easily
available in new-ish Solaris releases.  When my sun4d/cray4d machines
arrive and I get 'em running I'll definitely take a look at this issue
again, since I too would like to have graphs/alerts when temperatures get
too toasty. :-)

-- Chris



More information about the rescue mailing list