Results 1 to 4 of 4

Thread: netstat command in Linux

  1. #1
    Join Date
    Jul 2010
    Posts
    93

    netstat command in Linux

    Many of Linux users would be curious to know about the nestat command. The command "nestat" displays statistical information and the current state of network connections, protocols, ports / sockets and appliances. The following is the syntax :
    netstat [options]
    The following are the options :
    • -S displays statistical information about the protocols.
    • -I displays statistical information about the network interface.
    • -R displays the routing table.
    • -C displays statistical information and updates every second
    • -L displays information about all sockets that are ready to listen.
    • -A displays information about all sockets that are ready to listen and not listen.
    • -P displays information about sockets and PID with ProcessName.

  2. #2
    Join Date
    Jul 2010
    Posts
    93

    Re: netstat command in Linux

    EXAMPLE :

    For statistics about network connections:
    netstat
    The sample output from above:

    Active Internet connections (w / o servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 vhost: 32,803 LocalHost: smtp TIME_WAIT
    tcp 0 0 vhost: 32,803 google.com http ESTABLISHED

    Where,

    • Proto - Specifies the protocol used for the connection.
    • Recv-Q - Specifies the number of bytes that are not received.
    • Send-Q - Specifies the number of bytes not sent to destination.
    • Local Address - Specifies the local address or source port.
    • Foreign Address - Specifies the destination address and port.
    • State - Specifies the current state of the socket connection.
    • ESTABLISHED - Connection is Established.
    • TIME_WAIT - Waiting to Receive packets.
    • LISTEN - Listening to Establish connection.

  3. #3
    Join Date
    Jul 2010
    Posts
    93

    Re: netstat command in Linux

    For the statistics of protocols:
    netstat-s
    The sample output from above:
    • IP
      5193 incoming packets Delivered
      4813 requĂȘtes feels out
    • Tcp:
      Received 4033 segments
      4813 segments send out
    • Icmp:
      41 ICMP Message Received
      178 ICMP messages feels


    For statistics of the network interface:

    netstat-i
    The sample output from above:
    Kernel Interface table
    Iface MTU Met RX-OK RX-ERR TX-OK TX-ERR Flg
    eth0 1500 0 1308 0 1345 0 BMRU

    This is statistical information for the Ethernet card [eth0].

  4. #4
    Join Date
    Jul 2010
    Posts
    93

    Re: netstat command in Linux

    DESCRIPTION :

    You can see the status of network connections by listing the sockets open. This is the default option: if you do not specify address family, active sockets of all families address will be displayed. With the parameter-e you get some additional information (userid). With the parameter-v you can ask netstat report address families known not supported by the kernel. The-o parameter displays additional information on network timers. By giving -p you will see the PID and process name that owns socket. The-a displays all sockets, including listening socket servers. The address family inet displays Raw sockets, udp and tcp.

    FILES :

    • / Etc / services - The service mapping file
    • / Proc / net / dev - Device information
    • / Proc / net / raw - RAW socket information
    • / Proc / net / tcp - TCP socket information
    • / Proc / net / udp - UDP socket information
    • / Proc / net / igmp - IGMP multicast information
    • / Proc / net / unix - Unix domain socket information
    • / Proc / net / ipx - IPX socket information
    • / Proc/net/ax25 - AX25 socket information
    • / Proc / net / appeltalk - information sockets DDP (appeltalk)
    • / Proc / net / nr - NET socket information / ROM
    • / Proc / net / route - Kernel IP routing information
    • / Proc/net/ax25_route - AX25 routing information from kernel
    • / Proc / net / ipx_route - IPX routing information from kernel
    • / Proc / net / nr_nodes - routing information NET / ROM kernel
    • / Proc / net / nr_neigh - Neighbourhood NET / ROM kernel
    • / Proc / net / ip_masquerade - Connecting with masquerade kernel

Similar Threads

  1. Question about -F Linux Command
    By Tynan in forum Operating Systems
    Replies: 3
    Last Post: 14-01-2011, 04:32 AM
  2. How to use linux dd command
    By Rubeen in forum Operating Systems
    Replies: 5
    Last Post: 02-04-2010, 10:59 AM
  3. Linux history command and fc command
    By Alkesh jain in forum Operating Systems
    Replies: 3
    Last Post: 26-05-2009, 07:53 PM
  4. Blue screen after "netstat" command
    By Logan.M in forum Operating Systems
    Replies: 3
    Last Post: 14-02-2009, 07:54 PM
  5. Linux passwd command
    By gvBlake in forum Operating Systems
    Replies: 5
    Last Post: 13-01-2009, 10:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,564,518.39927 seconds with 17 queries