vovplotmetrics

USAGE:
        VovPlotMetrics [OPTIONS]

OPTIONS GROUP 1:
        -shownow
        -showraw
        -steps
        -legend BOOL
        -loadFromFile BOOL
        -stats  BOOL       (if true, show statistics)
        -statsTitle TITLE  (default 'site')
        -title TITLE
        -width PIXELS      (default 500)
        -height PIXELS     (default 80)
        -frame  FRAME      (specify an existing and packed frame)
        -update TIMESPEC   (default 5s)
        -binning TIMESPEC  (to simplify wave, default 60s)
        -interval TIMESPEC (how much of the wave to show )
        -ypercent          (if the Y axis is a percentage)
        -metric "FAMILY NAME color [OPTIONAL_SHORTNAME]"  (may be repeated)

OPTIONS GROUP 2:
        -replot
        -canvas CANVAS     (prefer using -frame instead)

EXAMPLES:
        VovPlotMetrics -frame .toplevel.frame \
            -metric "SERVER scheduler/jobsPerHour white" -interval 30m
        VovPlotMetrics -replot -frame 

Example use of VovPlotMetrics with gui.tcl

Below you can see a Tcl/Tk window showing the plots for three selected scheduler metrics. The code to create such plots is shown below.


Figure 1. Plot of Three Selected Scheduler Metrics
### This code could go in  the gui.tcl file 
proc ::SchedulerMetrics {} {
    global vov_color
    set top .scheduler_metrics
    catch {destroy $top}
    toplevel $top
    foreach { f metric lbl color }  [subst {
        q scheduler/queuedJobs  "queued"   $vov_color(SCHEDULED)
        j scheduler/jobsPerHour "jobs/h"   $vov_color(RETRACING)
        r scheduler/ram/inuse   "ram"      white
    }] {
        set frame [frame $top.metrics_$f -relief sunken -bd 1]
        pack $frame -side top -fill both -expand 1
        VovPlotMetrics -frame $frame \
            -metric "SERVER $metric $color"  \
            -title "$lbl"  -legend 0 \
            -interval 3h 
    }
    raise $top
}

proc ::VovGUI::customize { w } {
    global env
    switch -- $w {
        .menubar {
            $w add cascade -label "DEMO:PLOT_MENU" -menu $w.plot_menu
            menu $w.plot_menu -bd 1  -tearoff false
            $w.plot_menu  add command -label "System Metrics" -command "::SchedulerMetrics"
        }
    }
}