Owners Manual

Active Performance Monitor Support | Actions and Adaptive CLI
OMNM 6.5.2 User Guide 611
The process folder is attached to this document with proper structure. Put it in
C:\strawberry\perl\vendor\lib\Win32
and you are ready to go.
NOTE:
Here are the URLs where you can download these libraries:
http://search.cpan.org/~wyant/Win32-Process-Info-1.018/lib/Win32/Process/Info.pm
http://search.cpan.org/~wyant/Win32-Process-Info-1.019/lib/Win32/Process/Info/WMI.pm
2
Put
process_check.pl
in the proper directory. For Windows the default is
[installation root]\owareapps\performance\scripts.
3
In your actions portlet, import
TEST_ACTION
.xml.
4
In your monitors portlet, import
PROCESS_UPTIME_MONITOR
.xml.
5
Even though the monitor and Adaptive CLI do not technically need one, select any target a
dashboard can track. This permits execution of the Adaptive CLI.
6
In your dashboard views portlet, create a new custom
Monitor Dashboard
for whatever
device(s) you decided to monitor, you will see Status as one of the tracked metrics (1 for up, 0
for down). You can use it as you would any other metric in OpenManage Network Manager to
track, graph, and so on.
By default this script and monitor track whether
notepad.exe
is running, but you can have it
track anything by editing the monitor. Go to Monitor Options > Adaptive CLI Properties, and you
can edit the
Process Name
variable to be any other process.
Extra credit: Modify the script to track multiple applications.
process_check.pl
#!/usr/bin/env perl
use Win32::Process::Info;
$processname=$ARGV[0];
$found = 0;
$pi = Win32::Process::Info->new ();
@info = $pi->GetProcInfo (); # Get the max
@info = grep {
print $_->{Name};
print "\n";
if ($_->{Name})
{
if ($_->{Name} eq $processname)
{
$found = 1;
}
}
} $pi->GetProcInfo ();
if ($found == 1)
{
print "Process " . $processname . " is running! 1";
}
else