Netstat: Difference between revisions

From Hackepedia
Jump to navigationJump to search
No edit summary
 
No edit summary
Line 1: Line 1:
netstat displays network statisticsFor example if I wanted to see how many bytes flow through my interface and see this at an interval of 1 second I would type:
netstat displays '''net'''work '''stat'''istics.  
The most popular usage is to display your current routing table:
 
  $ netstat -rn
 
If I wanted to see how many bytes flow through my interface and see this at an interval of 1 second I would type:
   
   
  $ netstat -nb -I pppoe0 -w 1
  $ netstat -nb -I pppoe0 -w 1

Revision as of 17:05, 8 April 2006

netstat displays network statistics. The most popular usage is to display your current routing table:

$ netstat -rn

If I wanted to see how many bytes flow through my interface and see this at an interval of 1 second I would type:

$ netstat -nb -I pppoe0 -w 1
pppoe0 in          pppoe0 out          total in           total out      
    bytes               bytes             bytes               bytes      
1396887118           221757068        2813821922           475500976      
    16620                 888             33492                2168      

One can also see what existing connections/sockets are open:

$ netstat -na
...