From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078721911519.tru64-unix-managers.marc@archive.invalid> From: "Hakim, Shlomo" Date: Tue, 01 Sep 1998 09:31:03 +0000 To: tru64-unix-managers Subject: [SUMMARY] Figuring out the amount of physical memory X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078721911519 Hi, I got a bundle of answers for my question, most of which had to do with "uerf -R" and then grep-ing for one string or another. Some of you suggested to grep the /var/adm/messages file for the same info. The ones I really liked were the following: Trevor Parry gave me the "vmstat -P" which gives a very nice summary of the physical memory usage. The "-P" option is not specified in the vmstat(1) man page which is a petty. Richard Bemrose contributed the following piece of code: -- cut -- /* Returns the amount of physical memory * Specific to Digital UNIX (OSF1) * Aurthor: Richard Bemrose * Date : 31/08/1998 * Address: Polymers and Colloids Group, Cavendish Laboratory University of Cambridge, Cambridge, CB3 0HE, UK */ #include #include #include #include void main(int argc, char **argv) { int memsize; struct utsname arch; uname(&arch); getsysinfo(GSI_PHYSMEM, &memsize, sizeof(memsize), NULL, NULL); printf("%s has %d Mb of physical memory\n", arch.nodename, memsize/1024); } -- cut -- This is exactly what I was looking for since I want to get the information within a script rather than just look at it myself. Thank you all, Shlomo. -----Original Message----- From: Hakim, Shlomo [mailto:shlomo_hakim@icomverse.com] Sent: Sunday, August 30, 1998 10:47 To: 'Alpha OSF Managers' Cc: Garfinkel, Yair Subject: Figuring out the amount of physical memory Dear Gurus, Does anyone know a way to figure out the amount of physical memory in a DU4.0x machine while it is running. All mean are Kosher i.e. shell command or system call. Thanks, Shlomo.