logo       

RE: [TEC] Refreshing the Rules cache: msg#00293

sysutils.tivoli.tme10

Subject: RE: [TEC] Refreshing the Rules cache

The save_event_cache predicate dumps the event cache to a flat BAROC file.
This file is formatted similarly to a BAROC class definition file but does
have some differences.

CLASS_NAME ;
SLOT_NAME =
SLOT_VALUE;
.
.
.
END

.
.
.

The restore_event_cache predicate calls bo_parse_baroc_file/2 to read the
file and add the instances to the event cache. Both save and restore
predicates call get_config_param to read the your
$BINDIR/TME/TEC/.tec_config file for the event_cache_file parameter and will
only work if that parameter is defined. To dump your cache to an arbitrary
file you can use print_cache(FILENAME). To read from any BAROC file do
something like this:

bo_get_config_options(_old_quote,_old_parse_in,_old_parse_out),
bo_set_config_options(_old_quote,0,_old_parse_out),
bo_parse_baroc_file(FILENAME,add_to_cache),
bo_set_config_options(_old_quote,_old_parse_in,_old_parse_out),


If you wanted to "reload" the event cache I suppose you could write a
program or perl script to read from the event repository to build a BAROC
file, iterate through all instances of events in your cache and remove them
with bo_delete_instance/1 and then call bo_parse_baroc_file/2 to reload the
events.

The real question is not "can you" (there is almost always a way...) but
"why would you need to?" Are you experiencing problem where you events in
cache are out of sync with your repository as a result of forced cache
cleaning? If so you would be better off implementing better duplicate detect
rules, drop and or close irrelevant events, and increase your event cache
size.

-----Original Message-----
From: john willis [mailto:john_willis-9LkaxTQlAnxWk0Htik3J/w@xxxxxxxxxxxxxxxx]
Sent: Friday, March 11, 2005 6:38 AM
To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
Subject: RE: [tme10] [TEC] Refreshing the Rules cache


The undocumented predicates I saw in a flisting output were
save_event_cache and restore_event_cache. My guess is they are used in
the non-tme TEC. Other than that I think you are going to have to
wait till I.V. checks in.

John Willis
Gulf Breeze Software
www.gulfsoft.com
OpenESM Project
www.sourceforge.net/projects/gulfsoft


-----Original Message-----
From: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
[mailto:owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx]
On Behalf Of Moran, Joseph
Sent: Friday, March 11, 2005 6:27 AM
To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
Subject: RE: [tme10] [TEC] Refreshing the Rules cache

John,

Thanks for the explanation of the rules cache update process.

I don't suppose you, or anyone on the list, know any of these
undocumented predicates, that you mentioned so I can search for them,
and take a look?

Regards,

Joe

-----Original Message-----
From: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
[mailto:owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx]On Behalf Of john
willis
Sent: 11 March 2005 10:55
To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
Subject: RE: [tme10] [TEC] Refreshing the Rules cache


>Has anyone got a method to refresh the rules cache without restarting
the >tec?

I don't believe there is a documented way to do this. There are some
undocumented predicates but I am not brave enough try them.

>Also when an event slot is modified (closed on the console for example)
>what is the process that is triggered in order to update that event in
the >Cache, from the event in the event repository?

It kinds of works the other way around. First the requested change is
queued for the TEC_Rule process. TEC_Rule then processes the change
against the change_rules. If the change is not dropped the rules cache
copy is updated and a request is sent to the TEC_Dispatch to request an
update of the event in the event repository.

John Willis
Gulf Breeze Software
www.gulfsoft.com
OpenESM Project
www.sourceforge.net/projects/gulfsoft


-----Original Message-----
From: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
[mailto:owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx]
On Behalf Of Moran, Joseph
Sent: Friday, March 11, 2005 5:29 AM
To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
Subject: [tme10] [TEC] Refreshing the Rules cache

Hello list,

Has anyone got a method to refresh the rules cache without restarting
the tec?

Also when an event slot is modified (closed on the console for example)
what is the process that is triggered in order to update that event in
the Cache, from the event in the event repository?

Thanks in advance,

Joseph Moran






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise