diff --git a/configuration/buildAndUpdateProduct.sh b/configuration/buildAndUpdateProduct.sh index 1aacd72ff54..a698023facf 100755 --- a/configuration/buildAndUpdateProduct.sh +++ b/configuration/buildAndUpdateProduct.sh @@ -274,6 +274,13 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then mkdir $ACDIR/configuration fi + # seems that initial scripts not there + if [ ! -f "$ACDIR/start" ]; then + cp -v $PROJECT_HOME/java/target/start $ACDIR + cp -v $PROJECT_HOME/java/target/http2udpmirror $ACDIR + cp -v $PROJECT_HOME/java/target/configuration/logging.properties $ACDIR/configuration + fi + cd $ACDIR rm -rf $ACDIR/plugins/*.* diff --git a/configuration/mongodb.cfg b/configuration/mongodb.cfg index 1f9e407e03d..38b632cf8d8 100644 --- a/configuration/mongodb.cfg +++ b/configuration/mongodb.cfg @@ -1,7 +1,6 @@ port = 27017 master = true -dbpath = /opt/mongodb/data//mongodb-data -logpath = /opt/mongodb/data/logs/mongodb-data/mongodb.log +dbpath = /opt/mongodb/data/mongodb-data logappend = true directoryperdb = true rest = true diff --git a/java/com.sap.sailing.monitoring/src/com/sap/sailing/monitoring/sysinfo/SystemInformationImpl.java b/java/com.sap.sailing.monitoring/src/com/sap/sailing/monitoring/sysinfo/SystemInformationImpl.java index f27fb7dff54..e2516ba2046 100644 --- a/java/com.sap.sailing.monitoring/src/com/sap/sailing/monitoring/sysinfo/SystemInformationImpl.java +++ b/java/com.sap.sailing.monitoring/src/com/sap/sailing/monitoring/sysinfo/SystemInformationImpl.java @@ -1,10 +1,12 @@ package com.sap.sailing.monitoring.sysinfo; import java.io.BufferedReader; +import java.io.File; import java.io.FileReader; import java.io.IOException; import java.lang.management.ManagementFactory; import java.lang.management.OperatingSystemMXBean; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -81,7 +83,13 @@ public class SystemInformationImpl implements SystemInformation { try { sockstat = readProc("/proc/" + getPid() + "/net/sockstat"); } catch (Exception e) { - /* ignore */ + /* seems that there are no local socket counts, try to use + * global ones */ + try { + sockstat = readProc("/proc/net/sockstat"); + } catch (Exception ex) { + /* ok ignore */ + } } for (String line : sockstat) { @@ -236,6 +244,9 @@ public class SystemInformationImpl implements SystemInformation { result.append(getTotalZombieProcesses()).append(" (total processes zombie)").append("\n"); result.append(getTotalProcesses()).append(" (total)").append("\n"); + result.append("Contents of TMP directory (java.io.tmpdir)").append("\n"); + result.append(Arrays.toString(new File(System.getProperty("java.io.tmpdir")).listFiles())); + result.append("\nMemory:\n"); result.append(getFreeMemoryGlobal()/1000 + "kb (free, not cached, not inactive)\n"); result.append(getFreeMemoryJVM()/1000 + "kb (free JVM)\n"); @@ -255,6 +266,25 @@ public class SystemInformationImpl implements SystemInformation { int flags = NetFlags.CONN_TCP | NetFlags.CONN_UDP | NetFlags.CONN_SERVER; NetConnection[] connections = getOpenNetworkConnections(flags); + result.append("\nCalling Process Statistics:\n"); + result.append(getProcessInformation(getPid())); + + result.append("\nOpen Local Ports:\n"); + for (NetConnection ns : connections) { + if (ns.getRemoteAddress().equalsIgnoreCase("0.0.0.0") || + ns.getRemoteAddress().equalsIgnoreCase("127.0.0.1") || + ns.getRemoteAddress().equalsIgnoreCase("::")) + result.append(ns.getLocalAddress() + ":" + ns.getLocalPort()).append("\n"); + } + + flags = NetFlags.CONN_TCP | NetFlags.CONN_UDP | NetFlags.CONN_CLIENT; + connections = getOpenNetworkConnections(flags); + + result.append("\nOutbound Connections:\n"); + for (NetConnection ns : connections) { + result.append(ns.getLocalAddress() + ":" + ns.getLocalPort() + " -> " + ns.getRemoteAddress() + ":" + ns.getRemotePort()).append("\n"); + } + result.append("\nInbound Connections:\n"); for (NetConnection ns : connections) { /* ignore connections to self */ @@ -264,27 +294,6 @@ public class SystemInformationImpl implements SystemInformation { ) result.append(ns.toString()).append("\n"); } - - result.append("\nOpen Local Ports:\n"); - for (NetConnection ns : connections) { - if (ns.getRemoteAddress().equalsIgnoreCase("0.0.0.0") || - ns.getRemoteAddress().equalsIgnoreCase("127.0.0.1") || - ns.getRemoteAddress().equalsIgnoreCase("::")) - result.append(ns.toString()).append("\n"); - } - - flags = NetFlags.CONN_TCP | NetFlags.CONN_UDP | NetFlags.CONN_CLIENT; - connections = getOpenNetworkConnections(flags); - - result.append("\nOutbound Connections:\n"); - for (NetConnection ns : connections) { - result.append(ns.toString()).append("\n"); - } - - result.append("\nCalling Process Statistics:\n"); - result.append(getProcessInformation(getPid())); - - } catch (Exception ex) { ex.printStackTrace(); }