From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079079016265.tru64-unix-managers.marc@archive.invalid> From: Greg Mohney Date: Fri, 22 Oct 1999 20:16:36 +0000 To: tru64-unix-managers Subject: DU4.0D VMSTAT Command X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079079016265 Hello gurus, This post may fall into the 'general UNIX question' category, so I apologize in advance if this is not the appropriate forum. This is my first post, so I'll use that fact as an excuse. :-) I work as a government contractor, doing systems engineering on a slew of DEC boxen. One of my projects currently involves writing small, cross-platform shell scripts that gather critical system data. My previous UNIX experience has been primarily Linux and other BSD-ish systems, and the output produced by the 'vmstat' command is confusing me. Specifically, I need to write a shell script that will return one value, the amount (as a percentage) of physical memory and swap space in use. This will obviously involve a few simple commands, most likely 'vmstat' piped into awk, with a couple of expr() calls. However, vmstat does not display memory information in a way that I am familiar with. The vmstat man page assumes an understanding of the terms used to describe the state of physical/virtual memory on the system. Statistics like "act", "free", "wire", are all giving me a headache. What I need to do, essentially, is figure out which columns from vmstat output display a "debit" of memory, and which display a "credit" (I know Im probably embarrassing myself by using economic terms to describe memory on a DEC system, but it's actually a fair analogy.) Under Linux, for example, the following statistics are provided: Total Memory Free Memory Buffered Memory Cached Memory I know that Buffered/Cached memory is a "credit", so my shell script would add "Free", "Buffered", and "Cached" together, and get the percentage of "used" memory from there. But 'vmstat' is (IMHO) a bit more arcane in its reporting (probably a hold over from VMS?) At any rate...I don't expect any huge discourses on usage and explanation of everything associated with memory under DEC/Tru64 Unix, but it would be nice to get a general sense of which "columns" displayed in vmstat output are relevant to the info I need to know, or at least a pointer to some docs that would explain the way memory/swap is handled/reported on in the DEC environment (for someone who doesn't have a fundamental understanding, like me). Im also unsure about physical memory, is it's status reported by vmstat as well? Or does vmstat only handle virtual (swap) memory? Sorry for the long post, and thanks in advance. Greg Mohney -- -------------------------------------------------- Greg Mohney, Systems Engineer Sterling Software, Information Technology Division E-mail: Greg.Mohney@sterling.com Phone: (402) 232-7840 --------------------------------------------------