Download memstat 0.1 / Mail me, jyelon@uiuc.edu / Back to my Software Page


memstat --- utility to display memory statistics

memstat lists all the processes, executables, and shared libraries that are using up virtual memory.

First, the processes are listed. An amount of memory is shown along with a process ID and the name of the executable which the process is running. The amount of memory shown does not include shared memory: it only includes memory which is private to that process. So, if a process is using a shared library like libc, the memory used to hold that library is not included. The memory used to hold the executable's text-segment is also not included, since that too is shareable.

After the processes, the shared objects are listed. An amount of memory is shown along with the filename of the shared object, followed by a list of the processes using the shared object.

Finally, a grand total is shown. Note that this program shows the amount of virtual (not real) memory used by the various items.

meminfo gets its input from the /proc filesystem. This must be compiled into your kernel and mounted for meminfo to work. The pathnames shown next to the shared objects are determined by scanning the disk. meminfo uses a configuration file, /etc/meminfo.conf, to determine which directories to scan. This file should include all the major bin and lib directories in your system, as well as the /dev directory. If you run an executable which is not in one of these directories, it will be listed by meminfo as ``unknown''.


Download memstat 0.1 / Mail me, jyelon@uiuc.edu / Back to my Software Page