From fb0c8ddb08d1101f28de069881c54c9e75baf382 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 15 Feb 2013 00:44:07 +0100 Subject: [PATCH] dos2unix --- plugins/other/mumble_users | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/plugins/other/mumble_users b/plugins/other/mumble_users index ba85177e..8fe81353 100755 --- a/plugins/other/mumble_users +++ b/plugins/other/mumble_users @@ -1,42 +1,42 @@ -#!/usr/bin/python -# -# Munin Plugin for Murmur/ICE -# written by T. Fernandez -# fixes by Andrew Williams -# 07/10/2010 -# -########################################################## - -slicefile = "/usr/share/slice/Murmur.ice" -prxstr = "Meta:tcp -h 127.0.0.1 -p 6502" - -import os -import sys - -import Ice -if not os.path.exists(slicefile): - print slicefile+" not found!" - quit(1) -Ice.loadSlice(slicefile) - -import Murmur -ice = Ice.initialize() -prx = ice.stringToProxy(prxstr) -murmur = Murmur.MetaPrx.checkedCast(prx) - -if (sys.argv.__len__() == 2) and (sys.argv[1] == "config"): - print "graph_title Mumble users" - print "graph_vlabel users" - print "graph_args --lower-limit 0" - for server in murmur.getAllServers(): - id = str(server.id()) - print "murmur"+id+".label Server "+id -else: - for server in murmur.getAllServers(): - id = str(server.id()) - if server.isRunning(): - users = server.getUsers() - else: - users = [] - print "murmur"+id+".value "+str(users.__len__()) -quit(0) +#!/usr/bin/python +# +# Munin Plugin for Murmur/ICE +# written by T. Fernandez +# fixes by Andrew Williams +# 07/10/2010 +# +########################################################## + +slicefile = "/usr/share/slice/Murmur.ice" +prxstr = "Meta:tcp -h 127.0.0.1 -p 6502" + +import os +import sys + +import Ice +if not os.path.exists(slicefile): + print slicefile+" not found!" + quit(1) +Ice.loadSlice(slicefile) + +import Murmur +ice = Ice.initialize() +prx = ice.stringToProxy(prxstr) +murmur = Murmur.MetaPrx.checkedCast(prx) + +if (sys.argv.__len__() == 2) and (sys.argv[1] == "config"): + print "graph_title Mumble users" + print "graph_vlabel users" + print "graph_args --lower-limit 0" + for server in murmur.getAllServers(): + id = str(server.id()) + print "murmur"+id+".label Server "+id +else: + for server in murmur.getAllServers(): + id = str(server.id()) + if server.isRunning(): + users = server.getUsers() + else: + users = [] + print "murmur"+id+".value "+str(users.__len__()) +quit(0)