diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index a102912488fe59f56ab86d674260eecc053d662d..dbaca04033fa20842cd7f422c00f0cb7daa3ebbf 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -17,6 +17,8 @@ I2P <jsp:getProperty name="helper" property="version" /><br /> <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%><br /> <%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%><br /> +CPU <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)<br /> +jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%><br /> </p> <hr /> <jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" /> diff --git a/core/java/src/net/i2p/util/NativeBigInteger.java b/core/java/src/net/i2p/util/NativeBigInteger.java index 970de52c85d61dfd3cd40fc8dcce04ed55705d4a..a6d7e97925e9e4e3151f8a671a393b64821453c5 100644 --- a/core/java/src/net/i2p/util/NativeBigInteger.java +++ b/core/java/src/net/i2p/util/NativeBigInteger.java @@ -88,6 +88,8 @@ import net.i2p.util.Log; public class NativeBigInteger extends BigInteger { /** did we load the native lib correctly? */ private static boolean _nativeOk = false; + private static String _loadStatus = "uninitialized"; + private static String _cpuModel = "uninitialized"; /** * do we want to dump some basic success/failure info to stderr during * initialization? this would otherwise use the Log component, but this makes @@ -140,6 +142,9 @@ public class NativeBigInteger extends BigInteger { try { CPUInfo c = CPUID.getInfo(); + try { + _cpuModel = c.getCPUModelString(); + } catch (UnknownCPUException e) {} if (c.IsC3Compatible()) return JBIGI_OPTIMIZATION_VIAC3; if (c instanceof AMDCPUInfo) { @@ -256,6 +261,20 @@ public class NativeBigInteger extends BigInteger { return _nativeOk; } + public static String loadStatus() { + return _loadStatus; + } + + public static String cpuType() { + if (sCPUType != null) + return sCPUType; + return "unrecognized"; + } + + public static String cpuModel() { + return _cpuModel; + } + /** * <p>Compare the BigInteger.modPow/doubleValue vs the NativeBigInteger.modPow/doubleValue of some * really big (2Kbit) numbers 100 different times and benchmark the @@ -455,12 +474,14 @@ public class NativeBigInteger extends BigInteger { if(_doLog) System.err.println("INFO: " + s); I2PAppContext.getGlobalContext().logManager().getLog(NativeBigInteger.class).info(s); + _loadStatus = s; } private static void warn(String s) { if(_doLog) System.err.println("WARNING: " + s); I2PAppContext.getGlobalContext().logManager().getLog(NativeBigInteger.class).warn(s); + _loadStatus = s; } /**