diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-01-14 18:56:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 18:56:40 +0000 |
commit | 4d958b8cf2f30920272185933721a794eb303efc (patch) | |
tree | b3ef05e344d75b40de418f33264e844b1635ce45 /collectors | |
parent | cc0de9f292c4bc1e91a8ec27114624c3b4e8becf (diff) |
Reduce broken pipe errors (#7588)
* tc_broken_pipe: Add exit to tc-qos-helper.sh.in
When Netdata received a kill -9 the script started from tc plugin using pipe stayed alive writting broken pipe,
this PR reduces the number of messages
* tc_broken_pipe: Missing exit
This commit brings exit for lines that were not reporting errors
Diffstat (limited to 'collectors')
-rwxr-xr-x | collectors/tc.plugin/tc-qos-helper.sh.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/collectors/tc.plugin/tc-qos-helper.sh.in b/collectors/tc.plugin/tc-qos-helper.sh.in index 50555c8b22..65d33153b2 100755 --- a/collectors/tc.plugin/tc-qos-helper.sh.in +++ b/collectors/tc.plugin/tc-qos-helper.sh.in @@ -211,7 +211,7 @@ show_fireqos_names() { if [ -f "${fireqos_run_dir}/ifaces/${x}" ]; then name="$(<"${fireqos_run_dir}/ifaces/${x}")" - echo "SETDEVICENAME ${name}" + echo "SETDEVICENAME ${name}" || exit #shellcheck source=/dev/null source "${fireqos_run_dir}/${name}.conf" @@ -219,7 +219,7 @@ show_fireqos_names() { # shellcheck disable=SC2086 setclassname ${n//|/ } done - [ -n "${interface_dev}" ] && echo "SETDEVICEGROUP ${interface_dev}" + [ -n "${interface_dev}" ] && echo "SETDEVICEGROUP ${interface_dev}" || exit return 0 fi @@ -230,7 +230,7 @@ show_fireqos_names() { show_tc() { local x="${1}" - echo "BEGIN ${x}" + echo "BEGIN ${x}" || exit # netdata can parse the output of tc ${tc} -s ${tc_show} show dev "${x}" @@ -240,7 +240,7 @@ show_tc() { show_fireqos_names "${x}" || show_tc_cls "${x}" fi - echo "END ${x}" + echo "END ${x}" || exit } find_tc_devices() { @@ -289,7 +289,7 @@ while true; do show_tc "${d}" done - echo "WORKTIME ${LOOPSLEEPMS_LASTWORK}" + echo "WORKTIME ${LOOPSLEEPMS_LASTWORK}" || exit loopsleepms ${update_every} |