[noctool-cvs] CVS source

imattsson imattsson at common-lisp.net
Sun Mar 15 19:48:42 UTC 2009


Update of /project/noctool/cvsroot/source
In directory cl-net:/tmp/cvs-serv11030

Modified Files:
	classes.lisp tests.lisp 
Log Message:
IM

New slot added to disk monitors, they now have a slot (MAX-SINCE-SEEN)
that controls the "have not seen updates in a while" maximum time.
If the slot has not been bound, it defaults to twice the monitor interval.

Note, has NOT been incorporated in the config file syntax yet, should
ideally be done with keyword args instead of optionals to the DISK macro,
but taht should be discussed before done, as it's an incompatible change.
Don't think it's a controversial change, though.


--- /project/noctool/cvsroot/source/classes.lisp	2009/02/19 17:33:34	1.22
+++ /project/noctool/cvsroot/source/classes.lisp	2009/03/15 19:48:41	1.23
@@ -118,7 +118,9 @@
    (mountpoint :accessor mountpoint :initarg :mountpoint)
    (disk-graph :reader disk-graph :initarg :disk-graph :initform nil)
    (inode-graph :reader inode-graph :initarg :inode-graph :initform nil)
-   (last-seen :accessor last-seen :initarg :last-seen :initform 0))
+   (last-seen :accessor last-seen :initarg :last-seen :initform 0)
+   (max-since-seen :accessor max-since-seen)
+   )
   (:default-initargs :interval 600 :disk-percent 90 :inodes-percent 90))
 
 (add-graph-info disk-monitor disk-graph max-graph percentile-graph-display)
@@ -126,9 +128,20 @@
 
 (defclass disk-container (monitor)
   ((disk-list :accessor disk-list :initarg :disk-list :initform nil)
-   (ignore-list :reader ignore-list :initarg :ignore-list))
+   (ignore-list :reader ignore-list :initarg :ignore-list)
+   (max-since-seen :accessor max-since-seen))
   (:default-initargs :interval 600 :ignore-list (list "tmpfs")))
 
+(defmethod max-since-seen :around ((mon disk-monitor))
+  (if (slot-boundp mon 'max-since-seen)
+      (call-next-met


More information about the noctool-cvs mailing list