Unix Technical Forum

Users on a particular filesystem

This is a discussion on Users on a particular filesystem within the AIX Operating System forums, part of the Unix Operating Systems category; --> All, Is there a way to get a list of users who are logged on to the system and ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 07:30 AM
Visu
 
Posts: n/a
Default Users on a particular filesystem

All,

Is there a way to get a list of users who are logged on to the system
and using a particular filesystem. (i.e) their current directory (pwd)
is the /examplefs or their subdirectories.

I will eventually have to send a message to those users at a particular
time. I bielieve i can use wall for that.

Thanks
-Visu

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 07:30 AM
yoyo
 
Posts: n/a
Default Re: Users on a particular filesystem

Visu wrote:
> All,
>
> Is there a way to get a list of users who are logged on to the system
> and using a particular filesystem. (i.e) their current directory (pwd)
> is the /examplefs or their subdirectories.
>
> I will eventually have to send a message to those users at a particular
> time. I bielieve i can use wall for that.
>
> Thanks
> -Visu
>

There is no simple way I can think of. My guess is you wish to umount
that fs? Anyway, you could alias /usr/bin/cd to a custom script that
simply logged usernamewd to some file, then called real cd in the end.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 07:30 AM
mark
 
Posts: n/a
Default Re: Users on a particular filesystem

presuming you are trying to umount the filesystem, try fuser, you may
need to issue this on both the filesystem and its underlying device.
it will show the processes using that device-leading you the user(s)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 07:30 AM
Stephane Gassies
 
Posts: n/a
Default Re: Users on a particular filesystem

There are two ways to check for that.
Please forget about unmounting filesystem just to check
if it is used. I suppose it was just jokes, or answers
of people not used to deal with production servers ;-)

1) Use lsof (check at IBM download site) (LiSt Open Files).
This tool is wonderful to know about open ports & files.

2) If you use AIX 5.x, you can look a /proc/<PID>/cwd

But this will give you information only about currrent
directories of any proces. My favourite is Answer one.

Er, as it spells, wall is intended to "Write to ALL users".
You could use it to warn yours users, or you can separately
warn them with the "write" utility.

Kind regards,
Stephane
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:28 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com