# Socip_graphs.pl; Version 1.02, Aug 24, 1999 # # Perl-Script by Kajetan Hinner. This program is Mailware, every user should write to Kajetan@Hinner.com # mrtg_graphs.pl uses a Round-Robin-Archive created i.e. by Socip.pl or transform3.pl and creates some graphs. # # Socip_graphs.pl was developed using Linux 2.1.x, ircII 4.4, Perl 5.004 and KDE 4. As editor for large files I recommend nedit. # # How this script works: # # Should be easy to understand from the comments... # # Author: Kajetan Hinner, University of Rostock, Sociology Dep., Kajetan@Hinner.com # # Notice: My aim was to write a working program which is reliable and easy to maintain. It was not intended to write # state of the art perl code, which may be hard to read for others. Some remarks are in german. Sorry for that. # # # # Changes: # 1.01, 22.4.99 # 1.02, 24.8.99 Adapted "all data" range # 1.03, 12.1.01 Changed Gprint command for new RRDtool version 1.0.28 # ######################### We start with some black magic to print on failure. (this is taken from test.pl of mrtg3 demo package) # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) #BEGIN { $| = 1; print "1..1\n"; } #END {print "not ok 1\n" unless $loaded;} use RRDs; #$loaded = 1; #print "ok 1\n"; my $debug=3; print ("Debug Mode On ($debug)\n") if ($debug); # 1: print serious bugs (default) # 2: print something (for the interested into the internal working of the program) # 3: print everything (for debugging) use strict; use Date::Manip; # irc_report output uses german format (dd/mm/yy) # Attention: This is a problem when it's about german weekdays! if you change this, you have to # change "heute" to "today", "Fre" to "Fri" "Sam" to "Sat" and "gestern" to "yesterday" later in this script! &Date_Init("Language=German", "DateFormat=non-US"); # my $tz=&Date_TimeZone; # find out current TimeZone # my $tz=qx{date +%Z}; # print ("Current Time Zone is $tz\n") if ($debug > 1); my $self = $0; $self =~ s!^.*/!!; # Name of perl-script if (@ARGV < 4 || @ARGV > 5) { die "Usage: perl $self rrdfile(.rrd) outputdir URL [time_epoch_seconds]\n\n specifies the directory to write the graphs to (names are derived from rrd file)\n: accessing the graphs using http\n