1823943 Members
3708 Online
109667 Solutions
New Discussion юеВ

Monitor UDP port

 
SOLVED
Go to solution
Sylvain CROUET
Respected Contributor

Monitor UDP port

Hello,

How would you monitor a UDP port on a server to check wether a process is listening to it, from the inside point of view (directly on the server) and the outside point of view (from another server).
7 REPLIES 7
Florian Heigl (new acc)
Honored Contributor

Re: Monitor UDP port

inside:
netstat -na | grep LISTEN or much better lsof.
outside:
nmap, or simply telnet.
yesterday I stood at the edge. Today I'm one step ahead.
Steven E. Protter
Exalted Contributor

Re: Monitor UDP port

netstat -an | grep LISTEN | grep

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
RAC_1
Honored Contributor

Re: Monitor UDP port

On the server you can use netstat/lsof to monitor a port.

lsof -p udp:"port_number"
netstat -an|grep "port_number"

You can get lsof here.
http://hpux.connect.org.uk

From other server, you can try telneting to the port to check if it is listening or not.
telnet system "port_number"
You can also user some tools such as portscan, nport etc.

Anil
There is no substitute to HARDWORK
Sylvain CROUET
Respected Contributor

Re: Monitor UDP port

Well, lsof -p does not work for me:

toor@cexi01:/var/opt/OV/bin/OpC/monitor # lsof -p udp:"162"
lsof: illegal process ID: udp:162
lsof 4.55 (latest revision at ftp://vic.cc.purdue.edu/pub/tools/unix/lsof)
usage: [-?abChlnNoOPRstUvV] [-c c] [+|-d s] [+|-D D] [+|-f[cfgGn]]
[-F [f]] [-g [s]] [-i [i]] [-k k] [+|-L [l]] [-m m] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [--] [names]
Use the ``-h'' option to get more help information.
toor@cexi01:/var/opt/OV/bin/OpC/monitor #
renarios
Trusted Contributor

Re: Monitor UDP port

Hi Crouet,

leave the quotes, i.e. lsof -p udp:162


cheerio,

Renarios
Nothing is more successfull as failure
Sylvain CROUET
Respected Contributor

Re: Monitor UDP port

It does not work either. Same error.
RAC_1
Honored Contributor
Solution

Re: Monitor UDP port

It is -i option.

lsof -i tcp:23
There is no substitute to HARDWORK