Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P9834
kludge up a "number of seconds we saw the NIC close to saturation" exporter
Active
Public
Actions
Authored by
CDanis
on Dec 6 2019, 8:04 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F31460942: raw.txt
Dec 6 2019, 8:04 PM
2019-12-06 20:04:13 (UTC+0)
Subscribers
None
stdbuf -i0 -o0 -e0 ifstat -n -t -b
|
stdbuf -i0 -o0 -e0 tail -n+3
|
(
outsatsecs
=
0
;
insatsecs
=
0
;
while
read
ts kbpsin kbpsout
;
do
if
[[
$kbpsout
-ge
900000
]]
;
then
((
outsatsecs++
))
;
fi
if
[[
$kbpsin
-ge
900000
]]
;
then
((
insatsecs++
))
;
fi
;
echo
'nic_saturated_seconds{dir="out"}'
${
outsatsecs
}
'\nnic_saturated_seconds{dir="in"}'
$insatsecs
|
tee >
(
sponge /var/lib/prometheus/node.d/saturated.prom
)
;
done
)
Event Timeline
CDanis
created this paste.
Dec 6 2019, 8:04 PM
2019-12-06 20:04:13 (UTC+0)
CDanis
changed the title of this paste from untitled to
kludge up a "number of seconds we saw the NIC close to saturation" exporter
.
Dec 6 2019, 8:10 PM
2019-12-06 20:10:03 (UTC+0)
Ipr1
mentioned this in
T351952: Kansallisgallerian kuvien tunnistaminen
.
Dec 4 2023, 10:00 PM
2023-12-04 22:00:07 (UTC+0)
Log In to Comment