From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,25ef7f8f47a1b4b4 X-Google-Attributes: gidfee84,public From: Paul Henderson Subject: Re: How to get model name of system? Date: 1996/03/12 Message-ID: <3145AC25.167E@unx.dec.com>#1/1 X-Deja-AN: 142819965 references: <4i1qer$14h@zk2nws.zko.dec.com> content-type: text/plain; charset=us-ascii organization: Digital Unix Engineering mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 2.0 (X11; I; OSF1 X4.0 alpha) Steve Lionel wrote: > > In article , > edana@allegro.cs.tufts.edu (Eric Dana) writes: > |>Is there a way to get the model name of a system from C? > |>For example: model=4000/500 > > Call the SYS$GETSYI system service, asking for the SYI$_HW_NAME item code. > -- Gaak! Sounds like VMS ;-) The Unix equivalent is getsysinfo(2). Although this call won't give you exactly the model # that appears on the outside of the box, you can get the CPU type (field GSI_CPU), and the processor type (field GSI_PROC_TYPE, as defined in ). Here's a code snipet for a similar operation (to get the amount of physical memory): #include #include int physmem; getsysinfo ( GSI_PHYSMEM, (caddr_t)&physmem, sizeof (physmem));