This commit is contained in:
Guillaume Castagnino 2020-12-26 12:18:06 +01:00
parent a290aa66de
commit ad4f4c6df3
3 changed files with 0 additions and 160 deletions

View File

@ -1,55 +0,0 @@
#!/usr/bin/perl -w
use strict;
use Cwd qw(realpath);
my $dirname;
BEGIN
{
# We use BEGIN here to calculate the dynamic path BEFORE parsing the "use lib" directive
my $real = realpath $0 || $0;
($dirname = $real) =~ s/\/[^\/]*$//;
}
# Add our custom path
use lib "$dirname";
use MyRRD;
my $rrd = '/var/lib/rrd';
my $img = '/home/www/rrd';
my $MyRRD = new MyRRD($rrd, $img);
# system
$MyRRD->cpu();
$MyRRD->memory(4096, 1024);
$MyRRD->load();
$MyRRD->cswitch();
$MyRRD->iostat('sda');
$MyRRD->iostat('sdb');
# temps
$MyRRD->hddtemp('sda', 'WD7501AALS');
$MyRRD->hddtemp('sdb', 'WD7501AALS');
$MyRRD->sensorstemp({
'hwmon0' => {
temp1_input => {name => "Core 1"}
},
'hwmon1' => {
temp1_input => {name => "Core 2"}
},
'hwmon2' => {
temp1_input => {name => "Core 3"}
},
'hwmon3' => {
temp1_input => {name => "Core 4"}
},
});
# serveurs
$MyRRD->apache('http://127.0.0.1:80/server-status?auto');
$MyRRD->nginx('https://127.0.0.1:443/server-status');
# network
$MyRRD->networkInterface('eth0', 'Interface locale');

View File

@ -1,49 +0,0 @@
#!/usr/bin/perl -w
use strict;
use Cwd qw(realpath);
my $dirname;
BEGIN
{
# We use BEGIN here to calculate the dynamic path BEFORE parsing the "use lib" directive
my $real = realpath $0 || $0;
($dirname = $real) =~ s/\/[^\/]*$//;
}
# Add our custom path
use lib "$dirname";
use MyRRD;
my $rrd = '/var/lib/rrd';
my $img = '/home/www/rrd';
my $MyRRD = new MyRRD($rrd, $img);
# system
$MyRRD->cpu();
$MyRRD->memory(4096, 1024);
$MyRRD->load();
$MyRRD->cswitch();
$MyRRD->iostat('sda');
$MyRRD->iostat('sdb');
# temps
$MyRRD->hddtemp('sda', 'WD7501AALS');
$MyRRD->hddtemp('sdb', 'WD7501AALS');
$MyRRD->sensorstemp({
'hwmon0' => {
temp1_input => {name => "Core 1"}
},
'hwmon1' => {
temp1_input => {name => "Core 2"}
},
});
# serveurs
$MyRRD->apache('http://127.0.0.1:80/server-status?auto');
$MyRRD->nginx('https://127.0.0.1:443/server-status');
# network
$MyRRD->networkInterface('eth0', 'Interface locale');

View File

@ -1,56 +0,0 @@
#!/usr/bin/perl -w
use strict;
use Cwd qw(realpath);
my $dirname;
BEGIN
{
# We use BEGIN here to calculate the dynamic path BEFORE parsing the "use lib" directive
my $real = realpath $0 || $0;
($dirname = $real) =~ s/\/[^\/]*$//;
}
# Add our custom path
use lib "$dirname";
use MyRRD;
my $rrd = '/var/lib/rrd';
my $img = '/home/www/tatooine.xwing.info/rrd';
my $MyRRD = new MyRRD($rrd, $img);
# system
$MyRRD->cpu();
$MyRRD->memory(4096, 1024);
$MyRRD->load();
$MyRRD->cswitch();
$MyRRD->iostat('sda');
# temps
$MyRRD->hddtemp('sda', 'WD2500BEVS');
$MyRRD->sensorstemp({
'hwmon1' => {
temp2_input => {name => "Core 1\t"},
temp3_input => {name => "Core 2\t"},
},
'hwmon2' => {
temp1_input => {name => "CPU\t\t\t"},
temp2_input => {name => "Northbridge"},
temp4_input => {name => "GPU\t\t\t"},
#temp5_input => {name => "Battery (secondary)"},
temp7_input => {name => "Battery\t"},
temp9_input => {name => "RAM\t\t\t"},
#temp10_input => {name => "Touchpad\t\t"},
},
});
# Batterie
$MyRRD->battery("BAT0");
# serveurs
$MyRRD->nginx('http://127.0.0.1:80/server-status');
# network
$MyRRD->networkInterface('eth0', 'Interface locale');
$MyRRD->networkInterface('wlan0', 'Interface wifi');