[Zope] Sum up a property from several objects
Gitte Wange
gitte@mmmanager.org
Tue, 10 Jul 2001 00:39:11 +0200
At 06:04 09-07-2001 -0700, ender wrote:
>On Monday 09 July 2001 07:58, Gitte Wange wrote:
>>>Now I have the nicests stats of my computers at my website :-)))
>>>
>>>I have been wondering if it is possible in python to make system calls (I
>>> did it with PHP). But it was only for the machine that the script ran on.
>
>yes, although personally i'm not a big fan of forking processes from zope,
>if you want examples in existing products, ZCVSMixin does this to wrap the
>commandline cvs and probably PHPObject.
>
>check out the popen(1-2-3) commands in the python lib reference on python.org
>
>>>
>>>It found the machines uptime and printed it out.
>>>
>>>Could I - just philosophy - in python, write a script that calls different
>>>machines (perhaps via SNMP) and gets their uptime, hard ware numbers (such
>>> as RAM, CPU, Harddisk etc) ???
>
>yes, this is probably more elegant. there are three python snmp libraries,
of
>which two are being developed, i think their all hosted on sourceforge,
none
>of them support v3 afaik. if you're going to poll you should make your
>connections volatile attributes (start names with _v_) or you'll run afoul
of
>persistence semantics.
>
>btw. there was a paper on using the www.sf.net/projects/pysnmp project at
>python9.org
>
Thank again :-)
I'm looking at the options right now.
Not a Zope problem so I guess I'll look in the python community for answers
:-)
But MAYBE someday I'll be back with a Zope Product that quieries the SNMP
and displays all sorts of things ... hmm .. perhaps using mrtg ?
Well I dreaming right now - too busy developing other Zope stuff. But maybe
when I have a holiday :-))
Good night - Gitte