mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fix: numeric check
git-svn-id: https://svn.fhem.de/fhem/trunk@6713 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
937b9a0c14
commit
19f1b9249c
@ -30,7 +30,7 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $VERSION = "1.9.2";
|
||||
my $VERSION = "1.9.3";
|
||||
|
||||
use constant {
|
||||
PERL_VERSION => "perl_version",
|
||||
@ -928,11 +928,15 @@ SYSMON_getCPUCoreNum($)
|
||||
return $sys_cpu_core_num if $sys_cpu_core_num;
|
||||
|
||||
my $str = SYSMON_execute($hash, "cat /sys/devices/system/cpu/kernel_max");
|
||||
if(int($str)!=0) {
|
||||
$sys_cpu_core_num = int($str)+1;
|
||||
return $sys_cpu_core_num;
|
||||
}
|
||||
|
||||
if(defined($str)) {
|
||||
if($str ne "") {
|
||||
if(int($str)!=0) {
|
||||
$sys_cpu_core_num = int($str)+1;
|
||||
return $sys_cpu_core_num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1; # Default / unbekannt
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user