To the person who asked about disk space tracking...

Here is a little program that will email you at predetermined
times the disk space utilization of your servers:

First, an example cron job to run it:

# Runs spacetracker.pl every six hours.
# Good setting for busy networks with lots of users.
0 0,6,12,18 * * * /root/spacetracker.pl 

Now, the program. Modify as necessary. 

#!/usr/bin/perl

$mailprogram            =       "/usr/sbin/sendmail -t -oi"; # Location of Sendmail
$recipient              =       '[EMAIL PROTECTED],[EMAIL PROTECTED]';
$subjectline            =       "ServerNameHere [ Disk Space/Load Report ]";
$serverrootemail        =       '[EMAIL PROTECTED]';
$servername             =       "servername.splitinfinity.net";

# Do not change
$report                 =       `df`;
$report2                =       `uptime`;

open (MAIL, "|$mailprogram") || die("SpaceTracker: Could Not Open Mail Program -> 
spacetracker.cgi");
print MAIL <<__END_OF_MAIL__;
To: $recipient
From: $serverrootemail
Reply-to: DoNotReply ( DO NOT REPLY )
Subject: $subjectline


DAILY REPORT FOR $servername

DISK USAGE:

$report

SYSTEM LOAD:
$report2

This report is generated automatically by Chris Jesters Famous SpaceTracker.pl
The #1 way to monitor your networks disk space utilization.  You will receive
this report every six hours. www.splitinfinity.com
__END_OF_MAIL__
close (MAIL);

exit;

Reply via email to