T.R | Title | User | Personal Name | Date | Lines |
---|
87.1 | | OPG::PHILIP | And through the square window... | Tue Aug 10 1993 11:50 | 13 |
| Olli,
Can you post your action definition, it would help me to understand
your problem (just export the database and cut out the ADD_ACTION
part for your action).
It is possible that your action does not get the text (that is the
actual line of context, not the text as defined in the event record)
because the daemon has not flushed out the text to disk quickly
enough for the ens daemon to read it from the log file.
Cheers,
Phil
|
87.2 | It works every now and then | EEMELI::OJUSSILA | Olli Jussila, IS/SMGT Finland | Tue Aug 10 1993 15:53 | 11 |
|
My event text is "DCM ALL:"
After more testing I noticed that if the event line is longer
the text line is passed to action routine. Some times text is only
partially passed to action routine. Probably your explanation
explains this. Is there any way to make deamon to flaush text to disk
quicker? This is very critical for us.
-Olli
|
87.3 | | OPG::PHILIP | And through the square window... | Tue Aug 10 1993 16:45 | 8 |
|
Changing the event text to regular expression and adding *^ to the end
of the text may help, this will cause the event to only be detected
after the following newline, so, the whole of the line should have been
flushed to disk by the time the action routine/ens has got it.
Cheers,
Phil
|
87.4 | sh or csh and " or ' | EEMELI::OJUSSILA | Olli Jussila, IS/SMGT Finland | Tue Aug 10 1993 18:47 | 21 |
|
Regular expression seems to help. But I also had for testing
reasons context start 1 and context count 2. I changed start to
0 and count to 1. Then I was able to get TEXT to action routine
BUT csh script didn't work.
It seems that there is a problem using csh instead of sh.
After I changed to sh from csh script works. Should we
used sh only?
Other problem is to pass event text containing $ to action script
I am sending PSW event to opa0: like
PSW ALL:~NEW~EXT~NODE1~10-AUG NODE1 Disk NODE1$DKA200 is near full...
Now $DKA200 string doesn't get to script.
It seems that CM is using "-around the text string. If '-is used
then script will get the whole string.
-Olli
|
87.5 | | OPG::PHILIP | And through the square window... | Wed Aug 11 1993 09:48 | 34 |
| Olli,
>> Regular expression seems to help. But I also had for testing
>> reasons context start 1 and context count 2. I changed start to
>> 0 and count to 1. Then I was able to get TEXT to action routine
>> BUT csh script didn't work.
>> It seems that there is a problem using csh instead of sh.
>> After I changed to sh from csh script works. Should we
>> used sh only?
We simply perform a system() call to invoke the action routines, so it will
probably default to sh as that is normally the default for root (the account
cm is started up in), you could try changing root to use csh in /etc/passwd,
although I dont know what the impact of this will be on the rest of the
system, however, it should work with csh if you put the #! /bin/csh at the
start of the procedure (If it isnt, I dont know why).
>> Other problem is to pass event text containing $ to action script
>> I am sending PSW event to opa0: like
>>
>> PSW ALL:~NEW~EXT~NODE1~10-AUG NODE1 Disk NODE1$DKA200 is near full...
>>
>> Now $DKA200 string doesn't get to script.
>>
>> It seems that CM is using "-around the text string. If '-is used
>> then script will get the whole string.
For the next release, on ULTRIX (does this apply to OSF too?), I will change
the quoting to use a ' instead of the ", what I think it is doing here is a
substitute for the symbol $DKA200, which of course doesnt exist, so sh is
replacing it will a blank.
Cheers,
Phil
|
87.6 | More testing done. /bin/sh only works | EEMELI::OJUSSILA | Olli Jussila, IS/SMGT Finland | Wed Aug 11 1993 18:22 | 22 |
|
I have #! /bin/csh or #! /bin/sh at start of the script.
The test command was simple
/bin/echo "***$1***$2***$3**" >> /var/cm/logs/test.log
When sh was used script work but not with csh
cm -d incicated action counter was increased when test event was sent
to one console line.
Maybe someone else could try this also.
Is there some log file/error file some where I could check?
-Olli
|
87.7 | | EEMELI::OJUSSILA | Olli Jussila, IS/SMGT Finland | Thu Aug 12 1993 18:09 | 9 |
|
re .5
> For the next release, on ULTRIX (does this apply to OSF too?), I will change
> the quoting to use a ' instead of the ",
It does apply to OSF too.
-Olli
|
87.8 | It has been changed for OSF and ULTRIX for V1.1 | OPG::PHILIP | And through the square window... | Mon Aug 16 1993 15:07 | 0
|