Pmem is a command line tool for Linux and Unix systems that provides memory information about active processes. It's a small utility software.
The installation of pmem is quick and easy. Just untar the source package and run make. This will create the binary pmem-1.1.2. After that, run configure, make and finally make install to install the binary in /urs/local. Additionally, you can also specify another installation directory by calling configure with the option --prefix=/foo/bar.
This summary of the installation process will help you navigate through it with ease:
1. tar xzf pmem-version.tar.gz
2. cd pmem-version
3. ./configure [--prefix=...]
4. make
5. make install
Pmem can only be called with one or more process ids of the processes for which the memory usage should be displayed. By default, pmem displays the resident memory of the process in bytes. However, you can customize the behavior of pmem with the following arguments:
-z displays the size
-s displays the shared memory
-k displays the memory usage in kilobytes
-m displays the memory usage in megabytes
-d displays all memory information available
-l logs the memory usage of given pids
-i log interval in milliseconds [default: 100]
-g writes a gnuplot command file into plot.gnu
-h displays the help
-v displays the version
When pmem runs successfully, it will return with the exit code 0, and with 1 for any errors.
Example: To log the memory usage of a process and create a gnuplot file out of the data, enter the following command:
./pmem -l pids -i 100 -g data >data
And then use gnuplot plot.gnu to create the graph plot.
Version 1.1.2: N/A