Script that uses unix signals can not be executed properly as a reaction on script monitor
book
Article ID: 85964
calendar_today
Updated On:
Products
CA Automic Sysload
Issue/Introduction
Affects Release version(s): 5
Error Message :
None.
Patch level detected:SP Analyst Agent for Unix 5.60
Product Version: Sysload 5.6.0
Description :Script that uses unix signals can not be executed properly as a reaction on script monitor
Environment
OS: HP UX Itanium
OS Version: All.
Cause
Cause type:
Configuration
Root Cause: Script monitor masks by default all the signals of the scripts launched.
Resolution
Launch a perl script as a reaction that will launch the script that uses the unix signals:
If you want Script monitor to launch as a reaction:
myexec.pl /SCRIPTPATH/script.sh var_1 var_2 var_3
And that the perl script launches:
/SCRIPTPATH/script.sh var_1 var_2 var_3
Then create a perl script like this one:
myexec.pl:
#!/usr/bin/perl
use POSIX qw(signal_h);
$set = POSIX::SigSet->new(SIGALRM);
sigprocmask (&SIG_UNBLOCK, $set);
$cmdline = "";
foreach $argnum (0 .. $#ARGV)
{
if ($argnum > 0)
{
$cmdline = $cmdline . " ";
}
$cmdline = $cmdline . "\"". $ARGV[$argnum] . "\"";
}
exec "$cmdline";
Fix Status: Released
Fix Version(s):
Component: Agents
Version: Sysload 5.6.0
Additional Information
Workaround :
N/A
Feedback
thumb_up
Yes
thumb_down
No