How to collect network information on LINUX platform
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > How to collect network information on LINUX platform




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to collect network information on LINUX platform  
Benjamin Wang


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-30-05 07:48 AM

Hello,

I need to collect some network information about TCP, IP, UDP and SCTP on
linux platform. About IP, I need to collect such as number of packets
received , packets transmitted, bytes received, bytes transmitted, bad
packets received, packet transmit errors, received packets dropped and
transmit packets dropped.
About TCP and UDP, I need to collect the number of connection opens,
segments received and so on.  About SCTP, I need to collect the number of
failed connection attempts, chunks received and so on.

I think i could get some of them from the file /proc/net/snmp. But for bytes
received and resets sent,  I do not know how to get it. And I don't know how
to get information about SCTP.

Could you tell me how I can get those inforamtion? Also, could I get thost
information by ioctl()? how?

Thanks very much!







[ Post a follow-up to this message ]



    Re: How to collect network information on LINUX platform  
vishal


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-30-05 12:53 PM

try `netstat -s`, it's portable and would give you most of the
information you desire for protocols. As for interface statistics
(frames delivered, errors, etc), try `netstat -i`.

not sure if the linux netstat implementation is SCTP-aware though. as
for ioctls, maybe you need to look at the netstat code; my guess is, it
would be taking those values from /proc.

vishal






[ Post a follow-up to this message ]



    Re: How to collect network information on LINUX platform  
Benjamin Wang


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-31-05 07:48 AM

Vishal,

Thanks for your information!
The linux kernel I used is 2.4.  Could it support SCTP?
I have checked /proc, but didn't get the data for SCTP.

Thanks,
Ben

"vishal" <vishal.ag@gmail.com> wrote in message
news:1117442882.530161.258570@g49g2000cwa.googlegroups.com...
> try `netstat -s`, it's portable and would give you most of the
> information you desire for protocols. As for interface statistics
> (frames delivered, errors, etc), try `netstat -i`.
>
> not sure if the linux netstat implementation is SCTP-aware though. as
> for ioctls, maybe you need to look at the netstat code; my guess is, it
> would be taking those values from /proc.
>
> vishal
>







[ Post a follow-up to this message ]



    Re: How to collect network information on LINUX platform  
vishal


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-31-05 12:48 PM

i've not worked with SCTP.. maybe you should try posting this on
comp.protocols.tcp-ip

vishal






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:56 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register