Hi,
First I want to Thank Risto and John for immediate responses for my previous
mail.
I am beginner in using SEC, I wrote one program to save and restore CONTEXT
and its working fine while executing in single program/Event.
But I'm not able to restore the Context once I shutdown the SEC and then
re-run the SEC again, now I am trying to retrieve the same CONTEXT again which
I saved in the file.
Please clarify that SEC will support this feature or kindly suggest me what
changes I required to do.
Working fine: taskconsav.txt
=======================
type=Single
ptype=RegExp
pattern=test
context=SEC_INTERNAL_EVENT
desc=$0
action=write - context exists, writing foo here
type=Single
ptype=RegExp
pattern=createcs
desc=$0
action=create SEC_INTERNAL_EVENT
type=Single
ptype=RegExp
pattern=assign
context=SEC_INTERNAL_EVENT
desc=$0
action=assign %ret 0; eval %ret (require Storable); \
eval %ret (exit(1) unless %ret)
type=Single
ptype=RegExp
pattern=savecon
context=SEC_INTERNAL_EVENT
desc=Save all SEC contexts into /tmp/SEC_CONTEXTS
action=lcall %ret -> ( sub { \
Storable::store(\%main::context_list, "/tmp/SEC_CONTEXTS"); } )
type=Single
ptype=SubStr
pattern=restorecon
context=SEC_INTERNAL_EVENT
desc=Restore all SEC contexts from /tmp/SEC_CONTEXTS
action=lcall %ret -> ( sub { %main::context_list = \
%{Storable::retrieve("/tmp/SEC_CONTEXTS")}; } )
Output:-
-----------
$ perl sec -conf=taskconsav.txt -input=-
SEC (Simple Event Correlator) 2.7.6
Reading configuration from taskconsav.txt
5 rules loaded from taskconsav.txt
Opening input file -
Interactive process, SIGINT can't be used for changing the logging level
createcs
Creating context 'SEC_INTERNAL_EVENT'
test
Writing event 'context exists, writing foo here' to file -
context exists, writing foo here
assign
Assigning '0' to variable '%ret'
Evaluating code 'require Storable' and setting variable '%ret'
Variable '%ret' set to '1'
Evaluating code 'exit(1) unless 1' and setting variable '%ret'
Variable '%ret' set to '1'
savecon
Calling code 'CODE(0x600875260)' and setting variable '%ret'
Variable '%ret' set to '1'
restorecon
Calling code 'CODE(0x600888608)' and setting variable '%ret'
Variable '%ret' set to 'SEC_INTERNAL_EVENT
HASH(0x6006bb548)'
Thanks and Regards,
Mohan.R
* Mobile: +91 779 584 1059
E-mail: [email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users