blob: c3191ceeeb7bcaac3b3e8e3fc1dc28f7b42ccfcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
{
find /dev/mapper -mindepth 1 -maxdepth 1 \( -name 'leg*' -o -name 'foot*' \) -printf '%f\n' \
| sort -u \
| xargs -rn1 cryptsetup status \
| grep -v '^\s\+device:'
sed -n '
/^Personalities/d
/^\S/ {
N
s/^\(\S\+\)\s*:.*\n\s*\([0-9]\)/\1: \2/
T
p
}
' /proc/mdstat \
| sort -u
find /sys/block/ -mindepth 1 -maxdepth 1 -name 'md*' -printf '%f: ' -exec cat {}/md/mismatch_cnt \; \
| sort -u
if command -v ssacli >/dev/null 2>&1; then
ssacli ctrl slot=1 ld all show \
| grep -v '^\s*$'
fi
} | \
if mountpoint -q /srv/http/tmp; then
sponge /srv/http/tmp/status
date +%s > /srv/http/tmp/status.time
else
cat
fi
|