0

I'm using Linux RHEL55. I need to collect tcp6 statistics data. if i run "netstat -s", it gives data only for tcp and not for tcp6. But we can get tcp connection status for ipv6 in windows. why we cant get tcp connection statistics for ipv6? Can anyone give suggestion for my query?

2
  • 1
    Try ss -s instead.
    – Zoredache
    Mar 11, 2014 at 6:34
  • How do you know the stats are particular to ipv4?
    – MadHatter
    Mar 11, 2014 at 7:39

2 Answers 2

3

The netstat command in RHEL 5 does not support IPv6. It's also deprecated. Use the ss command instead.

ss -s

Note well that this displays summary information and doesn't contain quite all the information that netstat -s might have displayed.

1

netstat -s -6 should be your answer.

6
  • Admittedly this is the obvious thing to try but c'mon it's easy to test this and find it's not right too. There's no -6 for netstat and -A inet6 doesn't work either.
    – user9517
    Mar 11, 2014 at 7:48
  • 1
    Actually, that does work on my machine. Perhaps it is a recent addition to netstat? pastebin.com/hayqN4VW (EDIT: netstat is bash escaped because I have netstat aliased to remind me NOT to use it ;))
    – fukawi2
    Mar 11, 2014 at 8:00
  • -A inet6 works fine for me (CentOS 6), it just doesn't give any different answers; that's why I wondered above what the evidence is that the stats reported are v4-specific.
    – MadHatter
    Mar 11, 2014 at 8:54
  • @fukawi2: I'll guess you're not using RHEL. Neither my 5.5 or 6.5 CentOS systems have a -6 switch to netstat.
    – user9517
    Mar 11, 2014 at 9:29
  • @MadHatter: I did a quick test the ICMP stats don't change when you ping6 but they do when you ping so at least for that it's not counting whether you use -A inet6 or not.
    – user9517
    Mar 11, 2014 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .