From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,630e7c9211e092fd X-Google-Attributes: gidfee84,public From: mjr19@phy.cam.ac.uk (Michael Rutter) Subject: Re: Way to show RAM size from shell? Date: 1996/08/10 Message-ID: <4uiisf$mol@lyra.csx.cam.ac.uk>#1/1 X-Deja-AN: 173382439 references: <320A6D0D.41C6@panbio.com> organization: University of Cambridge newsgroups: comp.unix.osf.osf1 In article <320A6D0D.41C6@panbio.com>, Daniel Hillman 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. You could consider writing one. The following is not pretty, but it might provoke some thoughts in the right direction. It does assume that the target is a DEC Alpha running OSF/1 - the code is in no way portable, but it works for the purpose for which it was originally written :-) MJR /* Compile with cc -DULT_BIN_COMPAT foo.c */ #include #include #include main() { int memsize; getsysinfo(GSI_PHYSMEM, &memsize, sizeof(memsize), NULL, NULL); printf("This machine has %d Mb of memory.\n", memsize/1024); exit(0); }