blob: 2b466b786d7506453a24fb4f0c6aa237efe3217b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/python
import xmlrpclib
from datetime import datetime
proxy = xmlrpclib.ServerProxy ("http://localhost:8000/")
today = proxy.today ()
# today = 20140218T14:23:45
converted = datetime.strptime (today.value, "%Y%m%dT%H:%M:%S")
print "Today: %s" % converted.strftime ("%d.%m.%Y, %H:%M")
load = proxy.load ()
print "system load:", load
|