Why does "netstat -s" show incomplete information?

Issues related to configuring your network
Post Reply
taolei
Posts: 121
Joined: 2007/05/01 02:47:32

Why does "netstat -s" show incomplete information?

Post by taolei » 2023/04/15 02:42:32

Hello.

On my CentOS 8 (release 8.5.2111), "netstat -s" does not show TCPBacklogDrop and ListenOverflows, but they exist in "/proc/net/netstat".

Code: Select all

[root@node ~]# netstat -s | egrep -i '(queue|drop|overflow)'
    2 outgoing packets dropped
    2 dropped because of missing route
    1521 packets pruned from receive queue because of socket buffer overrun
    9446 ICMP packets dropped because they were out-of-window
    629 packets collapsed in receive queue due to low socket buffer
    TCPOFOQueue: 19253045
    TCPSpuriousRtxHostQueues: 213
I see many articles on the Internet about how to investigate SYN queue and backlog queue by "netstat -s" command, but it is not available in my system.

taolei
Posts: 121
Joined: 2007/05/01 02:47:32

Re: Why does "netstat -s" show incomplete information ?

Post by taolei » 2023/04/15 08:38:59

I find the reason.
Unless a counter's value is not zero, netstat will not show it.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Why does "netstat -s" show incomplete information ?

Post by TrevorH » 2023/04/15 11:41:06

Also you should know that CentOS Linux 8.5.2111 was the last release of CentOS Linux 8 and it is now EOL. This means your system is stuck in time and is already 18 months or so out of date. You should look at the alternatives to CentOS Linux 8 - Rocky/Alma/OEL or even RHEL itself - and migrate to one of those to remain up to date and secure.

Your system is not secure and will become increasingly less so as time goes by.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Why does "netstat -s" show incomplete information ?

Post by jlehtone » 2023/04/15 18:59:52

Check out also ss -- supposedly does everything that netstat did, and then some.

taolei
Posts: 121
Joined: 2007/05/01 02:47:32

Re: Why does "netstat -s" show incomplete information ?

Post by taolei » 2023/04/16 03:11:58

Thank TrevorH.
I'm considering Rocky or CentOS 9.

And thank jlehtone, the "ss -s" only shows very little statistics, not including important info about TCP SYN queue, Listen queue, etc.

BShT
Posts: 584
Joined: 2019/10/09 12:31:40

Re: Why does "netstat -s" show incomplete information ?

Post by BShT » 2023/06/07 13:39:52

there is no CentOS 9

there is CentOS 9 Stream a bugged beta of RHEL 9

Post Reply