Is there a way to check if a nt service is running with dude?
I don’t want to check if the EXE-File is running I want to know if the service is running.
The following mib under Windows comprised the service check: lmmib2.mib (LAN Manager)
The problem is now with the key .1.3.6.1.4.1.77.1.2.3.1.1
I get the service name an with this key I get the information if it is running: .1.3.6.1.4.1.77.1.2.3.1.3
Now I need somehow to compare the service id’s? But I have no idea how?
I tried this but got a parse error back:
if(array_find(oid_column(“1.3.6.1.4.1.77.1.2.3.1.1”),“Iomega Active Disk”)>0,if(array_find(oid_column(“1.3.6.1.4.1.77.1.2.3.1.3”),array_find(oid_column(“1.3.6.1.4.1.77.1.2.3.1.1”),“Iomega Active Disk”))==active,1,-1),-1)
I found out how to check a windows service (easily ;0)
Search with getif after your service name over the following oid :
.iso.org.dod.internet.private.enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcName
Use now the key which is behind .1.3.6.1.4.1.77.1.2.3.1.1
Now take the key of the svSvcOperatingState and merge it with your windows-service-key:
.iso.org.dod.internet.private.enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperatingState
Example:
key;value
.iso.org.dod.internet.private.enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcName.4.68.117.100.101;Dude
Merge it with svSvcOperatingState like that:
.iso.org.dod.internet.private.enterprises.lanmanager.lanmgr-2.server.svSvcTable.svSvcEntry.svSvcOperatingState.4.68.117.100.101