[7044] in testers
Re: sysinfo missing
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Thu May 26 02:27:58 2005
Date: Thu, 26 May 2005 02:27:46 -0400 (EDT)
Message-Id: <200505260627.j4Q6RkmM004684@brad-majors.mit.edu>
From: Garry Zacheiss <zacheiss@MIT.EDU>
To: Jonathon Weiss <jweiss@MIT.EDU>
CC: testers@MIT.EDU
In-reply-to: "[7037] in testers"
>> athinfo 9.4-sun cpuspeed
>> is failing, becasue sysinfo is missing.
I took a look at this. sysinfo is failing to build because two of the
headers it uses on Solaris, <sys/comvec.h> and <sys/openprom.h>, no
longer exist on Solaris 10, and it's not immediately obvious what
interface has replaced them.
The most recent version of sysinfo, 5.1.3, claims to support Solaris 10,
but source for it is no longer available without purchasing a license,
which I don't think we want to do.
My recommendation is to punt sysinfo since the version we have is
ancient and just going to bitrot more without giving the vendor money,
and replicate the functionality of the cpuspeed query with an OS tool.
The easy way to do this is with psrinfo, although that does change the
format of the output:
[zacheiss@brad-majors] ~$ psrinfo -vp | grep MHz
UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x24 clock 1062 MHz)
would be the new output. Alternately, one could use prtdiag, which has
slightly less scary looking output:
[zacheiss@brad-majors] ~$ prtdiag | grep "MHz.*SUNW,"
0 1062 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 on-line MB/0
(the weird grep argument is to not pick up a stray "MHz" which is a
column heading in later output). Or, for the ultimate in backwards
compatability, we can massage prtdiag output into the same format as
sysinfo:
[zacheiss@brad-majors] ~$ prtdiag | grep "MHz.*SUNW," | sed -e 's/SUNW,/Sun /' | awk '{print " cpu"$1 " is a \"" $5,$6"\" "$2,$3 " CPU"}'
cpu0 is a "Sun UltraSPARC-IIIi" 1062 MHz CPU
Does anyone (Greg?) have a preferred course of action?
Garry