Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
1  
Try ss -s instead. –  Zoredache Mar 11 at 6:34
    
How do you know the stats are particular to ipv4? –  MadHatter Mar 11 at 7:39

2 Answers 2

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.

share|improve this answer

netstat -s -6 should be your answer.

share|improve this answer
    
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. –  Iain Mar 11 at 7:48
    
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 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 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. –  Iain Mar 11 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. –  Iain Mar 11 at 9:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.