mirror of https://github.com/schoebel/mars
marsadm: allow --threshold=human-readable
This commit is contained in:
parent
5bead43add
commit
27e975f4d7
|
@ -16047,11 +16047,25 @@ The macros containing the substring
|
||||||
\family typewriter
|
\family typewriter
|
||||||
-threshold-
|
-threshold-
|
||||||
\family default
|
\family default
|
||||||
use this as a default value for approximation whether something has been
|
or
|
||||||
reached.
|
\family typewriter
|
||||||
|
-almost-
|
||||||
|
\family default
|
||||||
|
are using this as a default value for approximation whether something has
|
||||||
|
been approximately reached.
|
||||||
Default is 10MiB.
|
Default is 10MiB.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
\size scriptsize
|
||||||
|
The $size argument may be a number optionally followed by one the lowercase
|
||||||
|
characters k m g t p for indicating kilo mega giga tera or peta bytes as
|
||||||
|
multiples of 1000.
|
||||||
|
When using the corresponding uppercase character, multiples of 1024 are
|
||||||
|
formed instead.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
@ -17546,7 +17560,8 @@ $res
|
||||||
\family typewriter
|
\family typewriter
|
||||||
$size
|
$size
|
||||||
\family default
|
\family default
|
||||||
argument is given, it must be a number, optionally followed by suffix
|
argument is given, it must be a number, optionally followed by a lowercase
|
||||||
|
suffix
|
||||||
\family typewriter
|
\family typewriter
|
||||||
k
|
k
|
||||||
\family default
|
\family default
|
||||||
|
@ -17558,15 +17573,44 @@ m
|
||||||
\family typewriter
|
\family typewriter
|
||||||
g
|
g
|
||||||
\family default
|
\family default
|
||||||
, or
|
,
|
||||||
\family typewriter
|
\family typewriter
|
||||||
t
|
t
|
||||||
\family default
|
\family default
|
||||||
(denoting size factors in powers of two).
|
, or
|
||||||
|
\family typewriter
|
||||||
|
p
|
||||||
|
\family default
|
||||||
|
(denoting size factors as multiples of 1000), or an uppercase suffix
|
||||||
|
\family typewriter
|
||||||
|
K
|
||||||
|
\family default
|
||||||
|
,
|
||||||
|
\family typewriter
|
||||||
|
M
|
||||||
|
\family default
|
||||||
|
,
|
||||||
|
\family typewriter
|
||||||
|
G
|
||||||
|
\family default
|
||||||
|
,
|
||||||
|
\family typewriter
|
||||||
|
T
|
||||||
|
\family default
|
||||||
|
or
|
||||||
|
\family typewriter
|
||||||
|
P
|
||||||
|
\family default
|
||||||
|
(denoting size factors as multiples of 1024).
|
||||||
The given size must not exceed the actual size of
|
The given size must not exceed the actual size of
|
||||||
\family typewriter
|
\family typewriter
|
||||||
$disk_dev
|
$disk_dev
|
||||||
\family default
|
\family default
|
||||||
|
.
|
||||||
|
It will specify the future resource size as shown by
|
||||||
|
\family typewriter
|
||||||
|
marsadm view-resource-size $res
|
||||||
|
\family default
|
||||||
.
|
.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -17771,7 +17815,6 @@ $mars_name
|
||||||
$res
|
$res
|
||||||
\family default
|
\family default
|
||||||
.
|
.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
|
|
@ -4890,7 +4890,7 @@ foreach my $arg (@ARGV) {
|
||||||
$window = $arg;
|
$window = $arg;
|
||||||
next;
|
next;
|
||||||
} elsif ($arg =~ s/--threshold\s*=\s*([0-9]+)/$1/) {
|
} elsif ($arg =~ s/--threshold\s*=\s*([0-9]+)/$1/) {
|
||||||
$threshold = $arg;
|
$threshold = get_size($arg);
|
||||||
next;
|
next;
|
||||||
} elsif ($arg =~ s/--host\s*=\s*([-_A-Za-z0-9]+)/$1/) {
|
} elsif ($arg =~ s/--host\s*=\s*([-_A-Za-z0-9]+)/$1/) {
|
||||||
check_id($arg);
|
check_id($arg);
|
||||||
|
|
Loading…
Reference in New Issue