diff options
author | Guillermo Ramos | 2025-09-26 10:37:24 +0200 |
---|---|---|
committer | Guillermo Ramos | 2025-09-26 10:51:58 +0200 |
commit | 7d35f2110fdf5478e6abb9cdda86071b32802e41 (patch) | |
tree | 5fb8e94b8044014dc5e778e739341bfe6d757414 | |
parent | a7da12cb307e6dbe33cb75cc9e6784be31ff4988 (diff) | |
download | cli-7d35f2110fdf5478e6abb9cdda86071b32802e41.tar.gz |
Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
-rwxr-xr-x | capibarra | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -83,10 +83,12 @@ $linux_mods{'MEM'} = { period => 5, default_opts => {'warn' => 70, 'err' => 90}, mkcompute => sub($opts) { - my $mused = `free | awk '/^Mem:/ {printf("%d", 100 * (\$3/\$2))}'`; - return { - text => sprintf("MEM %s%%", $mused), - color => color_thresholds($mused, $opts->{warn}, $opts->{err}), + return sub { + my $mused = `free | awk '/^Mem:/ {printf("%d", 100 * (\$3/\$2))}'`; + return { + text => sprintf("MEM %s%%", $mused), + color => color_thresholds($mused, $opts->{warn}, $opts->{err}), + }; }; }, }; @@ -111,7 +113,7 @@ $linux_mods{'NET'} = { push @wired, [0, $if, $status, $addr] if (substr($if, 0, 2) eq 'en'); push @wireless, [1, $if, $status, $addr] if (substr($if, 0, 2) eq 'wl'); } - return { text => join ' | ', map { render_iface_linux(@$_) } @wired, @wireless }; + return { text => join ' ยท ', map { render_iface_linux(@$_) } @wired, @wireless }; }, }; |