On a Sun box I'm trying to find what files certain processes have open. I'm to the point where by using Proc::ProcessTable and the pfiles function on Sun (I don't have root privileges to us lsof) I can get the following information back for each of the files:
'Device' => '283,0',
'Create Mode' => 'O_RDWR FD_CLOEXEC',
'File Number' => '5',
'Group ID' => '14700',
'Mode' => '0000',
'Size' => '0',
'Type' => 'S_IFIFO',
'Inode' => '1877643288',
'User ID' => '5800'
I know I can use find to find the file name from the inode, but I'm having trouble getting from a device like '283,0' to a mounted file system I can search.
Searches have turned up too many results and the several CPAN modules I've tried haven't worked out. Can anyone recommend a good module I can use for this? Also I would love a module that could return a list of open files given a Pid, but I haven't been able to find anything like that.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|