Can you please assist me with resolving a trouble with some code that at times is eating up allot of CPU resouces? The code is driven by Perl and calls Expect. The Expect code is basically dumping numerous tables to standard out that is captured into one file. A few of these table dumps are very large and begin eating up allot of CPU resources. The basic flow is the Perl code starts on a Midwest server, makes a system call to Expect, Expect logs into a West server and begins dumping table information to standard out that is being recorded in one file on the Midwest server where the Perl code was launched.
eval { alarm(9000); $expect_flg = $expect_flg + 1; $file = "$workdir/$clli.log"; system($pb_dms, $datakit, $workdir, $file); alarm(0); $expect_flg = 0; };

Edit by castaway - repaired code tags


In reply to Resource Hog by tc1364

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.