Operating System - HP-UX
1753806 Members
8119 Online
108805 Solutions
New Discussion юеВ

monitor open files in the system

 
SOLVED
Go to solution
eran maor
Honored Contributor

monitor open files in the system

Hi

i had a problem in hp-ux 11.00 with 4 g.b memory.
got file : table is full .
i increase the size of the nfile and ninode .

i m looking for a way to monitor the open files in my system .
love computers
6 REPLIES 6
Tim D Fulford
Honored Contributor

Re: monitor open files in the system

I'm not 100% sure if you want an automated process for looking at the files & raising a warning if appropriate or just montioring an open file. The latter I can help with
find the process id (pid) attached to the file i.e
# fuser /.../file
then use glance (which I hope you have!)
when in glance type F (shift+f) then enter the pid

Good luck

Tim
-
Thierry Poels_1
Honored Contributor

Re: monitor open files in the system

hi,
if you just want to monitor the amount of open files, then use:
sar -v 1 1
this will show ninode, nfiles and nproc usage.

if you really want to view which files are in use then go for "lsof".

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
eran maor
Honored Contributor

Re: monitor open files in the system

Hi

thanks for the help .
i m replying because i heard about a tool that can do it ls somthing but cant remember .

but the sar is also good .
if anybody have a clue ?
love computers
Thierry Poels_1
Honored Contributor
Solution

Re: monitor open files in the system

ls something??
lsof ?! had it already mentionned ;)
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Ruediger Noack
Valued Contributor

Re: monitor open files in the system

Hi,

add your crontab file with a raw like this :
0 * * * * /usr/lbin/sa/sa1 1200 3.
Then you are able to monitor also the history of nfile and his max value with sar -v.
Create dir /var/adm/sa, the output dir of sa1.

Ruediger


Anthony deRito
Respected Contributor

Re: monitor open files in the system

lsof is superb for listing open files (and its free). To list open files in a specific directory use:

$LSOF_HOME/lsof +D {FULLPATH_DIRECTORY_NAME}

Tony