Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: haymanr@icefog.alaska.edu (Randy M. Hayman)
Subject: Re: Way to show RAM size from shell?
Date: 1996/08/12	[thread overview]
Message-ID: <4uo0lp$g3s@news.alaska.edu> (raw)
In-Reply-To: 320A6D0D.41C6@panbio.com




Daniel Hillman (danielh@panbio.com) wrote:
|> I am trying to find a way to display the amount of RAM on a 
|> DEC 3000 without resorting to the boot prom monitor.
|>
|> Anyone know of a shell-available
|> system command that will display amount of
|> RAM on board?
|>

take the following, compile it (cc -o physmem physmem.c), and place the
executable in your path:

#include <stdio.h>
#include <sys/sysinfo.h>

int     status, *int_buff;

main()
{
if( -1 == (status = getsysinfo(GSI_PHYSMEM,&int_buff,sizeof(int_buff),0,0)))
    fprintf(stdout, "error %d getting GSI_PHYSMEM\n", status);
else
    fprintf(stdout, "Physical memory: %d KB\n", (int)int_buff);
}



-- 
Randy M. Hayman					haymanr@icefog.alaska.edu
	"Ethernet works in practice but not in theory" -- Bob Metcalfe



  parent reply	other threads:[~1996-08-12  4:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-08  4:00 Way to show RAM size from shell? Daniel Hillman
1996-08-09  4:00 ` Stephen Stuart
1996-08-10  4:00 ` Michael Rutter
1996-08-14  4:00   ` Jonathan Oei
1996-08-10  4:00 ` A. Suleiman
1996-08-13  4:00   ` Paul Henderson
1996-08-12  4:00 ` Daniel Lewis
1996-08-19  4:00   ` J. Shane Kennedy
1996-08-12  4:00 ` Randy M. Hayman [this message]
1996-08-13  4:00   ` Rob Hooft
1996-08-14  4:00   ` Rob Hooft
1996-08-14  4:00     ` Chi Xiaochen
1996-08-14  4:00       ` Dan Pop
1996-08-15  4:00       ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-08-14  4:00     ` Freely Available Software (Digital UNIX) Randy M. Hayman
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