[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Logs-devel] first LoGS presentation revisited
From: |
Jim Prewett |
Subject: |
[Logs-devel] first LoGS presentation revisited |
Date: |
Wed, 23 Aug 2006 09:40:28 -0600 (MDT) |
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 address@hidden address@hidden
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Logs-devel] first LoGS presentation revisited,
Jim Prewett <=