This article is part 3 in a series of 3 articles regarding 18 Linux system monitoring tools you should know.
In this article we’re going to cover some built-in system monitoring tools as well as some free add-on tools which will make your life easier when troubleshooting issues regarding Networking in your server.
You can find the other articles here:
18 Linux System Monitoring Tools – part 1 – Processes & Memory
18 Linux System Monitoring Tools – part 2 – System
Most Linux distributions are equipped with many monitoring tools.
These network monitoring tools provide metrics which can be used to get information about system activities.
You can use network monitoring tools to find the possible causes of a performance issue.
The commands discussed in this article are some of the most basic commands when it comes to system analysis and debugging server issues such as:
- Finding out bottlenecks.
- Disk (storage) bottlenecks.
- CPU and memory bottlenecks.
- Network bottlenecks.
The commands/tools we’re going to cover in this article are:
#1 : w – Find out who is logged on and what they are doing
The w command displays information about the users currently on the machine and their processes.
# w # w username
#2 and #3: netstat and ss – Network Statistics
The command netstat displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
The command ss is used to dump socket statistics. It allows showing information similar to netstat.
To display both listening and non-listening sockets and display numerical hosts:
# netstat -an
In order to find if your server is listening to connections on port 22 (SSH), run:
# netstat -an |grep 22
#3 : iptraf – Real-time Network Statistics
The iptraf command is interactive colorful IP LAN monitor.
It is an ncurses-based IP LAN monitor that generates various network statistics including
TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others.
It can provide the following info in easy to read format:
- Network traffic statistics by TCP connection
- IP traffic statistics by network interface
- Network traffic statistics by protocol
- Network traffic statistics by TCP/UDP port and by packet size
- Network traffic statistics by Layer2 address
General interface statistics: IP traffic statistics by network interface:
Network traffic statistics by TCP connection:
#4 : tcpdump – Detailed Network Traffic Analysis
tcpdump is a simple command which dumps traffic on a network. However, you need some good understanding of TCP/IP protocol to utilize this tool.
For example, to display info about SSH, enter:
# tcpdump -i wlan0 'tcp port 22'
To display all FTP sessions to 192.168.1.5, enter:
# tcpdump -i eth0 'dst 192.168.1.5 and tcp and port http'
#5 : Nagios – Server and Network Monitoring
Nagios is a popular open source computer system and network monitoring application software.
You can easily monitor all your hosts, network equipment and services. It can send alert when things go wrong and again when they get better.
FAN is “Fully Automated Nagios”. FAN goals are to provide a Nagios installation including most tools provided by the Nagios Community.
FAN provides a CDRom image in the standard ISO format, making it easy to easilly install a Nagios server.
Added to this, a wide bunch of tools are including to the distribution, in order to improve the user experience around Nagios.
#6 : Cacti – Web-based Monitoring Tool
Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality.
Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box.
All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices.
It can provide data about network, CPU, memory, logged in users, Apache, DNS servers and much more.
Please continue reading part 1 and 2 regarding system monitoring tools which will help you troubleshoot issues regarding your Memory & Processes and Networking.
Feel free to leave comments or ask questions.
Leave a Comment
You must be logged in to post a comment.