Operating System - HP-UX
1753492 Members
5175 Online
108794 Solutions
New Discussion юеВ

Re: Info required about lsof

 
Micky1_1
Occasional Contributor

Info required about lsof

hi all,

can some one provide me good information about "lsof" utility in hpux.

thanks
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Info required about lsof

Hi:

The 'lsof' (List Open Files) utility runs on a variety of platforms and ofter provides absolutely invaluable assistance in finding open files, socket information, etc.

You can download (pre-compiled binaries and/or source code) from the HP--UX Porting Center:

http://hpux.cs.utah.edu/

A good, quick-start tutorial can be found here:

http://www.opensource.apple.com/darwinsource/10.3/lsof-12/lsof/00QUICKSTART

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Info required about lsof

Hi (again):

It appears that the Porting Center is having problems, so here is an alternate source for 'lsof' along with documentation and additional URLs:

http://people.freebsd.org/~abe/

Please also see:

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Regards!

...JRF...
Yogeeraj_1
Honored Contributor

Re: Info required about lsof

hi,

lsof is a command meaning "list open files", which is used in many Unix-like systems to report a list of all open files and the processes that opened them. It works in and supports several UNIX flavors.

Open files in the system include disk files, pipes, network sockets and devices opened by all processes. One use for this command is when a disk cannot be unmounted because (unspecified) files are in use. The listing of open files can be consulted (suitably filtered if necessary) to identify the process that is using the files.

# lsof /var
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
syslogd 350 root 5w VREG 222,5 0 440818 /var/adm/messages
syslogd 350 root 6w VREG 222,5 339098 6248 /var/log/syslog
cron 353 root cwd VDIR 222,5 512 254550 /var -- atjobs

see also:
http://www.netadmintools.com/html/lsof.man.html

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Micky1_1
Occasional Contributor

Re: Info required about lsof

The man page was quite informational.

Thanks for the man page.

Micky1