<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to identify any processes running on a huge directory structure? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761043#M389097</link>
    <description>Hi (again) Steve:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # find perl -atime -1 -type f -print&lt;BR /&gt;&amp;gt; if something shows up, I know it's in use?&lt;BR /&gt;&lt;BR /&gt;Well, you know that it *has been* *accessed* (read or executed) not necessarily that it is in-use.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 04 Mar 2011 14:35:26 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-03-04T14:35:26Z</dc:date>
    <item>
      <title>How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761030#M389084</link>
      <description>I have a big directory structure with lots of junk in it.  I want to make sure it is not being used before I delete it.  Is there a utility, or should I run fuser FILENAME, 259,432,343 times?&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Mar 2011 18:19:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761030#M389084</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2011-03-03T18:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761031#M389085</link>
      <description>IMHO the tool lsof is better than fuser here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But it is still hard to decide.&lt;BR /&gt;What if the files are not currently open, but an application will need it later?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Whatever you will do, backup the files before delete them.</description>
      <pubDate>Thu, 03 Mar 2011 18:23:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761031#M389085</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2011-03-03T18:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761032#M389086</link>
      <description>Hi Steve:&lt;BR /&gt;&lt;BR /&gt;You don't say, but if the directory is mounted, you won't be able to unmount it until there are no open files and/or no one is 'cd'ed into it.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 03 Mar 2011 18:27:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761032#M389086</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-03-03T18:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761033#M389087</link>
      <description>"IMHO the tool lsof is better than fuser here."  I don't want to lsof  259,432,343 times either. &lt;BR /&gt;&lt;BR /&gt;The directory I am talking about is not a filesystem.  It is a sub,sub,sub-directory of a filesystem.  It is an old copy of perl.  &lt;BR /&gt;&lt;BR /&gt;Maybe I could do this in reverse?  Is there a command that identifies files in use given a list of processes?  I know that I have a small set of apache test websites that might be using this subdirectory.  I'd rather run a command 30 times instead of, well, a LOT of times.&lt;BR /&gt;&lt;BR /&gt;On a side note, the idea of shutting down the computer will make sure the files are not in use.  WELL....That is until I bring it up again, then some unknown application would go nuts trying to use files I trashed.  THAT's no good.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Mar 2011 18:41:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761033#M389087</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2011-03-03T18:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761034#M389088</link>
      <description>In Unix, there is almost always more than one way to do things. Here are a few that came to my mind for a case like this:&lt;BR /&gt;&lt;BR /&gt;- A single "fuser -c &lt;MOUNTPOINT&gt;" will list you all processes running on the filesystem. That is likely to be much less than 259 432 343 processes. Then "lsof -p &lt;PID&gt;" can be used to tell what each process is accessing, unless you happen to know it by some other way (e.g. by recognizing the process and knowing what it *does* use). If that is still too long a list, then pipe it to "grep sub-sub-sub-directory" to see at once whether it uses your directory structure or not.&lt;BR /&gt;&lt;BR /&gt;- lsof +D &lt;TOP-OF-DIRECTORY-STRUCTURE&gt; can do the job at once, although the man page warns it might be slow and take quite a bit of memory to run. If it outputs anything at all, you'll know something is using one of the files within the directory structure.&lt;BR /&gt;&lt;BR /&gt;- If you choose to use fuser, you probably will need to run fuser a considerably smaller number of times if you put multiple filenames on each line. And you certainly don't have to type any of those lines yourself. Instead, you should type something like:&lt;BR /&gt;&lt;BR /&gt;find &lt;TOP-OF-DIRECTORY-STRUCTURE&gt; -exec fuser \+&lt;BR /&gt;&lt;BR /&gt;...and let the machine do what it can do best.&lt;BR /&gt;&lt;BR /&gt;MK&lt;/TOP-OF-DIRECTORY-STRUCTURE&gt;&lt;/TOP-OF-DIRECTORY-STRUCTURE&gt;&lt;/PID&gt;&lt;/MOUNTPOINT&gt;</description>
      <pubDate>Thu, 03 Mar 2011 19:24:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761034#M389088</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-03-03T19:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761035#M389089</link>
      <description>It looks like I need to get tutorials on lssf.&lt;BR /&gt;&lt;BR /&gt;...and need to give Torsten a few more points.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Mar 2011 19:33:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761035#M389089</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2011-03-03T19:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761036#M389090</link>
      <description>&lt;!--!*#--&gt;&amp;gt; On a side note, the idea of shutting down&lt;BR /&gt;&amp;gt; the computer will make sure the files are&lt;BR /&gt;&amp;gt; not in use. WELL....That is until I bring&lt;BR /&gt;&amp;gt; it up again, then some unknown application&lt;BR /&gt;&amp;gt; would go nuts trying to use files I&lt;BR /&gt;&amp;gt; trashed. THAT's no good.&lt;BR /&gt;&lt;BR /&gt;Why "trash" the files?  Why not simply rename&lt;BR /&gt;the top-level directory (before the&lt;BR /&gt;shut-down), and then wait for complaints&lt;BR /&gt;after you bring it back up?  If you get none&lt;BR /&gt;(within some interval deemed to be&lt;BR /&gt;"adequate"), _then_ you can delete ("trash")&lt;BR /&gt;the directory tree.  If you get some, then&lt;BR /&gt;simply rename it back to what it was.&lt;BR /&gt;&lt;BR /&gt;"Seemples".</description>
      <pubDate>Thu, 03 Mar 2011 19:42:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761036#M389090</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-03-03T19:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761037#M389091</link>
      <description>The idea of moving stuff and waiting on complaints is drastically dependent on what the complaints will be, and from who they are coming from.  I have to be responsible.  That might mean that I cannot allow a situation that causes complaints.&lt;BR /&gt;&lt;BR /&gt;Ah. But you know that.  &lt;BR /&gt;</description>
      <pubDate>Thu, 03 Mar 2011 20:05:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761037#M389091</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2011-03-03T20:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761038#M389092</link>
      <description>I see a lot of problems here, but not really a simple solution ... :-(&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Assuming the directory is deep under let's say /opt, everything related to the mountpoint is difficult (unmount, actions related to the mounted lvol, etc ...).&lt;BR /&gt;&lt;BR /&gt;However, if you say it could be related to apache, what will likely happen?&lt;BR /&gt;&lt;BR /&gt;The files are sitting around doing nothing (not opened).&lt;BR /&gt;&lt;BR /&gt;If a user opens a link to a script, the script will be executed, the files opened and closed again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In such case looking for open files will not give you the results you want to have.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;IMHO there are 2 possible solutions:&lt;BR /&gt;&lt;BR /&gt;- don't touch anything&lt;BR /&gt;- trial and error&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Maybe 1) is the better solution ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;-)</description>
      <pubDate>Fri, 04 Mar 2011 11:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761038#M389092</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2011-03-04T11:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761039#M389093</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Audit your mount point several times by several days to observe the behavior inside. Uses your desired tool (lsof or fuser) to do this. :)&lt;BR /&gt;&lt;BR /&gt;Still, if you doubt to delete something, move it to a recycling point.&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Fri, 04 Mar 2011 11:52:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761039#M389093</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2011-03-04T11:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761040#M389094</link>
      <description>LIST=`/usr/bin/find /A/perl -name "*sl" -type f -print `&lt;BR /&gt;       &lt;BR /&gt;for X in $LIST&lt;BR /&gt;do&lt;BR /&gt;unset running&lt;BR /&gt;running=`fuser $X 2&amp;gt;&amp;gt;/dev/null`&lt;BR /&gt;if [ -n "${running}" ] ; then&lt;BR /&gt;print X is $X  and has pids of $running&lt;BR /&gt;# I can even take it a down a level&lt;BR /&gt;for P in $running&lt;BR /&gt;do&lt;BR /&gt;ps -fp $P&lt;BR /&gt;done&lt;BR /&gt;echo "------------------------\n" &lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;I used this.  With it, I discovered a dynamic shared object of perl was running with apache on 3 development websites.  I stopped the 3 and whammo.  No use anymore.&lt;BR /&gt;&lt;BR /&gt;I've never used lsof before.  If I did, I probably would replace the fuser command with it.  &lt;BR /&gt;&lt;BR /&gt;This script would be a performance hog.  I would not not want to run it on a whim.&lt;BR /&gt;&lt;BR /&gt;But I minimized the affect by just looking at files ending .sl.  I could see from my first accident, (ahem), that these were the only ones in use.  &lt;BR /&gt;</description>
      <pubDate>Fri, 04 Mar 2011 13:01:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761040#M389094</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2011-03-04T13:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761041#M389095</link>
      <description>Hi (again) Steve:&lt;BR /&gt;&lt;BR /&gt;If you backup this directory with a utility that restores the lastaccesstime stamp of the files backed up, then consider using 'find' to see what has been accessed since some point in time.&lt;BR /&gt;&lt;BR /&gt;For that matter, you still might glean some useful information if, for example, your complete backups were done weekly.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 04 Mar 2011 14:16:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761041#M389095</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-03-04T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761042#M389096</link>
      <description>...why can't I do this???&lt;BR /&gt;&lt;BR /&gt;cd /A&lt;BR /&gt;find perl -atime -1 -type f -print&lt;BR /&gt;&lt;BR /&gt;if something shows up, I know it's in use?&lt;BR /&gt;&lt;BR /&gt;Or&lt;BR /&gt;find perl -atime +600 -type f -print &amp;gt;old&lt;BR /&gt;find perl -type f -print &amp;gt; all&lt;BR /&gt;diff old all | more&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Mar 2011 14:23:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761042#M389096</guid>
      <dc:creator>Steve Post</dc:creator>
      <dc:date>2011-03-04T14:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761043#M389097</link>
      <description>Hi (again) Steve:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # find perl -atime -1 -type f -print&lt;BR /&gt;&amp;gt; if something shows up, I know it's in use?&lt;BR /&gt;&lt;BR /&gt;Well, you know that it *has been* *accessed* (read or executed) not necessarily that it is in-use.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 04 Mar 2011 14:35:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761043#M389097</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-03-04T14:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify any processes running on a huge directory structure?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761044#M389098</link>
      <description>&amp;gt;if something shows up, I know it's in use?&lt;BR /&gt;&lt;BR /&gt;You can touch a reference file of an hour or so ago and then find files:&lt;BR /&gt;-neweram ref-file</description>
      <pubDate>Sat, 05 Mar 2011 15:24:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-identify-any-processes-running-on-a-huge-directory/m-p/4761044#M389098</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-03-05T15:24:15Z</dc:date>
    </item>
  </channel>
</rss>

