marsadm: add basic macro replay-code

This commit is contained in:
Thomas Schoebel-Theuer 2016-01-15 07:38:08 +01:00 committed by Thomas Schoebel-Theuer
parent 496e57e1e1
commit 6c41326f7a
2 changed files with 52 additions and 0 deletions

View File

@ -7397,6 +7397,52 @@ get-resource-{fat,err,wrn}-count
\begin_layout Labeling
\labelwidthstring 00.00.0000
\family typewriter
replay-code
\family default
Indicate the current state of logfile replay / recovery:
\end_layout
\begin_deeper
\begin_layout Labeling
\labelwidthstring 00.00.0000
(empty) Unknown.
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
0 No replay is currently running.
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
1 Replay is currently running.
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
2 Replay has successfully stopped.
\end_layout
\begin_layout Labeling
\labelwidthstring 00.00.0000
<0 See Linux
\family typewriter
errno
\family default
code.
Typically this indicates a damaged logfile, or another filesystem error
at
\family typewriter
/mars
\family default
.
\end_layout
\end_deeper
\begin_layout Labeling
\labelwidthstring 00.00.0000
\family typewriter
is-{attach,sync,fetch,replay,primary,module-loaded}
\family default

View File

@ -2999,6 +2999,10 @@ sub eval_fn {
$lnk = correct_path($lnk);
return get_link($lnk, 1);
}
if (/^replay[-_]?code$/) {
my $lnk = $$env{"resdir"} . "/actual-" . $$env{"host"} . "/replay-code";
return get_link($lnk, 2);
}
if (/^(sync|fetch|replay|work)[-_]?(rate|remain)$/) {
my $what = $1;
my $select = $2;
@ -3988,6 +3992,8 @@ my %trivial_globs =
=> "",
"occupied-size"
=> "",
"replay-code"
=> "When negative, this indidates that a replay/recovery error has occurred.",
"{sync,fetch,replay,work,syncpos}-{size,pos}"
=> "",
"{sync,fetch,replay,work}-{rest,{almost-,threshold-,}reached,percent,permille,vector}"