mirror of https://github.com/mikaku/Monitorix.git
fixed a message of 'Argument isn't numeric in int ...' in 'nvidia' graph when using newer official drivers
This commit is contained in:
parent
9e553dc64b
commit
1d284f9fcc
2
Changes
2
Changes
|
@ -22,6 +22,8 @@
|
|||
- Fixed a bug that prevented a correctly data collection in the 'fail2ban'
|
||||
graph. [#23]
|
||||
- Fixed the description of 'netstats_in_bps' in monitorix.conf(5) man page.
|
||||
- Fixed a message of 'Argument "" isn't numeric in int ...' in 'nvidia' graph
|
||||
when using newer official drivers.
|
||||
- Little code cleaning.
|
||||
|
||||
|
||||
|
|
|
@ -208,10 +208,12 @@ sub get_nvidia_data {
|
|||
my ($value, undef) = split(' ', $tmp);
|
||||
$value =~ s/[-]/./;
|
||||
$value =~ s/[^0-9.]//g;
|
||||
$value ||= 0; # zero if not numeric
|
||||
if(int($value) > 0) {
|
||||
$cpu = int($value);
|
||||
}
|
||||
}
|
||||
# not used
|
||||
if($data[$l] =~ /Memory/) {
|
||||
my (undef, $tmp) = split(':', $data[$l]);
|
||||
if($tmp eq "\n") {
|
||||
|
@ -221,6 +223,7 @@ sub get_nvidia_data {
|
|||
my ($value, undef) = split(' ', $tmp);
|
||||
$value =~ s/[-]/./;
|
||||
$value =~ s/[^0-9.]//g;
|
||||
$value ||= 0; # zero if not numeric
|
||||
if(int($value) > 0) {
|
||||
$mem = int($value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue