[dtrace-discuss] all open files

陶捷 Tao Jie eulertao at gmail.com
Mon Jul 9 21:14:56 PDT 2007


file system is managed by kernel
so, every regular file open request is sent to kernel by calling open/creat
no matter what the user functions are.

it's the basic OS concept.


在07-7-10,Zhou Aaron <aaron.zhou1018 at hotmail.com> 写道:
>
> Thanks for your correcting.
> Another question: In userland, is there any other way to open file except
> for the open()/creat() syscall? of course, in kernel area, don't need to
> care open or not, just reference to vnode,then can do any operation for
> associated file.
>
>
> >From: Dan Mick <dan.mick at sun.com>
> >To: Zhou Aaron <aaron.zhou1018 at hotmail.com>
> >CC: bart.smaalders at sun.com, venkatesh_ch at yahoo.com,
> dtrace-discuss at opensolaris.org
> >Subject: Re: [dtrace-discuss] all open files
> >Date: Mon, 09 Jul 2007 19:09:31 -0700
> >
> >That'll show you all the open() system calls, but not the currently
> >open files...
> >
> >Zhou Aaron wrote:
> > > dtrace -n 'syscall::open*:entry {printf("%s %s %d",
> > > execname,copyinstr(arg0),pid);}'
> > >
> > >
> > >> From: Bart Smaalders <bart.smaalders at Sun.COM>
> > >> To: Venkat C <venkatesh_ch at yahoo.com>
> > >> CC: dtrace-discuss at opensolaris.org
> > >> Subject: Re: [dtrace-discuss] all open files
> > >> Date: Mon, 09 Jul 2007 17:52:05 -0700
> > >>
> > >> Venkat C wrote:
> > >>> Hi All,
> > >>>
> > >>> Is there a simple way to list all currently open file descriptors ?
> > >>
> > >> # ls -l /proc/*/path
> > >>
> > >> :-)
> > >>
> > >> - Bart
> > >>
> > >> --
> > >> Bart Smaalders                     Solaris Kernel Performance
> > >> barts at cyber.eng.sun.com            http://blogs.sun.com/barts
> > >> _______________________________________________
> > >> dtrace-discuss mailing list
> > >> dtrace-discuss at opensolaris.org
> > >
> > > _________________________________________________________________
> > > 享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
> > >
> > > _______________________________________________
> > > dtrace-discuss mailing list
> > > dtrace-discuss at opensolaris.org
> >
>
> _________________________________________________________________
> 享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com
>
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070710/637a829b/attachment.html 


More information about the dtrace-discuss mailing list