<?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 Need help with a perl script... in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932331#M46235</link>
    <description>I'm not savvy with perl and need help modifying one that parses an application tuxedo "ubb" file to find locations where core files may be dumped... &lt;BR /&gt;&lt;BR /&gt;New applications structure does not make use of tuxedo, therefore no need to read any ubb files (the dump location is pretty much static) but the same script should be able to search for core files in either type of application (tuxedo and non-tuxed0... Can only show script to someone who can help!</description>
    <pubDate>Sun, 09 Oct 2005 14:18:51 GMT</pubDate>
    <dc:creator>MAD_2</dc:creator>
    <dc:date>2005-10-09T14:18:51Z</dc:date>
    <item>
      <title>Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932331#M46235</link>
      <description>I'm not savvy with perl and need help modifying one that parses an application tuxedo "ubb" file to find locations where core files may be dumped... &lt;BR /&gt;&lt;BR /&gt;New applications structure does not make use of tuxedo, therefore no need to read any ubb files (the dump location is pretty much static) but the same script should be able to search for core files in either type of application (tuxedo and non-tuxed0... Can only show script to someone who can help!</description>
      <pubDate>Sun, 09 Oct 2005 14:18:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932331#M46235</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-09T14:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932332#M46236</link>
      <description>OK, here is more, I figured not much can be done without information:&lt;BR /&gt;&lt;BR /&gt;1)  Main chunk of code attached.&lt;BR /&gt;2)  4 new applications are coming into play, let's call them:  xxa, xxb, xxc, xxd&lt;BR /&gt;3)  Neither one of these are specified in a ubb file, so in this case no need to havea "$ubbfileloc", however they all have a common "core" dump location, per say:&lt;BR /&gt;&lt;BR /&gt;/main/obe/&lt;PHASE&gt;/&lt;APP&gt;/com/core&lt;BR /&gt;&lt;BR /&gt;PHASE is one of the corresponding "phases", this one is new and unique, named PPR (capitalized) and it's a test one too, and it's the only one that will have structure above for where core files are dumped.&lt;BR /&gt;for the new one, &lt;APP&gt; is either xxa, xxb, xxc, or xxd.&lt;BR /&gt;&lt;BR /&gt;4) The rest will still follow the same parameters as the attached file (how many files to keep, if to be removed what's the oldest they can be, etc.&lt;BR /&gt;&lt;BR /&gt;Is this understandable?&lt;/APP&gt;&lt;/APP&gt;&lt;/PHASE&gt;</description>
      <pubDate>Sun, 09 Oct 2005 14:55:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932332#M46236</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-09T14:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932333#M46237</link>
      <description>1. can you generally describe what your code should do and it doesn't-it'll be much easier to help you this way.&lt;BR /&gt;&lt;BR /&gt;2. There's this site I always use when I need a quick answer:&lt;BR /&gt;&lt;A href="http://www.perlmonks.org/" target="_blank"&gt;http://www.perlmonks.org/&lt;/A&gt;&lt;BR /&gt;you need to register there.&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Oct 2005 02:36:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932333#M46237</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2005-10-10T02:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932334#M46238</link>
      <description>Hmmm.  I thought I did describe what the code does and does not do, per my description above.  Anyhow, it's not "my code", but I am being asked to modify it to fit other needs.&lt;BR /&gt;&lt;BR /&gt;What it does:&lt;BR /&gt;1)  Looks into a file (a tuxedo ubb file), to find out where it's configured in there for certain applications to do core dumps, if these should fail.&lt;BR /&gt;2)  Once it finds possible locations of these core dumps, then it goes to those directories (all can have different directories, based on an environment phase fof the application, by that I mean production, development, one of many test, and the specific application), for example, one node may have as many paths as these:&lt;BR /&gt;1st is same application in two different test phases; second is 2 more in yet other different phases (core dump locations):&lt;BR /&gt;  /main/obe/MIG/app1/com/bint&lt;BR /&gt;  /main/obe/TST/app1/com/bint&lt;BR /&gt;  /main/obe/TST2/app2/bint&lt;BR /&gt;  /main/obe/PRP/app2/bint&lt;BR /&gt;&lt;BR /&gt;The script parses the file to get these possible locations.  Then it lists the core files in there and removes some if found, based on criteria:  a) age, b) number of core dump files found (more than "x" only keep the latest created).&lt;BR /&gt;&lt;BR /&gt;What it does not do:&lt;BR /&gt;&lt;BR /&gt;A new series of applications has been created that does not have a file to parse (named ubb above).  For these new applications the general location is:&lt;BR /&gt;/main/obe/&lt;PHASE&gt;/&lt;APPLICATION&gt;/com/core (it's a common general path).&lt;BR /&gt;&lt;BR /&gt;How can I integrate this entirely different option but yet follow the same guidelines for core files removal as explained above.  Since applications of both types may run in the same system we'd like to stick using the one script. &lt;BR /&gt;&lt;BR /&gt;Is this better?&lt;BR /&gt;&lt;BR /&gt;MAD&lt;BR /&gt;&lt;/APPLICATION&gt;&lt;/PHASE&gt;</description>
      <pubDate>Mon, 10 Oct 2005 15:10:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932334#M46238</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-10T15:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932335#M46239</link>
      <description>Main attachment was removed but it could be re-posted with a few modifications I need to make if someone could help, otherwise I think I can close... Any ideas?&lt;BR /&gt;&lt;BR /&gt;MAD</description>
      <pubDate>Tue, 11 Oct 2005 15:16:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932335#M46239</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-11T15:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932336#M46240</link>
      <description>if the general path always ends with core,&lt;BR /&gt;then you can append a function to your script that searches some folder recursively and finds the "core" directories.&lt;BR /&gt;In the following example it prints the files it finds there,but you can do any manipulation you wish.&lt;BR /&gt;Hope I understood and it helps.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use File::Find;&lt;BR /&gt;$start_point="/main/obe";&lt;BR /&gt;find (\&amp;amp;search,$start_point);&lt;BR /&gt;for (@list)&lt;BR /&gt;{&lt;BR /&gt;   @files=glob "$_/*";&lt;BR /&gt;   for (@files)&lt;BR /&gt;   {&lt;BR /&gt;      print "$_\n";&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;sub search&lt;BR /&gt;{&lt;BR /&gt;    if (-d $_ &amp;amp;&amp;amp; /core$/)&lt;BR /&gt;    {&lt;BR /&gt;        push @list,$File::Find::dir."/$_";&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Oct 2005 04:25:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932336#M46240</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2005-10-12T04:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932337#M46241</link>
      <description>Basically, the code has the attached subroutine.&lt;BR /&gt;&lt;BR /&gt;It's called from the following lines:&lt;BR /&gt;&lt;BR /&gt;*****************************************&lt;BR /&gt;if ($APPLI_CNT &amp;gt; 0)   &lt;BR /&gt;{&lt;BR /&gt;   print "................&amp;gt;";&lt;BR /&gt;   for ($j = 0; $j &amp;lt; scalar(@LES_APPLI); $j++)&lt;BR /&gt;   {&lt;BR /&gt;      chomp($LES_APPLI[$j]);&lt;BR /&gt;      print "\n&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;App nber ", $j + 1, " is ", uc($LES_APPLI[$j]),"\n";&lt;BR /&gt;          for ($t = 0; $t &amp;lt; scalar(@phases) ; $t++)&lt;BR /&gt;     {&lt;BR /&gt;              if ($LES_APPLI[$j] =~ /aaa|bbb|ccc|ddd/ )&lt;BR /&gt;                  {&lt;BR /&gt;                  $newpath = "/main/obe/$phases[$t]/$LES_APPLI[$j]/com/core";&lt;BR /&gt;                  print "check: $newpath\n";&lt;BR /&gt;                  new_path "$newpath";&lt;BR /&gt;                  }&lt;BR /&gt;              elsif ($LES_APPLI[$j] =~ /eee|fff|ggg/ )   #  special treatment needed for the CPX application&lt;BR /&gt;                  {&lt;BR /&gt;                  $environmentfile = "/main/obe/$phases[$t]/$LES_APPLI[$j]/com/etc/cfg/environment_$LES_APPLI[$j]";&lt;BR /&gt;                  print "check: $environmentfile\n";&lt;BR /&gt;                  look_for_environment "$environmentfile";&lt;BR /&gt;                  }&lt;BR /&gt;              elsif ($LES_APPLI[$j] =~ /ngi/ )   #  special treatment needed for the NGI&lt;BR /&gt;                  {&lt;BR /&gt;                  $environmentfile = "/main/obe/$phases[$t]/$LES_APPLI[$j]/com/etc/cfg/environment_com";&lt;BR /&gt;                  print "check: $environmentfile\n";&lt;BR /&gt;                  look_for_environment "$environmentfile";&lt;BR /&gt;                  }&lt;BR /&gt;              else&lt;BR /&gt;                  {&lt;BR /&gt;                  $environmentfile = "/main/obe/$phases[$t]/$LES_APPLI[$j]/etc/cfg/environment_$LES_APPLI[$j]";&lt;BR /&gt;                  print "check: $environmentfile\n";&lt;BR /&gt;                  look_for_environment "$environmentfile";&lt;BR /&gt;                  }&lt;BR /&gt;     }&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Oct 2005 11:49:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932337#M46241</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-13T11:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932338#M46242</link>
      <description>Problem... It's looking at the file created with the files it found twice and attempting to remove them a second time, although if the parameters set are met, it has already removed them, complaining with errors like the following:&lt;BR /&gt;&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;&lt;BR /&gt;/ama/obe/TST1/bbb/bint/core.20050928 not found&lt;BR /&gt;/usr/local/bin/sudo: Illegal option -f&lt;BR /&gt;usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]&lt;BR /&gt;            [-u username/#uid] -s | &lt;COMMAND&gt;&lt;BR /&gt;/ama/obe/TST1/bbb/bint/core.20050930 not found&lt;BR /&gt;/usr/local/bin/sudo: Illegal option -f&lt;BR /&gt;usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]&lt;BR /&gt;            [-u username/#uid] -s | &lt;COMMAND&gt;&lt;BR /&gt;/ama/obe/TST1/bbb/bint/core.20050929 not found&lt;BR /&gt;/usr/local/bin/sudo: Illegal option -f&lt;BR /&gt;usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]&lt;BR /&gt;            [-u username/#uid] -s | &lt;COMMAND&gt;&lt;BR /&gt;/ama/obe/TST1/bbb/bint/core.20050926 not found&lt;BR /&gt;/usr/local/bin/sudo: Illegal option -f&lt;BR /&gt;usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]&lt;BR /&gt;            [-u username/#uid] -s | &lt;COMMAND&gt;&lt;BR /&gt;/ama/obe/TST1/bbb/bint/core.20050922 not found&lt;BR /&gt;/usr/local/bin/sudo: Illegal option -f&lt;BR /&gt;usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]&lt;BR /&gt;            [-u username/#uid] -s | &lt;COMMAND&gt;&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;&lt;BR /&gt;This, after the files were actually found, they were there, they were also removed as per the subroutine's guidelines... anyone see the mistake I've made on the modifications I have used?&lt;BR /&gt;&lt;BR /&gt;Thanks for any ideas...&lt;BR /&gt;&lt;BR /&gt;MAD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/COMMAND&gt;&lt;/COMMAND&gt;&lt;/COMMAND&gt;&lt;/COMMAND&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Thu, 13 Oct 2005 11:54:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932338#M46242</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-13T11:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932339#M46243</link>
      <description>So, any Perl expert's advise?&lt;BR /&gt;&lt;BR /&gt;MAD</description>
      <pubDate>Thu, 13 Oct 2005 15:47:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932339#M46243</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-13T15:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a perl script...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932340#M46244</link>
      <description>No solution found, but apparently I am in the wrong area and really no other responses providing a solution to my problem have been posted...&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Thu, 13 Oct 2005 21:20:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-with-a-perl-script/m-p/4932340#M46244</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2005-10-13T21:20:54Z</dc:date>
    </item>
  </channel>
</rss>

