[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lsof -i broken
On Sun, Feb 25, 2001 at 06:02:58PM -0600, firstname.lastname@example.org wrote:
> i just recently noticed that running 'lsof -i' returns nothing. i am used
> to seeing return of known ipv4 ports and their associated applications.
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
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
> running lsof without the -i flag returns output. i can't say exactly when
> the last run with the -i flag was working properly.
> any idea what might have wacked this?
lsof isn't part of the debian default install, but it is in apt, so I checked
it out just now. It did show (with the -i) all INET4 connections that
netstat -p shows on my box.
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.
Other than that, I have no idea, but I don't know much about lsof and it looks
like a pretty complicated command.
Jordan Bettis <http://www.hafd.org/~jordanb/>
The future is a myth created by insurance salesmen and high school counselors.
To unsubscribe, send email to email@example.com with
"unsubscribe luci-discuss" in the body.