: Subject : System Admin - Monitoring open files
: I would like to monitor number of files opened by each of the
: process. Is there any command which can display this count for a
: process (or for all processes by pid) ?
: I need this information to find out if a pocess is opening files
: without closing, and whether we are reaching any configuration
: limits.
In case others are interested in this, I have found:
ftp://ftp.cert.com/pub/tools/lsof
The readme file says:
lsof (LiSt Open Files) version 3
(release 3.02)
Lsof version 3 lists open files for running UNIX processes. It is
a descendent of ofiles, fstat, lsof version 1, and lsof version 2.
It speaks the following UNIX dialects:
AIX 3.2.[45] IBM RISC/System 6000
BSDI BSD/386 1.0 and 1.1 PC compatibles
EP/IX 2.1.1 CDC 4680
FreeBSD 1.0e PC compatibles
HP-UX 9.x HP
IRIX 4.0.5 and 5.2 SGI
NetBSD 0.9a PC compatibles
NeXTSTEP 3.1 and 3.2 NeXT (PC's and NeXT)
OSF/1 1.3 and 2.0 DEC Alpha
Sequent Dynix 3.0.12 Sequent Symmetry
SunOS 4.1.3 Sun 3 and 4
SunOS 5.3 (Solaris 2.3) Sun 4
Ultrix 2.2 and 4.2 DEC
Version 3 of lsof is distributed as a gzip'd tar archive in the
file lsof_vvv.tar.gz, where vvv is the version number. (A compressed
tar archive file is also available.) Since the current version is
3.02, the current lsof distribution files are:
lsof_3.02.tar.gz gzip'd tar archive
lsof_3.02.tar.Z compressed tar archive
(If you need a copy of gunzip, look for it at prep.ai.mit.edu in
pub/gnu.)
* The May 27, 1994 revision (3.01) includes Solaris/SunOS kernel
memory access modifications and changes for Dynix, EP/IX, and
NeXTSTEP.
* The June 2, 1884 revision (3.02) refines the generation of the
Sun kernelbase.h header file so it works without complaint on
older SunOS versions. All process_file() functions were modified
to display "no more information" for file structures whose
f_count value is zero.
See the 00DIST distribution file for more details on feature
additions and bug fixes. The 00README distribution file gives
background and installation information. The lsof.8 distribution
file contains the manual page for lsof; it is the only other
documentation besides the source code (included).
Lsof Version 2
==============
The version 3 predecessor, release 36 of version 2, is also available
in this directory. It supports the following Unix dialects.
AIX 3.2.[1234] IBM RISC/System 6000
BSDI BSD/386 1.0 PC compatibles
EP/IX 1.4.3 and 2.1.1 CDC 4680
ETAV 1.17 ETA-10P*
FreeBSD 1.0e PC compatibles
HP-UX [789].x HP
IRIX 4.0.5 and 5.1.1 SGI
NetBSD 0.9a PC compatibles
NeXTSTEP 2.1, 3.0, 3.1 NeXT
OSF/1 1.[23] and 2.0 DEC Alpha
Sequent Dynix 3.0.12 Sequent Symmetry
SunOS 4.1.[123] Sun 3 and 4
SunOS 5.[13] (Solaris 2.[13]) Sun 4
Ultrix 2.2 and 4.2 DEC
Version 2 of lsof is available in the file:
lsof236tar.gz gzip'd tar archive
(If you need a copy of gunzip, look for it at prep.ai.mit.edu in
pub/gnu.)
5 June 1994