I wrote this script just to print out exactly what's shown on my Software tab: 
manufacturer, name, and install date. It just spits them out, separated by 
tabs, into a text file.


Code:
#!/usr/bin/env python
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase

dmd = ZenScriptBase(connect=True).dmd

server = dmd.Devices.findDevice('some_machine')
if server:
        saveHere = open('/home/zenoss/some_machine_software.txt','wb')
        theContents = ''
        for each in server.os.software.objectValues():
                theContents = theContents + \
                        each.getManufacturer().id + '\t' + \
                        each.id + '\t' + \
                        each.getInstallDate() + '\n'
        saveHere.write(theContents)



Hopefully, this is what you were asking about. :)




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=31886#31886

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to