LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2008, 10:00 AM   #1
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Rep: Reputation: 30
The netstat -o switch


I've read the man pages for netstat in regard to the -o switch (timer) but other than stating that it "Includes information on network timers" it really doesn't state anything else.

When I run the netstat command with this switch to listen on port 5100, this is a snippet of what I get:

Code:
tcp        0      0 magic:5100                  mail.cslibrary.org:1564     ESTABLISHED off (0.00/0/0)
tcp        0      0 magic:5100                  mail.cslibrary.org:1596     ESTABLISHED off (0.00/0/0)
tcp        0      0 magic:5100                  mail.cslibrary.org:1584     ESTABLISHED off (0.00/0/0)
tcp        0      3 magic:5100                  bensenville2.k12.il.us:1099 ESTABLISHED on (57.53/14/0)
tcp        0     27 magic:5100                  bensenville2.k12.il.us:1093 ESTABLISHED on (0.48/0/0)
tcp        0      0 magic:5100                  64.107.61.137:4975          ESTABLISHED off (0.00/0/0)
tcp        0      0 magic:5100                  mail.cslibrary.org:51237    ESTABLISHED off (0.00/0/0)
tcp        0      0 magic:5100                  st-64-107-165-131.pop:41734 ESTABLISHED off (0.00/0/0)
Can anyone illuminate me as to what I am looking at as far as the last column of numbers and what they mean
 
Old 05-01-2008, 08:37 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Determining what this is about IMHO works better if you have many connections cycling through different stages. If you take the scope to be the last three columns, you might see something like:
Code:
SYN_SENT       on   (1.35/1/0)
SYN_SENT       on   (1.65/2/0)
SYN_SENT       on   (8.94/3/0)
SYN_SENT       on   (46.85/4/0)
ESTABLISHED  off   (0.00/0/0)
For this connection you will see column one not changing until there's been a maximum of four SYN_SENTs, a steady decrease of the first value and the second value only incrementing when the second value reaches zero. From this you could infer the stack sent 4 SYNs (IIRC net.ipv4.tcp_syn_retries), each SYN triggered by the first value countdown timer (dunno sysctl for this), before it got a reply turning the timer to "off" and considering the connection established. In your "ESTABLISHED on (57.53/14/0)" example the "on" could mean there's a counter set for sending keepalives for established connections and this being the fourteenth time (net.ipv4.tcp_keepalive_probes?) it sent one. The timer itself I don't know about but I guess it's rather based on jiffies than seconds. BTW, slightly different in scope, another way to dynamically see timers at work is to use 'iptstate -f -r 2 -b s -R'.
 
Old 05-01-2008, 08:50 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

To see these changes in 'real-time':

watch netstat -to
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Netstat ?? mickeyboa Fedora 2 11-06-2007 07:01 PM
netstat sanjaykhuntia Programming 6 11-02-2007 10:52 PM
netstat Smooth Solaris / OpenSolaris 4 11-17-2006 01:30 AM
thread switch results in kernel stack switch superstition Linux - General 1 05-18-2005 12:48 AM
set up DSL thru SWITCH - winXp connected to SWITCH too husz Linux - Newbie 5 04-22-2004 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration