Skip to content

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

queuesizes in queues_p.xml

allo3fd164189347
diff --git a/htroot/WatchCrawler.html b/htroot/WatchCrawler.html
index 3f61a8853..42fee3b28 100644
--- a/htroot/WatchCrawler.html
+++ b/htroot/WatchCrawler.html
@@ -15,7 +15,13 @@
Next update in <span id="nextUpdate" onclick="changeInterval()"></span> seconds.<br />
PPM: <span id="ppm">&nbsp;&nbsp;&nbsp;</span>
</div>
-Loader:
+<p />
+<div>
+Loader:
+<br />
+Size: <span id="loaderqueuesize">&nbsp;&nbsp;&nbsp;</span><br />
+Max: <span id="loaderqueuemax">&nbsp;&nbsp;&nbsp;</span><br />
+</div>
<table border="0" cellpadding="2" cellspacing="1" id="loaderTable" width="100%">
<tbody>
<tr class="TableHeader">
@@ -28,9 +34,9 @@ Loader:
</tbody>
</table>
<div>
-Indexing Queue:
-Queue Size: <span id="indexingqueuesize">&nbsp;&nbsp;&nbsp;</span>
-Queue Max: <span id="indexingqueuemax">&nbsp;&nbsp;&nbsp;</span>
+Indexing Queue:<br />
+Size: <span id="indexingqueuesize">&nbsp;&nbsp;&nbsp;</span><br />
+Max: <span id="indexingqueuemax">&nbsp;&nbsp;&nbsp;</span><br />
</div>
<table border="0" cellpadding="2" cellspacing="1" id="indexingTable" width="100%">
<tbody>
@@ -45,7 +51,9 @@ Queue Max: <span id="indexingqueuemax">&nbsp;&nbsp;&nbsp;</span>
</tr>
</tbody>
</table>
-<div>Local Crawler</div>
+<div>Local Crawler<br />
+Size: <span id="localcrawlerqueuesize">&nbsp;&nbsp;&nbsp;</span><br />
+</div>
<table border="0" cellpadding="2" cellspacing="1" id="localCrawlerTable" width="100%">
<tbody>
<tr class="TableHeader">
@@ -57,7 +65,9 @@ Queue Max: <span id="indexingqueuemax">&nbsp;&nbsp;&nbsp;</span>
</tr>
</tbody>
</table>
-<div>Remote Crawler</div>
+<div>Remote Crawler<br />
+Size: <span id="remotecrawlerqueuesize">&nbsp;&nbsp;&nbsp;</span><br />
+</div>
<table border="0" cellpadding="2" cellspacing="1" id="remoteCrawlerTable" width="100%">
<tbody>
<tr class="TableHeader">
diff --git a/htroot/js/WatchCrawler.js b/htroot/js/WatchCrawler.js
index 580a38713..198671f11 100644
--- a/htroot/js/WatchCrawler.js
+++ b/htroot/js/WatchCrawler.js
@@ -59,19 +59,15 @@ function handleStatus(){
return;
}
var statusResponse = statusRPC.responseXML;
- /*indexingqueue=statusResponse.getElementsByTagName("indexingqueue")[0];
- indexingqueue_size=indexingqueue.firstChild.nextSibling;
- indexingqueue_max=indexingqueue_size.nextSibling.nextSibling;
- ppm=statusResponse.getElementsByTagName("ppm")[0];*/
statusTag=getFirstChild(getFirstChild(statusResponse, ""), "status")
- indexingqueue=getFirstChild(statusTag, "indexingqueue");
+ /*indexingqueue=getFirstChild(statusTag, "indexingqueue");
indexingqueue_size=getValue(getFirstChild(indexingqueue, "size"));
- indexingqueue_max=getValue(getFirstChild(indexingqueue, "max"));
+ indexingqueue_max=getValue(getFirstChild(indexingqueue, "max"));*/
ppm=getValue(getFirstChild(statusTag, "ppm"))
- document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size;
- document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max;
+/* document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size;
+ document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max;*/
document.getElementById("ppm").firstChild.nodeValue=ppm;
}
@@ -83,10 +79,30 @@ function handleQueues(){
var queuesResponse = queuesRPC.responseXML;
xml=getFirstChild(queuesResponse);
if(queuesResponse != null){
- createIndexingTable(getFirstChild(xml, "indexingqueue"));
+ indexingqueue=getFirstChild(xml, "indexingqueue");
+ createIndexingTable(indexingqueue);
+ indexingqueue_size=getValue(getFirstChild(indexingqueue, "size"));
+ indexingqueue_max=getValue(getFirstChild(indexingqueue, "max"));
+ document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size;
+ document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max;
+
+ loaderqueue=getFirstChild(xml, "loaderqueue");
createLoaderTable(getFirstChild(xml, "loaderqueue"));
- createLocalCrawlerTable(getFirstChild(xml, "localcrawlerqueue"));
- createRemoteCrawlerTable(getFirstChild(xml, "remotecrawlerqueue"));
+ loaderqueue_size=getValue(getFirstChild(loaderqueue, "size"));
+ loaderqueue_max=getValue(getFirstChild(loaderqueue, "max"));
+ document.getElementById("loaderqueuesize").firstChild.nodeValue=loaderqueue_size;
+ document.getElementById("loaderqueuemax").firstChild.nodeValue=loaderqueue_max;
+
+ localcrawlerqueue=getFirstChild(xml, "localcrawlerqueue");
+ localcrawlerqueue_size=getValue(getFirstChild(localcrawlerqueue, "size"));
+ document.getElementById("localcrawlerqueuesize").firstChild.nodeValue=localcrawlerqueue_size;
+ createLocalCrawlerTable(localcrawlerqueue);
+
+ remotecrawlerqueue=getFirstChild(xml, "remotecrawlerqueue");
+ createRemoteCrawlerTable(remotecrawlerqueue);
+ remotecrawlerqueue_size=getValue(getFirstChild(remotecrawlerqueue, "size"));
+ document.getElementById("remotecrawlerqueuesize").firstChild.nodeValue=remotecrawlerqueue_size;
+ createremoteCrawlerTable(remotecrawlerqueue);
}
}
function clearTable(table, numSkip){
diff --git a/htroot/xml/queues_p.java b/htroot/xml/queues_p.java
index 3a7a8f70d..5e39f1717 100644
--- a/htroot/xml/queues_p.java
+++ b/htroot/xml/queues_p.java
@@ -84,6 +84,8 @@ public class queues_p {
yacySeed initiator;
//indexing queue
+ prop.put("indexingSize", Integer.toString(switchboard.getThread("80_indexing").getJobCount()+switchboard.indexingTasksInProcess.size()));
+ prop.put("indexingMax", Integer.toString(plasmaSwitchboard.indexingSlots));
if ((switchboard.sbQueue.size() == 0) && (switchboard.indexingTasksInProcess.size() == 0)) {
prop.put("list", 0); //is empty
} else {
@@ -133,6 +135,8 @@ public class queues_p {
}
//loader queue
+ prop.put("loaderSize", Integer.toString(switchboard.cacheLoader.size()));
+ prop.put("loaderMax", Integer.toString(plasmaSwitchboard.crawlSlots));
if (switchboard.cacheLoader.size() == 0) {
prop.put("list-loader", 0);
} else {
@@ -160,6 +164,7 @@ public class queues_p {
}
//local crawl queue
+ prop.put("localCrawlSize", Integer.toString(switchboard.getThread("50_localcrawl").getJobCount()));
plasmaCrawlNURL.Entry urle;
String profileHandle;
@@ -190,6 +195,8 @@ public class queues_p {
prop.put("list-local", showNum);
//global crawl queue
+ prop.put("remoteCrawlSize", Integer.toString(switchboard.getThread("61_globalcrawltrigger").getJobCount()));
+ //prop.put("remoteCrawlSize", Integer.toString(switchboard.getThread("62_remotetriggeredcrawl").getJobCount()));
size=10;
stackSize = switchboard.urlPool.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_LIMIT);
if (stackSize == 0) {
diff --git a/htroot/xml/queues_p.xml b/htroot/xml/queues_p.xml
index dbffbdf07..17c462aa9 100644
--- a/htroot/xml/queues_p.xml
+++ b/htroot/xml/queues_p.xml
@@ -1,5 +1,7 @@
<xml version="1.0">
<indexingqueue>
+ <size>#[indexingSize]#</size>
+ <max>#[indexingMax]#</max>
#{list-indexing}#
<entry>
<initiator>#[initiator]#</initiator>
@@ -14,6 +16,8 @@
#{/list-indexing}#
</indexingqueue>
<loaderqueue>
+ <size>#[loaderSize]#</size>
+ <max>#[loaderMax]#</max>
#{list-loader}#
<entry>
<initiator>#[initiator]#</initiator>
@@ -23,6 +27,7 @@
#{/list-loader}#
</loaderqueue>
<localcrawlerqueue>
+ <size>#[localCrawlSize]#</size>
#{list-local}#
<entry>
<initiator>#[initiator]#</initiator>
@@ -36,6 +41,7 @@
#{/list-local}#
</localcrawlerqueue>
<remotecrawlerqueue>
+ <size>#[remoteCrawlSize]#</size>
#{list-remote}#
<entry>
<profile>#[profile]#</profile>