mirror of https://github.com/mikaku/Monitorix.git
add a check to verify if 'nvidia-smi' command does exists in the system
This commit is contained in:
parent
72344fe8a6
commit
60e4e11529
|
@ -32,6 +32,12 @@ sub nvidia_init {
|
|||
my ($package, $config, $debug) = @_;
|
||||
my $rrd = $config->{base_lib} . $package . ".rrd";
|
||||
|
||||
# checks if 'nvidia-smi' does exists.
|
||||
if(!open(IN, "nvidia-smi |")) {
|
||||
logger("$myself: unable to execute 'nvidia-smi'. $!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(-e $rrd)) {
|
||||
logger("Creating '$rrd' file.");
|
||||
eval {
|
||||
|
|
Loading…
Reference in New Issue