summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs/management.js
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/libjs/management.js')
-rw-r--r--source4/scripting/libjs/management.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/scripting/libjs/management.js b/source4/scripting/libjs/management.js
index d989541661..8b04247248 100644
--- a/source4/scripting/libjs/management.js
+++ b/source4/scripting/libjs/management.js
@@ -70,3 +70,24 @@ function smbsrv_trees()
ret.length = count;
return ret;
}
+
+/*
+ return nbtd statistics
+*/
+function nbtd_statistics()
+{
+ var conn = new Object();
+ var irpc = irpc_init();
+ status = irpc_connect(conn, "nbt_server");
+ if (status.is_ok != true) {
+ return undefined;
+ }
+
+ var io = irpcObj();
+ io.input.level = irpc.NBTD_INFO_STATISTICS;
+ status = irpc.nbtd_information(conn, io);
+ if (status.is_ok != true) {
+ return undefined;
+ }
+ return io.results[0].info.stats;
+}