Operating System - HP-UX
1833758 Members
2790 Online
110063 Solutions
New Discussion

How to monitor an IP connection?

 
Enrico Venturi
Super Advisor

How to monitor an IP connection?

Hello colleagues,
we've two servers connected through a data connection not stable: we see that our application, using massively the data transfer via socket, often fails because of unexpected data reading / writing error on socket.
I'd like to have a simple and rough tool to monitor tha network connection, to detect and to document the network faults occurring there.
What can I do?

thanks and best regards
Enrico
7 REPLIES 7
Piergiacomo Perini
Trusted Contributor

Re: How to monitor an IP connection?

Hi Enrico,

maybe too rough but with ping (or netstat) in a shell script you can detect e document faults.

hth
regards
pg
Enrico Venturi
Super Advisor

Re: How to monitor an IP connection?

which "netstat" command exactly?

thanks in advance
Enrico
Piergiacomo Perini
Trusted Contributor

Re: How to monitor an IP connection?

Hi again Enrico,

see if this (or something like this) can be usefull to you :

netstat -a | grep telnet
tcp 0 2 HOSTNAME.telnet 217-133-12-209.4974 ESTABLISHED
tcp 0 0 *.telnet *.* LISTEN

so you can monitoring servive if is listening and if someone use it .

hth
regards
pg
Bill Hassell
Honored Contributor

Re: How to monitor an IP connection?

The quality of the network can be meqasured with lanadmin. Start by identifiyinh the lan card you are using for the transfers. Use lanscan to show all your cards. If you are using lan0, then clear the statistics with:

lanadmin -c 0

Now run your application and then check the counters with:

lanadmin -g 0

If you are seeing errors in the second section of statistics, you have a faulty LAN setup.


Bill Hassell, sysadmin
Rasheed Tamton
Honored Contributor

Re: How to monitor an IP connection?

Hello Enrico,


A small tweak to the above.

lanadmin -g mibstats 0|grep -Ei 'coll|err'

What about netfmt and nettl.

Regards,
Rasheed Tamton.
Sandman!
Honored Contributor

Re: How to monitor an IP connection?

If you know the pid you can try lsof or tcpdump(1) in order to focus on the specific network connection you are interested in.
Ben Dehner
Trusted Contributor

Re: How to monitor an IP connection?

Others have mentioned looking at the HP-UX host. You might also want to check the switch( that you are connected to, and see if there are any errors or discards on its ethernet port. Depending on how many network devices are between your systems, you might want to check other switches and routers.

Its possible that the errors you are seeing are application problems, and not network faults. Another approach is to use a network sniffer like Ethereal to run a package capture on the data stream. This will generate a massive amount of data, but it will show you what the application is doing on the network.

Trust me, I know what I'm doing