Re: How to check how many users were accessing any volume like /dev/sda8 in linux

0 views
Skip to first unread message

Rajveer Singh

unread,
Aug 29, 2011, 5:53:02 AM8/29/11
to live-in...@googlegroups.com
Arvind,

 
On Mon, Aug 29, 2011 at 10:57 AM, arvind mishra <arvindk...@gmail.com> wrote:
Hello All,

If any body have an idea what is the command to check how many users were accessing any volume like /dev/sda8 in linux
.

Thanks
Arvind
 
 
The volume e.g. /dev/sda8 is being used by processes and processes owned by users. So to find the list of users who are accessing the volume, first you need to find out the list of processes which are accessing the volume, then you can check the ownership of the processes. This command may help you to achieve the same:-
# lsof /dev/sda8|awk '{ print $3 }'|uniq
 
I hope this is what you was looking for.
 
P.S.:- Please make sure, if you are asking a new question in the forum, please create a new thread instead of hijacking the existing thread. It helps avoid the confusion and better visibility of the discussions.
 
Thanks
Rajveer Singh
 

gunjan pandey

unread,
Aug 29, 2011, 10:47:17 AM8/29/11
to live-into-linux
thankx Rajveer



On Aug 29, 5:53 am, Rajveer Singh <torajveersi...@gmail.com> wrote:
> Arvind,
>
> On Mon, Aug 29, 2011 at 10:57 AM, arvind mishra
> <arvindkrmmis...@gmail.com>wrote:
>
>
>
> > Hello All,
>
> > If any body have an idea what is the command to check how many users were
> > accessing any volume like /dev/sda8 in linux
>
>  .
>
> > Thanks
> > Arvind
>
> The volume e.g. /dev/sda8 is being used by processes and processes owned by
> users. So to find the list of users who are accessing the volume, first you
> need to find out the list of processes which are accessing the volume, then
> you can check the ownership of the processes. This command may help you to
> achieve the same:-
> #* lsof /dev/sda8|awk '{ print $3 }'|uniq*
Reply all
Reply to author
Forward
0 new messages