Difference between revisions of "Script Reset Threads"
From Observer GigaFlow Support | VIAVI Solutions Inc.
Kevin Wilkie (Talk | contribs) (Created page with " var cm = actions.ros.getClass().getDeclaredField("servers"); cm.setAccessible(true); log.warn(cm) var value = cm.get(actions.ros); log.warn(value) log.warn(value.entryS...") |
Kevin Wilkie (Talk | contribs) |
||
Line 1: | Line 1: | ||
var cm = actions.ros.getClass().getDeclaredField("servers"); | var cm = actions.ros.getClass().getDeclaredField("servers"); | ||
− | + | cm.setAccessible(true); | |
− | + | log.warn(cm) | |
− | + | var value = cm.get(actions.ros); | |
− | + | log.warn(value) | |
− | + | log.warn(value.entrySet()) | |
− | + | var a = value.keySet().toArray() | |
− | + | for (var i = 0; i < a.length; i++) { | |
− | + | var processors = value.get(a[i]).getProcessorssv5(); | |
− | + | //log.warn(processors); | |
− | + | if (processors != null) { | |
− | + | for (var p = 0; p < processors.length; p++) { | |
− | + | var theThread = processors[p] | |
− | var processors=value.get(a[i]). | + | //log.warn(p+" "+theThread); |
− | + | if (theThread !== null) { | |
− | for(var p=0;p<processors.length;p++) { | + | var allowed = theThread.allowedReceivedPackets; |
− | + | if (theThread.receivedPackets.size() >= allowed) { | |
− | + | log.warn("receivedPackets too big"); | |
− | + | log.warn(p + " " + theThread.receivedPackets.size() + " " + theThread.allowedReceivedPackets + " " + theThread.created); | |
− | + | processors[p] = null; | |
− | + | theThread.stop() | |
− | + | } | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
} | } | ||
− | |||
} | } | ||
− | + | } | |
+ | |||
+ | for (var i = 0; i < a.length; i++) { | ||
+ | var processors = value.get(a[i]).getProcessorssv9(); | ||
+ | //log.warn(processors); | ||
+ | if (processors != null) { | ||
+ | for (var p = 0; p < processors.length; p++) { | ||
+ | var theThread = processors[p] | ||
+ | //log.warn(p+" "+theThread); | ||
+ | if (theThread !== null) { | ||
+ | var allowed = theThread.allowedReceivedPackets; | ||
+ | if (theThread.receivedPackets.size() >= allowed) { | ||
+ | log.warn("receivedPackets too big"); | ||
+ | log.warn(p + " " + theThread.receivedPackets.size() + " " + theThread.allowedReceivedPackets + " " + theThread.created); | ||
+ | processors[p] = null; | ||
+ | theThread.stop() | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } |
Latest revision as of 12:22, 8 March 2024
var cm = actions.ros.getClass().getDeclaredField("servers");
cm.setAccessible(true); log.warn(cm) var value = cm.get(actions.ros); log.warn(value) log.warn(value.entrySet()) var a = value.keySet().toArray() for (var i = 0; i < a.length; i++) {
var processors = value.get(a[i]).getProcessorssv5(); //log.warn(processors); if (processors != null) { for (var p = 0; p < processors.length; p++) { var theThread = processors[p] //log.warn(p+" "+theThread); if (theThread !== null) { var allowed = theThread.allowedReceivedPackets; if (theThread.receivedPackets.size() >= allowed) { log.warn("receivedPackets too big"); log.warn(p + " " + theThread.receivedPackets.size() + " " + theThread.allowedReceivedPackets + " " + theThread.created); processors[p] = null; theThread.stop() } } } }
}
for (var i = 0; i < a.length; i++) {
var processors = value.get(a[i]).getProcessorssv9(); //log.warn(processors); if (processors != null) { for (var p = 0; p < processors.length; p++) { var theThread = processors[p] //log.warn(p+" "+theThread); if (theThread !== null) { var allowed = theThread.allowedReceivedPackets; if (theThread.receivedPackets.size() >= allowed) { log.warn("receivedPackets too big"); log.warn(p + " " + theThread.receivedPackets.size() + " " + theThread.allowedReceivedPackets + " " + theThread.created); processors[p] = null; theThread.stop() } } } }
}