February 23, 2009

Solaris fuser usage

Posted in Solaris at 3:14 pm by alessiodini

On this system i’m looking if a filesystem is used by some application:

“root@”system03″@/> df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 3101839 1643000 1396803 55% /
/dev/md/dsk/d70 2058319 1476422 520148 74% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/md/dsk/d60 8263373 5325055 2855685 66% /var
swap 5655432 32 5655400 1% /var/run
swap 5691456 36056 5655400 1% /tmp
/dev/md/dsk/d50 2058319 488312 1508258 25% /opt
/dev/md/dsk/d40 46808897 31261910 15078899 68% /idm

“root@”system03″@/> fuser -u /idm
/idm:

mmm i’m not sure of this output.

“root@”system03″@/> fuser -cu /idm
/idm: 28911c(ismadm) 28861co(ismadm) 25396c(ismadm) 25381co(ismadm) 17693ctom(ismadm) 17692co(ismadm) 14414c(ismadm) 13882co(ismadm) 17052ctm(root) 17013ctm(root) 17003ctm(root) 17001ctm(root) 16994ctm(root) 16985ctm(root) 16955tm(root) ….

from fuser manpage:

OPTIONS
The following options are supported:

-c Reports on files that are mount points for file
systems, and any files within that mounted file
system.

So , if i want check a mount point i must add the -c option.

I want see for /sun-temp directory ( not a mount point ):

“root@”system03″@/> fuser -cu /sun-temp
/sun-temp: fuser: Invalid argument

“root@”system03″@/> fuser -u /sun-temp
/sun-temp: 25293c(root) 25264c(root)

Advertisements

2 Comments »

  1. learn linux said,

    Thanks Alessio

    • alessiodini said,

      thanks to you for visit my blog! 😉


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: