Reading VAX SID register on ultrix or 4.3bsd

Root Boy Jim rbj at icst-cmr.arpa
Sat Apr 23 07:21:46 AEST 1988


   From: Chris Torek <chris at mimsy.uucp>

   >In article <561 at neptune.AMD.COM> katni at neptune.AMD.COM (Katni V) writes:
   >>  I need to read the VAX SID register.  Is there a system function ...

   It will need more than that; the super user is still a user.  I
   am not sure why you would want to do this; the SID register is
   grossly cpu-dependent and cannot be used as a serial number for
   software registration purposes, as some Vaxen do not have anything
   resembling a serial number in the SID (just various revision numbers).

True, but it is likely that a given site might have all different `serial
numbers'. This could be used, say, to divine the machine's hostname, allowing
one copy of /etc/rc to be rdist'ed everywhere. Granted, the motivation for
doing this is slight (and one could put the hostname line in it's own file
and invoke it as `sh /etc/rc.hostname'), but someone might want to.

   If all you want is the CPU type, read the kernel variable `cpu'.
   It will be one of the VAX_xxx's defined in <vax/cpu.h>.

Good point. In fact, why not just have locore.s grab the SID shortly
after boot and stick it into a global variable `sid'? I seem to remember
Chris long ago railing against myriad of `get interesting kernel variable'
system calls. I would imagine his opinion has not changed on that matter.

   In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
   Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris

	(Root Boy) Jim Cottrell	<rbj at icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
	The opinions expressed are solely my own
	and do not reflect NBS policy or agreement
	It don't mean a THING if you ain't got that SWING!!



More information about the Comp.unix.wizards mailing list