강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

netstat으로 현재 서버에서 사용하고 있는 프로토콜들의 사용통계 확인하기

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

netstat으로 현재 서버에서 사용하고 있는 프로토콜들의 사용통계 확인하기

 

 

 

 

 

netstat에서 흔하게 사용하는 것은 아니지만 유용한 옵션을 하나 소개 드립니다.

 

 

 

  , netstat에서  -s옵션을 사용하면 현재 서버에서 사용하는 프로토콜들의 사용통계를 확인할 수 있습니다.

 

 

 

 


아래 결과를 보시면 아시겠지만 다음과 같은 정보를 확인하고 있습니다.

 

 

 

 

 

 - Ip트로토콜의 receive데이터와 incoming데이터통계

 

 - Icmp프로토콜의 receive데이터와 incoming데이터통계

 

 - Tcp프로토콜의 receive데이터와 incoming데이터통계

 

 - Udp프로토콜의 receive데이터와 incoming데이터통계

 

 - 기타


아래의 예는 “netstat -s”를 실행한 예로서 각 프로토콜들의 사용통계를 확인한 것입니다.

 

 

 

 

 

[root@su250 ~]# netstat -s

Ip:

    1109 total packets received

    0 forwarded

    0 incoming packets discarded

    826 incoming packets delivered

    729 requests sent out

Icmp:

    10 ICMP messages received

    0 input ICMP message failed.

    ICMP input histogram:

        echo replies: 10

    10 ICMP messages sent

    0 ICMP messages failed

    ICMP output histogram:

        echo request: 10

IcmpMsg:

        InType0: 10

        OutType8: 10

Tcp:

    0 active connections openings

    2 passive connection openings

    0 failed connection attempts

    1 connection resets received

    1 connections established

    799 segments received

    685 segments send out

    3 segments retransmited

    0 bad segments received.

    0 resets sent

Udp:

    17 packets received

    0 packets to unknown port received.

    0 packet receive errors

    29 packets sent

UdpLite:

TcpExt:

    5 delayed acks sent

    1 delayed acks further delayed because of locked socket

    121 packets header predicted

    274 acknowledgments not containing data received

    0 TCP data loss events

    3 other TCP timeouts

IpExt:

    InMcastPkts: 66

    OutMcastPkts: 14

    InBcastPkts: 208

[root@su250 ~]#

 

 

 

 

 

, 위의 “netstat –s” 결과를 보시면 IP, ICMP, TCP, UDP, TcpExt등의 프로토콜들에 대한 사용통계를 보실 있습니다.

 

 

 

  위의 예에서는 IP ICMP, 그리고 TCP 프로토콜이 가장 많이 사용되었다는 것을 있으며, 프로토콜들의 주고, 받은 패킷양을 확인할 있습니다.

 

 

 

 이와 같이 현재 시스템에서 사용하고 있는 프로토콜들의 통계를 모두 확인하려면 “netstat –s” 실행하시면 됩니다.

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,045 명
  • 현재 강좌수 :  35,861 개
  • 현재 접속자 :  96 명