Perl script for checking MySQL database disk space usage (in GB)
#!/usr/bin/perl
# database size verification
use DBI;
use Getopt::Long;
#Commandline arguments
#my @cmdline = @ARGV;
#my $counts =@cmdline;
sub usage {
print STDERR @_, “n” if @_;
die <<EOF;
Usage: [ options ]
Options:
-?,
–help
show this help
-h, –host=…
connect to host
-u,
–usr=… user
for login if not current user
-p, –password=… password to use
when connecting to server
-s, –socket=… socket to
use when connecting to server
-d, …