![]() # autoconf (optional - used by munin-config)ĬOMPONENT_PID_FILE="/var/run/apache2.pid"Įcho "graph_title $COMPONENT_NAME memory usage"Įcho "graph_info This graph shows the amount of memory used by the $COMPONENT_NAME processes"Įcho "$_vmrss. Note: this only monitors the main apache process, and doesn't show the memory usage of it's child processes. The graph it outputs looks like this (VmPeak and VmSize are the same in this example, so you only see one of them): You can change this to suit your needs (just point to the right PID file and change the component name as needed). Here's an example of a munin plugin to track VmPeak,VmRSS and VmSize memory usage, for the apache process. Here is a quick example free -m total used free shared buffers cached Mem: 7976 6459 1517 -/+ buffers/cache: 3344 4631 Swap: 1The m option displays all data in MBs. Munin comes with many default plugins to track system resources, however it doesn't come with a plugin to track Peak memory usage - fortunetly, its extremely easy to write a plugin for it. The free command is the most simple and easy to use command to check memory usage on linux. This command will provide you with a detailed view of the system’s memory usage. Memory usage analysis can be exported to graphical charts such as bar and pie graphs. It utilizes proportional set size (PSS) metric to accurately quantify effective memory usage of Linux processes. First, you’ll need to run the SAR command, which stands for System Activity Report. The smem command allows you to measure physical memory usage by different processes and users based on information available from /proc. In order to track the memory usage of a process over time, you can use a tool called munin to track, and show you a nice graph of the memory usage over time. Checking memory usage in SAR Linux is a fairly simple process. VmPeak is the maximum amount of memory the process has used since it was started. Suppose you need to know how the sshd process is mapped in memory. ![]() Cheat sheet: Old Linux commands and their modern replacements Check a process. (Change $PID to the actual process id you're looking for). Sometimes, the next step in getting a report on processes is exploring a single process' memory map. ![]() You can get the peak memory usage of a certain process, at: grep VmPeak /proc/$PID/status
0 Comments
Leave a Reply. |