From the course: Linux System Engineer: Kernel Tuning and Remote Logging

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use SS to gather network statistics

Use SS to gather network statistics

From the course: Linux System Engineer: Kernel Tuning and Remote Logging

Start my 1-month free trial

Use SS to gather network statistics

- [Narrator] Netstat is a useful network tool. It is part of the legacy net tools package, so you'll want to make sure that it's installed using Yum. We'll be looking at the legacy commands as well as their replacements from iproute2. Netstat allows us to show network statistics by using the dash S option. In a terminal, type in netstat space dash S and hit Enter. This shows all packet counters. The replacement command for netstat is SS, but for this functionality, the nstat command provides output more similar to netstat dash S. So let's type Clear, and then type in, nstat space dash A S Z, and hit Enter. The dash A option is for absolute counters. The dash S says to not keep a history file, and dash Z instructs nstat to include nonzero counters. The format isn't as readable, but if you can decipher the names, you can get the same information. To show all listening or non-listening sockets, we'll type in netstat space dash A. First let's type in Clear, and then type in netstat space…

Contents