1833452 Members
3278 Online
110052 Solutions
New Discussion

using lsof

 
Nelson Ko_1
New Member

using lsof

I have trouble on runnnig the lsof. It gave me a message, saying it tries to read /hp-ux.
Any idea what I should do?

oberon # ./lsof -h
lsof 2.32 usage: [-dhHlLmnNoPst] [-c c] [-i i] [-k k] [-p l] [-S t]
[... delete ...]
The security mode is disabled -- anyone may list all open files.
oberon # ./lsof
lsof: can't read namelist from /hp-ux
oberon # uname -a
HP-UX oberon B.11.00 E 9000/770 2012345800 8-user license
oberon #
2 REPLIES 2
Rajeev  Shukla
Honored Contributor

Re: using lsof

The best way is to download the source program of lsof from http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/ and then compile it for your own system, make sure you have gcc compile installed which too you can download from http://hpux.connect.org.uk site

Cheers
Rajeev
Michael Tully
Honored Contributor

Re: using lsof

You probably have the wrong version loaded for your system. Have a look here:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/

Here's an example on usage:
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 ?