Browse files

Made the daemon recognize Linux 3.1 as a valid version for the LinuxM…

…onitor
  • Loading branch information...
1 parent 6d38631 commit b6330ff24994831c366c2d18d98f10e9ff3951d9 @arigesher arigesher committed Dec 17, 2011
View
2 src/com/palantir/opensource/sysmon/SysmonDaemon.java
@@ -118,7 +118,7 @@ public static final SystemMonitor determinePlatformMonitor() throws SysmonExcept
String platformId = osName + " " + osVersion;
try {
- if(osName.equals("Linux") && osVersion.startsWith("2.6")) {
+ if(osName.equals("Linux") && (osVersion.startsWith("2.6") || osVersion.startsWith("3.1"))) {
return LinuxMonitor.class.newInstance();
}
} catch (Exception e) {
View
2 src/com/palantir/opensource/sysmon/linux/LinuxMonitor.java
@@ -180,7 +180,7 @@ public void verifyExecutionEnvironment(Properties config) throws SysmonException
if(!osName.equals("Linux")) {
throw new SysmonException("Linux monitoring can only run on Linux. Platform: " + osName);
}
- if(!osVersion.startsWith("2.6") || !osVersion.startsWith("3.1")) {
+ if(!osVersion.startsWith("2.6") && !osVersion.startsWith("3.1")) {
log.warn("Linux monitoring has only been tested on Linux 2.6, " +
"so some things may not work. Detected version: " + osVersion);
}

0 comments on commit b6330ff

Please sign in to comment.