How to Monitor a Process in Linux With 12 Tools These

This time I will discuss the Tools or programs that exist in the operating system linux, for which often use linux operating system might be useful. Most Linux distributions come with some tools to monitor the performance of the system, be it computer networks or the state machine itself, such as: the process of what the service is running or anything that is in the machine. You can use these tools to find possible causes of performance problems. The commands discussed here are some of the most basic command when debugging server issues occur, such as:
  • Figure out the source of the problem.
  • Disk (storage) are problematic.
  • Resource usage and CPU or memory.
  • Computer network monitoring
top – the process Activities
The above programs provide a view of dynamic or real-time systems running IE processes the actual activity. By default, this displays the most intensive task that runs on the server and updates every five seconds once will renew a list of active processes.

For used, please type the commands in your linux terminal as below:


vmstat – system event, Hardware and information systems
Vmstat command is used to find out information about processes, memory, paging, block IO, traps, and cpu activity.

How to use it just type "vmstat" in the terminal.
Command to find out which Memory Slabinfo
#vmstat -m

Command to view an active paging memory
#vmstat -3

w – Knowing the User logged into the system
w is the command displays information about the current user on the machine, and the process.

examples of their use are as follows:
#w <username>

uptime – view the uptime of the system
The uptime command can be used to see how long the server has been running. The current time, how long the system has been running, how many users are currently logged in, and the average system load that has been used.

examples of their use are as follows:

ps – Display running processes
the ps command will report a snapshot of the current processes. To select all processes using the -A or -e option:
#ps -A

free - Showing the unused Memory
The command free displays the amount of total physical memory and swap free and used in the system, as well as the buffers used by the kernel.

iostat – Displays the average CPU load, Disk Activity
Iostat command used (CPU) statistics and input/output statistics for devices, partitions and network filesystem (NFS).

sar – Collects and reports System Activity
The sar command is used to collect, report, and save the system event information. To see network counter, enter:
#sar -n DEV | more

To display the network counters date 20
#sar -n DEV -f /var/log/sa/sa20 | more

You can also display the real time usage using sar:
#sar 4 5

mpstat – use of multiple processors
Mpstat command display activities for each available processor, processor 0 being the first. mpstat-P ALL to display average CPU usage per processor:
#mpstat -P ALL

pmap – the process Memory Usage
The command pmap report memory map of a process. Use this command to find out the cause of the memory bottlenecks.
#pmap -d PID

To display the information of the memory process pid # 47394, enter:
#pmap -d 47394

Netstat and ss – Network Statistics
The command "netstat" display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.

"ss" command is used to remove the socket statistics. This allows showing information similar to netstat.

Click here for Comments