Command to Check Memory Usage in Linux




Smem is a commandline tool to check memory usage in Linux, processes, and also in percentage or in graphics.

smem is a tool that can give a lot of reports on memory usage in Linux system. Unlike other tools, smem can report proportional set size (PSS), which is a more meaningful representation of the amount of memory used by libraries and applications in a virtual memory system.

Smem features:
  • display system list
  • The list of processes, mapping, user
  • filtering by process, mapping, or users
  • configurable columns from the data source
  • configurable output units and percentages
  • configurable header and Total
  • read data directly from/proc
  • reading data snapshots from directory mirrors or compressed tarballs
  • Lightweight capture tool for embedded systems
  • built-in chart generation


Smem requirements:
  • The Linux kernel that provides the metrics ' Pss ' in/proc//smaps (generally 2.6.27 or later).
  • Python 2.x (at least 2.4 or higher).
  • Library matplotlib (only if you want to generate a graphical chart).
Smem install on Ubuntu
Run the following command in Terminal to install the latest version from smem tools:
sudo apt-get update
sudo apt-get install smem

Using smem in Ubuntu
Smem after successfully installed, users can use it easily. Smem is a commandline tool and can be accessed through the Terminal. The user can map memory usage. By default, smem will show any running processes and memory used. Here you start to pay attention to the report of the memory that is used, The following command you run:
$ smem -m


If you want to see memory usage on particular application you can type commands in the terminal as below
$ smem -m -p | grep firefox


Displays the memory usage in the media pie chart
$ smem --pie name -s rss

And many more commands in the tools that this one,, later I will continue to discuss it. hope this is helpful.


Next
Previous
Click here for Comments

0 comments: