pycollectd

Python interface to collectd-unixsock
git clone https://code.literati.org/pycollectd.git
Log | Files | Refs

commit 907b07b2476807a3c5ec2fdddf3afc6791f6fd01
parent 9a62dcab4c218c9458cada58016f9bdd3f0b7e7f
Author: Sean Lynch <seanl@literati.org>
Date:   Mon, 11 Jan 2010 23:18:40 +0000

Add default socket name for UnixSock

Diffstat:
Mpycollectd/collectd.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pycollectd/collectd.py b/pycollectd/collectd.py @@ -50,7 +50,7 @@ class Identifier(object): class UnixSock(object): - def __init__(self, socket_name): + def __init__(self, socket_name='/var/run/collectd-unixsock'): self._sock = socket.socket(socket.AF_UNIX) self._sock.connect(socket_name) @@ -117,7 +117,7 @@ class UnixSock(object): def main(): - c = UnixSock('/var/run/collectd-unixsock') + c = UnixSock() for timestamp, name in c.listval(): print name, c.getval(name)