Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!mordor!lll-tis!ames!ucbcad!ucbvax!UCIVMSA.BITNET!MIGLESIAS From: MIGLESIAS@UCIVMSA.BITNET Newsgroups: comp.os.vms Subject: Re: determining the CPU type of a VAX from a non-privileged program Message-ID: <8706301746.AA03614@ucbvax.Berkeley.EDU> Date: Tue, 30-Jun-87 16:33:04 EDT Article-I.D.: ucbvax.8706301746.AA03614 Posted: Tue Jun 30 16:33:04 1987 Date-Received: Wed, 1-Jul-87 07:34:18 EDT Sender: usenet@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 69 There's a real easy way of getting the CPU type from VMS and it requires very little work - get the SYI$_NODE_HWTYPE item with $GETSYI. This returns the cpu type as 4 characters. Here's what I have obtained with the short FORTRAN program at the end of this message: On a... Returns ---------------- ------------ Vax 11/785 V785 Vax 11/780 V780 Vax 11/750 V750 Vax 8200 8200 Vaxstation 2000 2000 (One could also use $ WRITE SYS$OUTPUT F$GETSYI("NODE_HWTYPE") but that's too easy! Besides the person who asked wanted to do it from a program) You can guess that it would return '8800' on an 8800, '8700' on an 8700, etc. Another benifit of using this is that you can ask what the cpu type is for any node in a cluster. I believe that the SHOW CLUSTER utility uses this for the HW_TYPE field. Since I don't have a wide array of systems to test this on, I could be wrong.... Mike Iglesias University of California, Irvine miglesias@ucivmsa.bitnet ------------------- Cut here for CPUTYPE.FOR ----------------------------- C C CPUTYPE - Print CPU type from the SYI$_NODE_HWTYPE item of SYS$GETSYI C C STRUCTURE /ITMLST/ UNION MAP INTEGER*2 BUFLEN INTEGER*2 CODE INTEGER*4 BUFADR INTEGER*4 RETLNADR END MAP MAP INTEGER*4 END_LIST END MAP END UNION END STRUCTURE C RECORD /ITMLST/ SYITEMS(2) C CHARACTER CPUTYPE*4 INTEGER*4 CPUTYLEN, SYS$GETSYIW, STATUS C INCLUDE '($SYIDEF)' INCLUDE '($SSDEF)' C SYITEMS(1).BUFLEN=4 SYITEMS(1).CODE=SYI$_NODE_HWTYPE SYITEMS(1).BUFADR=%LOC(CPUTYPE) SYITEMS(1).RETLNADR=%LOC(CPUTYLEN) SYITEMS(2).END_LIST=0 STATUS=SYS$GETSYIW(,,,SYITEMS,,,) PRINT *,CPUTYPE STOP END