diff options
Diffstat (limited to 'collect.d/system')
-rw-r--r-- | collect.d/system | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/collect.d/system b/collect.d/system index 4ec5438..71c2f38 100644 --- a/collect.d/system +++ b/collect.d/system @@ -63,3 +63,16 @@ done if [ -f /etc/X11/xorg.conf ]; then cp /etc/X11/xorg.conf . fi + +# Collect Cisco Discover Protocol information from all interfaces, in +# parallell. +if type cdpr >/dev/null 2>&1; then + childs="" + for if in $(ip link show up|awk '/^[0-9]+:/ {print $2}' | cut -d: -f1) ; do + cdpr -d $if -t 61 > cdpr.$if & + childs="$childs $!" + done + for pid in $childs ; do + wait $pid + done +fi |