Operating System - HP-UX
1834465 Members
3404 Online
110067 Solutions
New Discussion

Network traffic per socket

 
Shahul
Esteemed Contributor

Network traffic per socket


Hi,

I need to know the network traffic for a particular socket, ie. packet size transferred. How can I get this info with out using any tools, I mean inbuilt Unix commands. Suggestions are highly appreciated.

TIA
Shahul
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Network traffic per socket

http://hpux.connect.org.uk/hppd/hpux/Gtk/Applications/ethereal-0.9.15/

I believe this tool can dod the job.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Shahul
Esteemed Contributor

Re: Network traffic per socket

Steven,

Thanks for ur answer. But I need to find out by using Unix commands, not by using any additional tools.

Thanks for additional info.

Shahul
Steven E. Protter
Exalted Contributor

Re: Network traffic per socket

netttl can do it from the command line.

Filtering the data is kinda a pain.

There are a couple of cookbooks in the itrc search database though.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
steven Burgess_2
Honored Contributor

Re: Network traffic per socket

Hi Shahul

To do with nettl

First create a filter file containing the port/socket numbers you wish to trace, for eg

filter tcp_sport 23 /* TCP port 23 =
telnet */
filter tcp_dport 23 /* TCP port 23 = telnet */

You can also add filters for a specific ip address

filter ip_saddr ip.ip.ip.ip
filter ip_daddr ip.ip.ip.ip


If you are 10baseT use the below to start your trace, ensure you have plenty of space in your filesystem as the tracefiles can grow quite quickly

nettl -tn pduin pduout â e ns_ls_driver â size 1024 â tracemax 99999 â f /tmp/raw

If you are using 100BaseT

nettl â tn pduin pduout â e all â size 1024 â tracemax 99999 â f /tmp/raw

Initiate an event you need to trace

To stop the trace

nettl â tf â e all

Then to format your file using the previously created filter file

netfmt -N -n -l -c filter -f raw.TRC0 > /tmp/fmt-10

The format will display the filters you have in place and create the
take your time and think things through