Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

extended the status_p api with disk space information

Michael Peter Christene40511f3073a
diff --git a/htroot/api/status_p.java b/htroot/api/status_p.java
index 17435c07c..bf66f76d6 100644
--- a/htroot/api/status_p.java
+++ b/htroot/api/status_p.java
@@ -68,12 +68,15 @@ public class status_p {
prop.putNum("wordCacheMaxSize", cacheMaxSize);
// memory usage and system attributes
+ prop.putNum("usedMemory", MemoryControl.used());
prop.putNum("freeMemory", MemoryControl.free());
prop.putNum("totalMemory", MemoryControl.total());
prop.putNum("maxMemory", MemoryControl.maxMemory());
+ prop.putNum("usedDisk", sb.observer.getSizeOfDataPath(true));
+ prop.putNum("freeDisk", sb.observer.getUsableSpace());
prop.putNum("processors", WorkflowProcessor.availableCPU);
prop.putNum("load", Memory.load());
-
+
// proxy traffic
prop.put("trafficIn", ByteCount.getGlobalCount());
prop.put("trafficProxy", ByteCount.getAccountCount(ByteCount.PROXY));
diff --git a/htroot/api/status_p.xml b/htroot/api/status_p.xml
index 9da652ada..73c6607de 100644
--- a/htroot/api/status_p.xml
+++ b/htroot/api/status_p.xml
@@ -6,11 +6,17 @@
<wordCacheMaxSize>#[wordCacheMaxSize]#</wordCacheMaxSize>
<memory>
+ <used>#[usedMemory]#</used>
<free>#[freeMemory]#</free>
<total>#[totalMemory]#</total>
<max>#[maxMemory]#</max>
</memory>
+ <disk>
+ <used>#[usedDisk]#</used>
+ <free>#[freeDisk]#</free>
+ </disk>
+
<processors>#[processors]#</processors>
<load>#[load]#</load>
@@ -57,7 +63,7 @@
</noloadcrawlerqueue>
<!-- crawl profile list -->
-#(crawlProfiles)#::
+#(crawlProfiles)#<crawls count="0"/>::
<crawls count="#[count]#">
#{list}#
<crawl>