From the course: Linux System Engineer: Networking and SSH

Unlock the full course today

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

Get network statistics with ss and ip

Get network statistics with ss and ip

From the course: Linux System Engineer: Networking and SSH

Start my 1-month free trial

Get network statistics with ss and ip

- [Narrator] Net Stat 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 a replacement from IP Route 2. Net Stat allows us to show network statistics by using the -s option. In a terminal type in Net Stat -s and hit enter. This shows all packet counters. The replacement command for Net Stat is ss. But for this functionality the nstat command provides output more similar to Net Stat -s. So let's type clear and then type in nstat -asz and hit enter. The -a option is for absolute counters. The -s says do not keep a history file and -z instructs nstat to include non zero 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 Net Stat -a. First let's type in clear and then type in Net Stat -a. Or using the ss command type in ss -a and hit enter. For the…

Contents