Hi Alex,
Thanks for your fast response. It works as you described it
Thanks for your fast response. It works as you described it
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
process = "My-Running-SW-In-The-hrSWRunTable.exe"; // defines process name for lookup
// Create SNMP transport for node
transport = CreateSNMPTransport($node);
if (transport == null) {
return false;
}
// walk over running software processes
// .iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunName
vars = SNMPWalk(transport, ".1.3.6.1.2.1.25.4.2.1.2");
if (vars == null) {
return false;
}
found_process = false; // set flag initially to false
// find process, set flag and break loop if process found
foreach (v: vars) {
if(v->value == process) {
trace(1, "SNMP WALK; Search for process: ".process."; Found: ".v->name."=".v->value);
found_process = true;
break;
}
}
if (found_process == true) {
return true; // process has been found
} else {
return false; // process has not been found
}
transport = CreateSNMPTransport($node);
if (transport == null) {
return false;
}
value = SNMPGetValue(transport, ".1.3.6.1.2.1.25.4.1.0");
if (value == null) {
return false;
}
else {
return true;
}