cancel
Showing results for 
Search instead for 
Did you mean: 

lsof & fsuer for B.11.31

moneric
Occasional Contributor

lsof & fsuer for B.11.31

centrpt:oracle> uname -r
B.11.31

We need lsof and fuser as we are unclosed file handler so we cannot reclaim disk space after reboot. Where we can get the tool for this dated version of HP-UX ??

1 REPLY
Matti_Kurkela
Honored Contributor

Re: lsof & fsuer for B.11.31

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

fuser is already included in HP-UX. (Note that it's located in /usr/sbin/fuser, so if you are using it with sudo or similar command, maybe check that your PATH environment variable is correct when sudo'ing to root.)

"lsof +L1" will show you all the files that have been deleted while there is still a process using them, or "lsof +aL1 /filesystem/mountpoint" will show such files in a specific filesystem only.

But rebooting a system (or the subsequent filesystem check, if the system crashed) should automatically clean up all such files, so I don't quite understand what your "cannot reclaim disk space after reboot" means.

(The filesystem driver will clean up all files with link count 0 as soon as they are closed. And the OS kernel will automatically close any files a process held open when the process dies, for any reason other than a system crash. If a system crashed, it should trigger a filesystem check at next boot for that filesystem, and then the fsck will either complete the deletion if the filesystem journal confirms the file should have been deleted, or link it to /lost+found of that filesystem if it's uncertain.)

MK