> Hi,
>
> I'm on Solaris 8. By using pfiles, I can get some info. of the open files in
> a process. pfiles on Solaris 10 will also display the filename and path. But,
> I don't know how to get it on Solaris 8. Is there any way to do it by using
> mdb? Or, is there way to retrieve the filename and path with the inode
> number? Thanks.
>
> Hunter

If you use ::mdb -k on the live kernel, and then ::ps or ::pgrep to locate
the proc_t address of the process of interest, you can use the kernel
dcmd <proc-address>::pfiles.  Prior to Eric's work to add vnode pathnames
in Solaris 10, this will provide some limited visibility by doing DNLC
lookups on the various vnodes.  If you really desperately need the information
and you can't get it that way, find the vnode ops, get to the filesystem-
specific data (v_data), and then look at the raw information.  For example,
for UFS you could find the inode number and then use find -inum on the
filesystem to locate the file.  Painful, but if you're stuck on S8 and
really want the answer, that is one way to get it.

-Mike

-- 
Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/

Reply via email to