mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Modified makegraphs
This commit is contained in:
@@ -1,26 +1,24 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
############################################################################
|
||||
###############################################################################
|
||||
# #
|
||||
# This file is part of the IPCop Firewall. #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# IPCop is free software; you can redistribute it and/or modify #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPCop is distributed in the hope that it will be useful, #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPCop; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
# Copyright (C) 2004-01-19 Mark Wormgoor <mark@wormgoor.com>. #
|
||||
# #
|
||||
############################################################################
|
||||
###############################################################################
|
||||
|
||||
use strict;
|
||||
#use warnings;
|
||||
@@ -40,8 +38,7 @@ my %mainsettings = ();
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
||||
|
||||
sub updatehdddata
|
||||
{
|
||||
sub updatehdddata{
|
||||
my $disk = $_[0];
|
||||
my $standby;
|
||||
my @array = split(/\//,$disk);
|
||||
@@ -81,9 +78,9 @@ sub updatehdddata
|
||||
if (!$standby){
|
||||
$temp = 0;
|
||||
my $smart_output = '';
|
||||
system("$path_smartctl -iHA -d ata /dev/$disk > /var/log/smartctl_out_hddtemp-$disk");
|
||||
if ( -e "/var/log/smartctl_out_hddtemp-".$array[$#array] ){
|
||||
my $hdd_output = `cat /var/log/smartctl_out_hddtemp-$array[$#array] | grep Temperature_`;
|
||||
system("$path_smartctl -iHA -d ata /dev/$disk > /tmp/smartctl_out_hddtemp-$disk");
|
||||
if ( -e "/tmp/smartctl_out_hddtemp-".$array[$#array] ){
|
||||
my $hdd_output = `cat /tmp/smartctl_out_hddtemp-$array[$#array] | grep Temperature_`;
|
||||
my @t = split(/\s+/,$hdd_output);
|
||||
$temp = $t[9];
|
||||
}else{$temp = 0;}
|
||||
@@ -97,8 +94,6 @@ sub updatehdddata
|
||||
}
|
||||
}
|
||||
|
||||
## Update ipac logs
|
||||
#system ('/usr/sbin/fetchipac');
|
||||
## Update vnstat
|
||||
system ('/usr/bin/vnstat -u');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user