1834744 Members
2863 Online
110070 Solutions
New Discussion

lsof idiots guide

 
SOLVED
Go to solution
Graham Van der vaart_1
Super Advisor

lsof idiots guide

Hi

As the subject title suggests I'm looking for a genuine idiots guide (step for step) on where and how to get lsof up and running on a bunch of hosts 11.00 32 and 64 bits, 10.20 32 bit, and 11.11 32 bit.

I got binaries from various sources, but don't know whether to shar then swinstall or just gunzip and swinstall etc etc.

Confused
Graham
7 REPLIES 7
Michael Tully
Honored Contributor

Re: lsof idiots guide

Depends on where you got from ... on how to install it, but here are some examples on use.

To which files are open for a given process id (pid)

# lsof -p

To see all the open files associated with a particular command.

# lsof -c midaemon

User name.

# lsof -u
# lsof -u

processes being used via a socket.

# lsof -i tcp:23
# lsof -i udp:123

Anyone for a Mutiny ?
Ravi_8
Honored Contributor
Solution

Re: lsof idiots guide

Hi,

download the .depot file, don't use any binary files. depot file for 32 bit also works on 64 bit 0S
never give up
Hubert Feller
Advisor

Re: lsof idiots guide

Ravi

Where do I find this depot containing a working version for 11i 64bit?
Joseph Loo
Honored Contributor

Re: lsof idiots guide

hi,

try this:

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.69/

i use the version meant for HP-UX 11.00 and it works on my server running HP-UX 11i 64-bit.

regards.
what you do not see does not mean you should not believe
Todd Whitcher
Esteemed Contributor

Re: lsof idiots guide

You can get it here, pre-compiled.

http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/binaries/hpux/

As stated, the 32bit vesrion works on 64 BIT.

11.11 README
All lsof support for HP-UX 11.11 is PSTAT-based. (See the 00FAQ
file in the lsof distribution for an explanation.) The lsof binary
mode is 32 bits, and it uses -D_PSTAT64 to acquire kernel information
via pstat(2) in 64 bit mode.

There is also a man page available at the Purdue site.

here: http://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/

Todd

Pete Randall
Outstanding Contributor

Re: lsof idiots guide

Todd,

While it may be true that the 32 bit version will work on 64 bit systems, I think that works only for 11i ("All lsof support for HP-UX 11.11 is PSTAT-based").

Having tried it on 11.0, I think I can safely say that the 32 bit version will not work on a 64 bit 11.0 system.


Pete

Pete
Tom Ward_1
Honored Contributor

Re: lsof idiots guide

Graham,

I had trouble using the binary from the porting center depot, but I followed the link to the home page and got a 64-bit version that runs fine.

See my note in
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=340348
When you replace the binary, swlist will show the fileset as corrupt. You can fix that with swmodify.

Regards,
Tom