summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/smbstatus
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-19 03:59:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:40 -0500
commit340b3d7301d81ed46af261d8c948f0e77e052243 (patch)
tree688b042851075f431840f8e99f6af53e909b61e6 /source4/scripting/bin/smbstatus
parent25428433e3e279491f0b6f73e2489140517ae454 (diff)
downloadsamba-340b3d7301d81ed46af261d8c948f0e77e052243.tar.gz
samba-340b3d7301d81ed46af261d8c948f0e77e052243.tar.bz2
samba-340b3d7301d81ed46af261d8c948f0e77e052243.zip
r8575: the beginnings of a smbstatus command
(This used to be commit 4ecaf72a31cde2722315a61cbe823d44f0c14586)
Diffstat (limited to 'source4/scripting/bin/smbstatus')
-rwxr-xr-xsource4/scripting/bin/smbstatus26
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/scripting/bin/smbstatus b/source4/scripting/bin/smbstatus
new file mode 100755
index 0000000000..fd3009012b
--- /dev/null
+++ b/source4/scripting/bin/smbstatus
@@ -0,0 +1,26 @@
+#!/bin/sh
+exec smbscript "$0" ${1+"$@"}
+/*
+ provide information on connected users and open files
+ Copyright Andrew Tridgell 2005
+ Released under the GNU GPL v2 or later
+*/
+
+libinclude("base.js");
+libinclude("management.js");
+
+var options = new Object();
+
+ok = GetOptions(ARGV, options,
+ "POPT_AUTOHELP",
+ "POPT_COMMON_SAMBA");
+if (ok == false) {
+ println("Failed to parse options: " + options.ERROR);
+ return -1;
+}
+
+
+var sessions = smbsrv_sessions();
+printVars(sessions);
+
+return 0;