mirror of https://github.com/schoebel/mars
marsadm: add total-space
This commit is contained in:
parent
04e0f141b2
commit
59170f2a9d
|
@ -35486,6 +35486,35 @@ df
|
|||
\begin_layout Labeling
|
||||
\labelwidthstring 00.00.0000
|
||||
|
||||
\family typewriter
|
||||
total-space
|
||||
\family default
|
||||
(available since mars0.1astable140, global, no resource argument necessary)
|
||||
Shows the
|
||||
\emph on
|
||||
logically present
|
||||
\emph default
|
||||
space in
|
||||
\family typewriter
|
||||
/mars/
|
||||
\family default
|
||||
, which may deviate from the physically available space as indicated by
|
||||
the
|
||||
\family typewriter
|
||||
df
|
||||
\family default
|
||||
command.
|
||||
Similarly to
|
||||
\family typewriter
|
||||
rest-space
|
||||
\family default
|
||||
but independently from it, this is also safeguarded and rounded down.
|
||||
Computational details may change in future MARS releases.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Labeling
|
||||
\labelwidthstring 00.00.0000
|
||||
|
||||
\family typewriter
|
||||
get-{disk,device}
|
||||
\family default
|
||||
|
|
|
@ -654,6 +654,7 @@ int compute_emergency_mode(void)
|
|||
|
||||
present = raw_total_space - limit;
|
||||
global_total_space = present;
|
||||
__make_alivelink("total-space", present / (1024 * 1024), true);
|
||||
|
||||
if (mars_throttle_start > 0 &&
|
||||
mars_throttle_end > mars_throttle_start &&
|
||||
|
|
|
@ -6103,7 +6103,7 @@ sub link_purge_global {
|
|||
# only when a new kernel is running
|
||||
if (defined($kernel_compat) && $kernel_compat ne "") {
|
||||
my $keep_hours = 0;
|
||||
my $glob = "{alive,buildtag,emergency,features,rest-space,time,tree,usable,used,compat-alivelinks}";
|
||||
my $glob = "{alive,buildtag,emergency,features,{rest,total}-space,time,tree,usable,used,compat-alivelinks}";
|
||||
# Notice: $kernel_compat might differ from $compat_alivelinks
|
||||
# For example, this can happen temporarily during join-cluster & co
|
||||
if (!$kernel_compat) {
|
||||
|
@ -8141,7 +8141,7 @@ sub eval_fn {
|
|||
$lnk = correct_path($lnk);
|
||||
return get_link($lnk, 1);
|
||||
}
|
||||
if (/^(tree|rest-space)$/) {
|
||||
if (/^(tree|(rest|total)-space)$/) {
|
||||
my $what = $1;
|
||||
return get_alive_link($what, $$env{"host"}, 1)
|
||||
}
|
||||
|
@ -9207,7 +9207,7 @@ my %trivial_globs =
|
|||
=> "",
|
||||
"is-{member,guest}"
|
||||
=> "",
|
||||
"rest-space"
|
||||
"{rest,total}-space"
|
||||
=> "",
|
||||
"get-{disk,device}"
|
||||
=> "",
|
||||
|
|
Loading…
Reference in New Issue