changes to mac device

merge-requests/1/head
buddhinipun 9 years ago
parent e02f9bf4a5
commit c092542b8e

@ -337,25 +337,19 @@ public class DeviceTypeServiceImpl implements DeviceTypeService {
String summeryTableName;
switch (sensorName) {
case "battery" :
summeryTableName = DeviceTypeConstants.DEVICE_BATTERY_STATS;
break;
return DeviceTypeConstants.DEVICE_BATTERY_STATS;
case "charger":
summeryTableName = DeviceTypeConstants.DEVICE_CHARGER_STATS;
break;
return DeviceTypeConstants.DEVICE_CHARGER_STATS;
case "cpu":
summeryTableName = DeviceTypeConstants.DEVICE_CPU_STATS;
break;
return DeviceTypeConstants.DEVICE_CPU_STATS;
case "network":
summeryTableName = DeviceTypeConstants.DEVICE_NETWORK_STATS;
break;
return DeviceTypeConstants.DEVICE_NETWORK_STATS;
case "memory":
summeryTableName = DeviceTypeConstants.DEVICE_MEMORY_STATS;
break;
return DeviceTypeConstants.DEVICE_MEMORY_STATS;
case "harddisc":
summeryTableName = DeviceTypeConstants.DEVICE_HARD_DISC_STATS;
break;
return DeviceTypeConstants.DEVICE_HARD_DISC_STATS;
default:
summeryTableName = "";
return null;
}
summeryTableName= summeryTableName.replaceAll("\\u200B","");
return summeryTableName;

@ -68,7 +68,7 @@ public class Collector {
BashRunner bashRunner = new BashRunner();
systemUsage.setMacaddress(bashRunner.runScript(this.OS, 0,suPassword));
systemUsage.setProcessor_usage(Float.valueOf(bashRunner.runScript(this.OS, 10,suPassword)));
systemUsage.setMemory_usage(Float.valueOf(bashRunner.runScript(this.OS, 11,suPassword)));
//systemUsage.setMemory_usage(Float.valueOf(bashRunner.runScript(this.OS, 11,suPassword)));
systemUsage.setStorage_usage(Float.valueOf(bashRunner.runScript(this.OS, 12,suPassword)));
systemUsage.setBattery_percentage(Float.valueOf(bashRunner.runScript(this.OS, 13,suPassword)));
systemUsage.setBattery_pluggedin(Byte.valueOf(bashRunner.runScript(this.OS, 14,suPassword)));

Loading…
Cancel
Save