Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Paul Henderson <henderson@unx.dec.com>
Subject: Re: How to get model name of system?
Date: 1996/03/12	[thread overview]
Message-ID: <3145AC25.167E@unx.dec.com> (raw)
In-Reply-To: 4i1qer$14h@zk2nws.zko.dec.com

Steve Lionel wrote:
> 
> In article <EDANA.96Mar6122422@allegro.cs.tufts.edu>,
> 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
<machine/cpuconf.h>).

Here's a code snipet for a similar operation (to get the amount of
physical memory):

#include <sys/sysinfo.h>
#include <alpha/hal_sysinfo.h>

int physmem;
getsysinfo ( GSI_PHYSMEM, (caddr_t)&physmem, sizeof (physmem));



  parent reply	other threads:[~1996-03-12  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EDANA.96Mar6122422@allegro.cs.tufts.edu>
1996-03-11  5:00 ` How to get model name of system? Steve Lionel
1996-03-12  5:00   ` Dan Pop
1996-03-12  5:00   ` Paul Henderson [this message]
1996-03-12  5:00     ` Steve Lionel
     [not found]     ` <4i4eb1$te0@zk2nws.zko.dec.com>
1996-03-14  5:00       ` DEC Auth Srvr Lyn Kempter
1996-03-12  5:00   ` How to get model name of system? Thilo Kielmann
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox