summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/loadbars/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/loadbars/main.go b/cmd/loadbars/main.go
index 0ee8071..dd86723 100644
--- a/cmd/loadbars/main.go
+++ b/cmd/loadbars/main.go
@@ -35,6 +35,7 @@ func main() {
flag.StringVar(&cfg.SSHOpts, "sshopts", cfg.SSHOpts, "Set SSH options")
flag.BoolVar(&cfg.HasAgent, "hasagent", cfg.HasAgent, "SSH key already known by agent")
flag.IntVar(&cfg.MaxBarsPerRow, "maxbarsperrow", cfg.MaxBarsPerRow, "Max bars per row (0=unlimited)")
+ loadmax := flag.Float64("loadmax", 0, "Fixed load bar full-height reference value (0 = auto-scale)")
flag.Parse()
@@ -48,7 +49,11 @@ func main() {
os.Exit(constants.EUnknown)
}
- // Flags override config file; re-parse into cfg for hosts/cluster
+ // Flags override config file; re-parse into cfg for hosts/cluster.
+ // --loadmax overrides the rc file value when explicitly set to a positive number.
+ if *loadmax > 0 {
+ cfg.LoadMax = *loadmax
+ }
if *cluster != "" {
cfg.Cluster = *cluster
}