lsof
list open files
AIX
Compilation V4.87
Configure -clean aix
make
cd tests
make opt
Configuration (AIX 3.2, lsof 4.0)
Seems to work out-of-the-box.
Configuration (AIX >=4)
To allow ordinary users to use lsof
on AIX, access to /dev/mem and /dev/kmem has to
be enabled. This is accomplished by means of
acl
options.
-
Check if the group
kmem
exists (lsgroup kmem
).
If not, create it, either locally or on the appropriate NIS server.
-
Create (or use an already existing) file
lsof.acl
base permissions
owner(root): r--
group(system): r--
others: ---
extended permissions
enabled
permit r-- g:kmem
permit r-- g:kmem
permit r-- g:kmem
(Existing acl
-options can be read out by
aclget /dev/mem > lsof.acl
)
-
Set the
acl
-options
aclput -i lsof.acl /dev/mem
aclput -i lsof.acl /dev/kmem
-
Modify the binary's permissions:
chgrp kmem lsof
chmod g+s lsof
Note:
-
acl
-options do not survive cloning (as of AIX 4.3).
- Each AIX release/version might need its appropriate
lsof
version.
Tru64, Ultrix
To allow all users to lsof
, change the binary:
chgrp kmem lsof
chmod g+s lsof
HP-UX
Compilation (V4.77)
-
Check if the kernel is prepared for debugging.
q4pxdb -s status /stand/vmunix
# or:
pxdb -s status /stand/vmunix
-
If not prepared, do it now (caution, kernel will be written !):
cp -p /stand/vmunix /stand/vmunix.save # save old kernel
q4pxdb /stand/vmunix
# or:
pxdb /stand/vmunix
-
configure and compile
Configure hpuxgcc # for the gcc compiler
Configure hpux # for the native compiler
make
Note that I suspect
/usr/include/sys/socketvar.h
to be buggy on HP-UX 11.00, the line
extern struct sotimeq sotimeqhash[];
should obviously appear after definition of struct sotimeq
Configuration
-
If not yet existing, create group
kmem
(assume next free id is 202),
insert in /etc/group
kmem:!:202:kmem
-
To allow all users to
lsof
, change the binary:
chgrp kmem lsof
chmod g+s lsof
Last updated: 20-Jun-2009,
M.Kraemer
Impressum Data privacy protection