first LoGS presentation revisited

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

first LoGS presentation revisited

Jim Prewett

All,
To see how well the RDL is doing its job, I decided to revisit the first
LoGS presentation (available here:
http://www.linuxclustersinstitute.org/Linux-HPC-Revolution/Archive/PDF04/presentations/Prewett.pdf#search=%22logs%20lisp%20prewett%20filetype%3Apdf%22)

I think things are /much/ easier to understand in the code below than in
the example rules in the presentation!  Clearly, there is still a ways to
go, but I'm pretty stoked on how things are looking!

Jim

;; simple rule
(rule
 named 'default-rule
 matching #'LoGS::match-all
 doing
 #'LoGS::print-message)

;; Using Contexts
(rule
 named 'collect-all-messages
 matching #'LoGS::match-all
 doing
 (lambda (message)
   (add-to-context
    (ensure-context
     :name 'collect-all-messages-context)
    message)))

;; contexts and dynamic rules

(rule
 named 'find-ntp-problems
 matching regexp "xntpd \\[(\\d+)\\]: synchronization lost"
 binding (xntpd-pid)
 doing
 (lambda (message)
   (ensure-context
    :name (format () "xntpd-~A" xntpd-pid)
    :timeout (+ *now* (* 3600 internal-time-units-per-second))
    :actions
    (list
     (lambda (context)
       (format t "xntpd problem~%")))))
 and
 (lambda (message)
   (rule-before
    (rule
     matching regexp
     (format () "xntpd \\[~A\\]: synchronized to" xntpd-pid)
     doing
     (lambda (message)
       (delete-context
        (format () "xntpd-~A" xntpd-pid)))))))
                     

--
James E. Prewett                    [hidden email] [hidden email]
Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/ 
Designated Security Officer         OpenPGP key: pub 1024D/31816D93    
HPC Systems Engineer III   UNM HPC  505.277.8210



_______________________________________________
LoGS-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/logs-devel