Hello.

This is my first post here but I'm no stranger to the site and have found it very useful over the years so many thanks to all you knowledgable contributors.

Preamble complete, now to the business at hand.

First thing to note is that this question sits astride the world of Perl scripting and also systems administration. I think it's Perl based enough to have a valid place here though.

I'm familiar with using backticks to execute shell commands from within perl and capturing the output but I'm wondering what happens if that shell command takes a very long time to complete and generates a *lot* of output.

To be specific, I've created a script that includes the following line:

$rdiff_result = `/usr/bin/rdiff-backup -v5 --print-statistics /mnt/pro +duction /mnt/iscsinas`;

The reason I'm running it from within Perl is that there are other things that I need to do that I'm more comfortable with from Perl than in shell script.

The context here is that this is a Red Hat Enterprise server running in a busy studio environment with 20 or so people connecting via afp/smb and various other services.

My concern is that this rdiff-backup is working on 5TB of data and this could generate an awful lot of logs with higher verbosity levels. Do I run the risk of exhausting the system resources?

Thanks in advance.


In reply to running shell commands from within perl by pablo78

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.