Re: lsof on solaris 10




Dan Foster wrote:
In article <1163832807.684953.167920@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, sil <dsphunxion@xxxxxxxxx> wrote:

Michael Schreiber wrote:
hi,

i have a problem with lsof under solaris 10 sparc:

lsof -i |tail -2
httpd 29589 wwwrun 123u IPv4 0x300100cd600 0t0 TCP *:65535
(LISTEN)
httpd 29589 wwwrun 124u IPv4 0x3000fd8c500 0t0 TCP *:65535
(LISTEN)

Have you tried to see how Apache is configured by any chance

grep -i listen /path/to/apache/conf/httpd.conf

Have you tried telnetting to that machine on port 65535 if it is Apache
while in telnet you could type HEAD to make sure.

The issue does not lie with Apache. Rather, it lies with lsof, as I can
reproduce it on my own fully patched Solaris 10/x86 Update 2 system:

# lsof | grep LISTEN
sendmail 386 root 4u IPv4 0xffffffff8187bd80 0t0 TCP *:65535 (LISTEN)
named 25636 dnsuser 23u IPv4 0xffffffff847561c0 0t0 TCP *:65535 (LISTEN)

Please observe that the above output claims that both sendmail and named
are listening on port 65535.

This is clearly impossible. Thus, it cannot be application
configuration, but rather, with lsof parsing kernel memory.

Casper Dik indicates that this would be fixed by recompiling lsof...
however, even when I do so with lsof 4.77 on Solaris 10/x86 Update 2 +
patches + SUNWgcc, still doesn't work. So... hmm. I'm not sure.

-Dan

Is always a good idea to look for lsof patches. There is a patch to
lsof 4.77 for this problem
It may be found on lsof.itap.purdue.edu in
pub/tools/unix/lsof/patches/4.77/solaris10-0606.patch.

Vic Abell, lsof author

.