extended the status_p api with disk space information

pull/1/head
Michael Peter Christen 11 years ago
parent e1bf65c892
commit e40511f307

@ -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));

@ -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>

Loading…
Cancel
Save