Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resmon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrors
resmon
Commits
43512d3f
Commit
43512d3f
authored
4 years ago
by
Sergey Joseph Ivanov
Browse files
Options
Downloads
Patches
Plain Diff
new output for zol
parent
f024accb
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Site/ZpoolScrub.pm
+24
-3
24 additions, 3 deletions
lib/Site/ZpoolScrub.pm
with
24 additions
and
3 deletions
lib/Site/ZpoolScrub.pm
+
24
−
3
View file @
43512d3f
...
...
@@ -94,6 +94,15 @@ sub handler {
scan: scrub in progress since Tue Mar 29 19:09:47 2016
14.3G scanned out of 47.0G at 172M/s, 0h3m to go
0 repaired, 30.42% done
- or -
scan: resilver in progress since Fri Aug 7 14:07:30 2020
451G scanned at 2.17G/s, 2.13M issued at 10.5K/s, 19.6T total
0B resilvered, 0.00% done, no estimated completion time
- or -
scan: resilver in progress since Fri Aug 7 14:07:30 2020
855G scanned at 188M/s, 227G issued at 49.9M/s, 19.6T total
228G resilvered, 1.13% done, 4 days 17:00:28 to go
=cut
my
(
$when
,
$days
,
$h
,
$m
,
$s
,
$howlong
,
$togo
,
$repaired
,
$errors
,
$canceled
)
=
(
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
my
$STATUSCMD
=
"
/usr/sbin/zpool status
$zpool
";
...
...
@@ -127,18 +136,30 @@ sub handler {
$togo
=
0
;
`
$ECHO
-n
$howlong
>
$statusfile
`
unless
$howlong
==
$oldhowlong
&&
(
-
w
$statusfile
);
}
elsif
(
/^\s*scan:\s+scrub\s+in\s+progress\s+since\s+(.+)$/
){
elsif
(
(
/^\s*scan:\s+scrub\s+in\s+progress\s+since\s+(.+)$/
)
or
(
/^\s*scan:\s+resilver\s+in\s+progress\s+since\s+(.+)$/
)
){
$when
=
$
1
;
$when
=
`
$DATE
'+%s'
`
-
`
$DATE
'+%s' -d "
$when
"
`;
$when
+=
30
;
$when
/=
60
;
$when
=
int
(
$when
);
}
elsif
(
/^\s*\S+\s+scanned\s+out\s+of\s+\S+\s+at\s+\S+,\s+(\d+)h(\d+)m\s+to\s+go\s*$/
){
elsif
(
(
/^\s*\S+\s+scanned.*,\s+(\d+)h(\d+)m\s+to\s+go\s*$/
)
or
(
/^\s*\S+\s+resilvered.*,\s+(\d+)h(\d+)m\s+to\s+go\s*$/
)
){
$togo
=
$
1
*
60
+
$
2
;
$howlong
=
$oldhowlong
;
}
elsif
(
/^\s*(\d+)\s+repaired,/
){
elsif
(
(
/^\s*\S+\s+scanned.*,\s+(\d+)\s+days\s+(\d+):(\d+):(\d+)\s+to\s+go\s*$/
)
or
(
/^\s*\S+\s+resilvered.*,\s+(\d+)\s+days\s+(\d+):(\d+):(\d+)\s+to\s+go\s*$/
)
){
$togo
=
(
$
1
*
24
+
$
2
)
*
60
+
$
3
;
$howlong
=
$oldhowlong
;
}
elsif
(
(
/^\s*(\d+)\s+repaired,/
)
or
(
/^\s*(\d+)\s+resilvered,/
)
){
$repaired
=
$
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment