Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: Peter  Delgado <Peter.Delgado@sdrc.com>
Subject: Re: Which hardware do I have ?
Date: 1995/09/11	[thread overview]
Message-ID: <431tp9$eqn@info1.sdrc.com> (raw)
In-Reply-To: pwerf.56.017C8ECA@gak.nl

Peter,
for the specific hardware (cpu, graphics card etc..) see the manpage on
the "sizer" command.  For memory etc., try using the following C program
as an example of how to get the information.  Check the manpage for the 
getsysinfo command to see all of the information available and design your
own program that suits your needs.

-Pete

To Make:  cc -std1 -O3 -tune (programname.c) -o programname
--------------------------------------------------------------------------------

#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/sysinfo.h>
#include <machine/hal_sysinfo.h>


int main(int argc, char *argv[])
{
int     TotalMemory;


if (getsysinfo(GSI_PHYSMEM,&TotalMemory,(unsigned long)(sizeof(int)),0,NULL)
!=-
1)
   {
   TotalMemory += 512;
   fprintf(stdout,"Total Memory = %d MB\n",TotalMemory/1024);
   exit(0);
   }
perror("PHYSMEM");
exit(1);
}

-------------------------------------------------------------------------------
Pete Delgado                                      The opinions expressed are
Software Engineer                                 my own and do not reflect
Structural Dynamics Research Corporation          the official opinions of
2000 Eastman Drive                                SDRC.
Milford, Ohio 45150
                                                  No user 
                                                  servicable parts inside!
e-mail:  Peter.Delgado@sdrc.com

-------------------------------------------------------------------------------




  reply	other threads:[~1995-09-11  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-09-11  4:00 Which hardware do I have ? Peter van der Werf
1995-09-11  4:00 ` Peter Delgado [this message]
1995-09-11  4:00 ` Peter R David
1995-09-12  4:00 ` Igor Skapinker
1995-09-12  4:00 ` Peter Delgado
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