To be able to view log files or the last X number of lines from them.
my $last_X_lines = `tail -nX'; # where X is the number required
Save to a new file if you want to FTP down just that part of the file.
Rotate theses files on demand instead of waiting for logrotate (some machines don't have it).
Net::Telnet - and do it manually.
Retrieve different files from different servers.
Net::FTP
before I make it 'safe' to do
Then I guess you'll be using SSH rather than Telnet :)
Of course, I'm lazytm, so I'd write a perl script to do everything from the server, FTP it up and run it through Telnet when needed, rather than the other way round (I don't know and can't be bothered to learn shell scripting :). assuming there aren't firewall issues, the scripts can then post/FTP the required data to a script/server somewhere where you can host web based scripts/FTP server.
.02
cLive ;-)
--
seek(JOB,$$LA,0);
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.