Skip to content

Instantly share code, notes, and snippets.

@jrenner
Last active December 15, 2015 14:29
Show Gist options
  • Save jrenner/5274718 to your computer and use it in GitHub Desktop.
Save jrenner/5274718 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# test memory info from a glances server
import xmlrpclib
import sys
if len(sys.argv) < 2:
print "Please give 'host:port' as argument"
sys.exit()
host = sys.argv[1]
print "Getting data from " + host
s = xmlrpclib.ServerProxy("http://" + host)
print s.getMem()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment