Hi all:

I was setting up some rules for a clas I am teaching and was reminded
of an annoynace I had to deal with.

I set up contexts that are self reporting when they expire by using a
termination action, E.G.

  create fooText 300 report fooText notify.sh

in order to do this, I need to use a valid context name (fooText in
this case). What would be really nice it to have a 'selfreport' or
'report SELF <command>' that works without having to provide an
explicit name for the context.

It would have to be valid only in context termination actions, since
that is the only environment in which the context could be determined.

Consider these 4 events and actions:

  May 15 04:24:10 crocus anftpd[340] login anonymous 192.168.20.33
    create context: session_340_anftpd
      with:
         lifetime 1 hour
         termination action: report session_340_anftpd notify.sh
    add event to context session_340_anftpd

  May 15 04:24:12 crocus anftpd[340] retrieve public/README.txt (succeed)
    add event to session_340_anftpd

  May 15 04:25:10 crocus anftpd[340] retrieve private/software.tgz (failed)
    add event to session_340_anftpd
    create alias to session_340_anftpd called report_session_340_anftpd

  10 May 15 04:25:12 crocus anftpd[340] logout
    set timeout on session_340_anftpd to 1 second
      reset termination action to: report session_340_anftpd notify.sh
          (because the action "set session_340_anftpd 1" wipes out any
           existing termination action, I think this is a bug)
    unalias session_340_anftpd

The unalias is the key. If no alias was made to the session_340_anftpd
context, then the unalias acts like delete and removes the context
with no report. If however an alias was made to the context, then it
will survive the unalias and time out in 1 second causing a report to
be sent.

What I would like is that ability to report the context that is
undergoing deletion without having to get its name. In this case I can
use report_session_340_anftpd but when following multiple streams a
given event that triggers a report may accessing the context under
another name and thus there is no way for the session end event to
figure out what name the report command should use.

Also I think the set command should not change any termination
action. If the user want to use set to change both the time and the
termination action they can explicitly use "none" as the termination
action.

Quips, comments evasions questions or answers?

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to