Nethogs
The nethogs is a compact "net top" tool that shows the bandwidth used by each process and sorts the list to the top of the process that consumes the most bandwidth. In the event of a sudden surge in bandwidth usage, users can quickly open nethogs and find a process that leads to a surge in bandwidth usage. Nethogs can report the program's process number (PID), user, and path.
$ sudo nethogs
Installing Nethogs:ubuntu, Debian, and fedora users can be obtained from the default repositories. CentOS users are required to Epel.
# Ubuntu or Debian (default repositories) $ sudo apt-get install Nethogs # Fedora or CentOS (from Epel) $ sudo yum install nethogs-y
Linux to see which processes are consuming disk IO (iotop tools)
wget http://guichaz.free.fr/iotop/files/iotop-0.4.4.tar.gz
Tar zxf iotop-0.4.4.tar.gz
Python setup.py Build
Python setup.py Install
-O: Show only processes with IO operations
-B: Batch display, no interaction, mainly used for recording to file.
-N num: Displays NUM times, primarily for non-interactive mode.
-D Sec: Interval sec seconds display once.
-P PID: Monitor the process PID.
-u user: monitored process user.
Iotop Common shortcut keys:
Left and right arrows: Change the sorting method, by default, sort by IO.
R: Change the sort order.
O: Only processes with IO output are displayed.
P: Switch the way the process/thread is displayed.
A: Displays cumulative usage.
Q: Exit.
You can see the effect by executing iotop directly:
Total DISK read:0.00 b/S | Total DISK write:0.00 b/S
TID PRIO USER disk READ disk WRITE swapin io> command
1 BE/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% init [3]
2 BE/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [Kthreadd]
3 RT/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [migration/0]
4 BE/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [ksoftirqd/0]
5 RT/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [watchdog/0]
6 RT/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [MIGRATION/1]
7 BE/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [KSOFTIRQD/1]
8 RT/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [WATCHDOG/1]
9 BE/4 root 0.00 b/S 0.00 B/s 0.00% 0.00% [events/0]
BE/4 Root 0.00 b/S 0.00 B/s 0.00% 0.00% [EVENTS/1]
BE/4 Root 0.00 b/S 0.00 B/S 0.00% 0.00 [Khelper]
2572 BE/4 Root 0.00 b/S 0.00 B/s 0.00% 0.00% [Bluetooth]
This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1872306
Linux system monitoring Essentials two software