FELIX-2291 Provide number of processors available to the Java VM in the System Information tab
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@935915 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/system/VMStatPlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/system/VMStatPlugin.java
index 05311e7..c7a1189 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/system/VMStatPlugin.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/system/VMStatPlugin.java
@@ -109,7 +109,7 @@
System.gc();
System.gc(); // twice for sure
}
- else if ( request.getParameter( PARAM_SHUTDOWN_TIMER ) == null )
+ else if ( request.getParameter( PARAM_SHUTDOWN_TIMER ) == null )
{
// whether to stop or restart the framework
@@ -206,6 +206,7 @@
json.put( "jvm", System.getProperty( "java.vm.name" ) + "(build " + System.getProperty( "java.vm.version" )
+ ", " + System.getProperty( "java.vm.info" ) + ")" );
json.put( "shutdownTimer", shutdownTimer );
+ json.put( "processors", Runtime.getRuntime().availableProcessors() );
json.put( "mem_total", totalMem );
json.put( "mem_free", freeMem );
json.put( "mem_used", usedMem );
diff --git a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
index 9c174bc..50dbc7e 100644
--- a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
+++ b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -61,6 +61,7 @@
vmstat.java.title=Java Information:
vmstat.java.runtime=Java Runtime
vmstat.java.jvm=Java Virtual Machine
+vmstat.processors=Anzahl Prozessoren
vmstat.mem.total=Total Hauptspeicher
vmstat.mem.used=Benutzter Hauptspeicher
vmstat.mem.free=Freier Hauptspeicher
diff --git a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
index 55ce787..5392504 100644
--- a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -62,6 +62,7 @@
vmstat.java.title=Java Information:
vmstat.java.runtime=Java Runtime
vmstat.java.jvm=Java Virtual Machine
+vmstat.processors=Number of Processors
vmstat.mem.total=Total Memory
vmstat.mem.used=Used Memory
vmstat.mem.free=Free Memory
diff --git a/webconsole/src/main/resources/templates/vmstat.html b/webconsole/src/main/resources/templates/vmstat.html
index bf1d09a..afac303 100644
--- a/webconsole/src/main/resources/templates/vmstat.html
+++ b/webconsole/src/main/resources/templates/vmstat.html
@@ -82,6 +82,10 @@
<td>${vmstat.java.jvm}</td>
<td id="jvm">-</td>
</tr>
+ <tr>
+ <td>${vmstat.processors}</td>
+ <td id="processors">-</td>
+ </tr>
<tr>
<td>${vmstat.mem.total}</td>
<td id="mem_total">-</td>