Commit 52f69a4f authored by Florian Fittkau's avatar Florian Fittkau

1.0

parent 08e9c83f
......@@ -74,7 +74,7 @@
<zipfileset excludes="META-INF/*.SF" src="lib/aspectjweaver-1.8.5.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/slf4j-api-1.7.5.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/disruptor-3.3.0.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/sigar.jar"/>
<!-- <zipfileset excludes="META-INF/*.SF" src="lib/sigar.jar"/> -->
<!-- <zipfileset excludes="META-INF/*.SF" src="lib/hsqldb-2.3.1.jar"/> -->
<!-- <zipfileset excludes="META-INF/*.SF" src="lib/servlet-api-3.0.jar"/> -->
</jar>
......@@ -101,7 +101,7 @@
<zipfileset excludes="META-INF/*.SF" src="${build.dir}/explorviz-common.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/slf4j-api-1.7.5.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/disruptor-3.3.0.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/sigar.jar"/>
<!-- <zipfileset excludes="META-INF/*.SF" src="lib/sigar.jar"/> -->
</jar>
</target>
......
......@@ -24,7 +24,7 @@ explorviz.live_trace_processing.debug=false
explorviz.live_trace_processing.android_monitoring=false
explorviz.live_trace_processing.monitoring_enabled=true
explorviz.live_trace_processing.system_monitoring_enabled=false
explorviz.live_trace_processing.system_monitoring_enabled=true
explorviz.live_trace_processing.continous_monitoring_enabled=false
......
......@@ -32,9 +32,9 @@ public class JDBCAspect {
/* Related JDBC calls */
/* http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html */
private static final String RELATED_CALLS =
/** Connection **/
/* createStatment */
"(call(java.sql.Statement java.sql.Connection.createStatement()) "
/** Connection **/
/* createStatment */
"(call(java.sql.Statement java.sql.Connection.createStatement()) "
/* prepareStatement */
+ "|| call(java.sql.PreparedStatement java.sql.Connection.prepareStatement(String)) "
+ "|| call(java.sql.PreparedStatement java.sql.Connection.prepareStatement(String, String[])) "
......@@ -337,8 +337,6 @@ public class JDBCAspect {
}
formattedReturnValue = String.valueOf(numberOfRows);
break;
// TODO - relevant return types?
case "STATEMENT":
break;
case "PREPAREDSTATEMENT":
......
......@@ -27,11 +27,11 @@ public class SystemMonitor {
@Override
public void run() {
try {
final double cpuUtil = SystemMonitorSigarProbe.getSystemCpuLoad();
final double cpuUtil = SystemMonitorProbe.getSystemCpuLoad();
if (cpuUtil >= 0) { // fixes -1 bug in first seconds
final SystemMonitoringRecord record = new SystemMonitoringRecord(cpuUtil,
SystemMonitorProbe.getUsedPhysicalMemorySize(), SystemMonitorProbe
.getTotalPhysicalMemorySize(), null);
.getTotalPhysicalMemorySize(), null);
MonitoringController.sendOutSystemRecord(record);
}
} catch (final Exception e) {
......
package explorviz.live_trace_processing.system_mon;
import org.hyperic.sigar.CpuPerc;
import org.hyperic.sigar.Mem;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarException;
public class SystemMonitorSigarProbe {
private final static Sigar sigar = new Sigar();
public static double getSystemCpuLoad() {
CpuPerc cpu = null;
try {
cpu = sigar.getCpuPerc();
} catch (final SigarException se) {
se.printStackTrace();
}
return cpu.getCombined();
}
public static long getTotalPhysicalMemorySize() {
Mem mem = null;
try {
mem = sigar.getMem();
} catch (final SigarException se) {
se.printStackTrace();
}
return mem.getTotal();
}
public static long getFreePhysicalMemorySize() {
Mem mem = null;
try {
mem = sigar.getMem();
} catch (final SigarException se) {
se.printStackTrace();
}
return mem.getFree();
}
public static long getUsedPhysicalMemorySize() {
Mem mem = null;
try {
mem = sigar.getMem();
} catch (final SigarException se) {
se.printStackTrace();
}
return mem.getUsed();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment