[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lsof -i broken



> Do you mean which connections are currently open? Running netstat -p shows
> all currently open connections. If you wish to just see INET4 connections,
> you could do:
>
> netstat -p | grep -e ^tcp
>

	its not so much what connection are open as what applications
	are associated with them.


> If you want to see all of the Well Known Ports of which your computer is aware,
> look in /etc/services. I find it really convient to grep /etc/services when
> looking for a port, zb:
>
> jordanb@gandalf[~]$ grep smtp /etc/services
> smtp		25/tcp		mail
> ssmtp		465/tcp				# SMTP over SSL
>

	yes, but at times ports that are not well-known and documented
	in /etc/services will be used.
	for example, i am seeing udp 1025 open on my machine, and i
	believe its bind that is using this port. tcp 587 is also open,
	and i think its in use by sendmail.

	lsof -i would give me a more accurate view of who is using what.

>
> The man page says if one dosen't specify a mask, it will "select the listing
> of all Internet and x.25 (HP-UX) network files." I'll go for the obvious,
> did you put anything after the -i that it might have mistaken for a mask?
> Also, check to see if you acutally have open connections with netstat -p.
>

	the only thing that caused me to raise an eyebrow was that i
	recently added a subinterface to my eth0 for connectivity to a
	group of machines in the same hub using some 10/8 space.
	i tried:

		lsof -i @my.address

	and nothing returned. i also did a ifconfig eth0:1 down just to
	get that completely out of the mix and still no return.

	i am running lsof-4.47-5. does anyone else running rh7 see a
	similar problem?

	thanks for your input, i appreciate it.
	-cjm

-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.