Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cbmvax!grr From: grr@cbmvax.UUCP (George Robbins) Newsgroups: comp.unix.ultrix Subject: Re: How do you identify VAX/PMAX cpu's from software? Keywords: CPU identification Message-ID: <7015@cbmvax.UUCP> Date: 30 May 89 20:14:48 GMT References: <40619@bbn.COM> <105@asihub.UUCP> <7005@cbmvax.UUCP> <1242@riscy.dec.com> Reply-To: grr@cbmvax.UUCP (George Robbins) Distribution: na Organization: Commodore Technology, West Chester, PA Lines: 30 In article <1242@riscy.dec.com> frank@croton.DEC.COM (Frank Wortner) writes: > In article <40619@bbn.COM>, fkittred@bbn.com (Fletcher Kittredge) writes: > > In article <105@asihub.UUCP> dan@asihub.UUCP (Dan O'Neill) writes: > > > Is there a way to determine the class of a VAX or PMAX cpu under > > > Ultrix?... > > > > Well, I don't have access to all of these systems, so this is a guess. Try > > the uname() system call and check the resulting structure... > > Fletcher, you are right. Ultrix uname does exactly the minimum you describe. > Unfortunately, it does not descriminate amoung the various CPU implementations > That is, uname will say that the machine is a VAX, but nothing more. It could > be a 780, 3600, or whatever. I'm afraid that bit-twiddling of magic words > obtained from the kernel is needed to get more information. Not too mysterious, the kernel variables _cpu, _cpu_subtype and mayhaps _cpu_sub_subtype seem to be the basic story. Values for cpu and subtype show up in /sys/vax/cpu.h. Of course there's no promise that the values in a putative /sys/pmax/cpu.h don't overlap. To emphasize an earlier point, this is not the kind of stuff that an application should be looking at. Unless there's some really good reason for peeking under the skirts, the application should be insensitive to cpu type or should a least view the matter as on of attributes rather than instances. -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing arpa: cbmvax!grr@uunet.uu.net Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)