[PATCH] nodewatcher: Provide data to calculate airtime
Christian Dresel
fff at chrisi01.de
So Jan 21 20:46:41 CET 2018
hi
On 21.01.2018 19:59, Adrian Schmutzler wrote:
> The actual calculation is done in the Monitoring.
>
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
>
> Tested-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> ---
> src/packages/fff/fff-nodewatcher/Makefile | 2 +-
> .../fff/fff-nodewatcher/files/usr/sbin/nodewatcher | 17 ++++++++++++++++-
> 2 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/src/packages/fff/fff-nodewatcher/Makefile b/src/packages/fff/fff-nodewatcher/Makefile
> index 273916b..633ec71 100644
> --- a/src/packages/fff/fff-nodewatcher/Makefile
> +++ b/src/packages/fff/fff-nodewatcher/Makefile
> @@ -1,7 +1,7 @@
> include $(TOPDIR)/rules.mk
>
> PKG_NAME:=fff-nodewatcher
> -PKG_VERSION:=46
> +PKG_VERSION:=47
> PKG_RELEASE:=1
>
> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
> diff --git a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
> index 195aea5..38c549d 100755
> --- a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
> +++ b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
> @@ -2,7 +2,7 @@
> # Netmon Nodewatcher (C) 2010-2012 Freifunk Oldenburg
> # License; GPL v3
>
> -SCRIPT_VERSION="46"
> +SCRIPT_VERSION="47"
>
> test -f /tmp/started || exit
>
> @@ -267,6 +267,20 @@ crawl() {
> dataclient="$dataclient<$clientif>$cc</$clientif>"
> done
>
> + dataair=""
> + w2dump="$(iw dev w2mesh survey dump 2> /dev/null | sed '/Survey/,/\[in use\]/d')"
Interface auf w2ap...
> + if [ -n "$w2dump" ] ; then
> + w2_ACT="$(ACTIVE=$(echo "$w2dump" | grep "active time:"); set ${ACTIVE:-0 0 0 0 0}; echo -e "${4}")"
> + w2_BUS="$(BUSY=$(echo "$w2dump" | grep "busy time:"); set ${BUSY:-0 0 0 0 0}; echo -e "${4}")"
> + dataair="$dataair<airtime2><active>$w2_ACT</active><busy>$w2_BUS</busy></airtime2>"
> + fi
> + w5dump="$(iw dev w5mesh survey dump 2> /dev/null | sed '/Survey/,/\[in use\]/d')"
... bzw. w5ap ändern, dann wäre ich mit zufrieden wenn auch nicht
perfekt aber ich finde aktuell auch keine bessere Lösung.
mfg
Christian
> + if [ -n "$w5dump" ] ; then
> + w5_ACT="$(ACTIVE=$(echo "$w5dump" | grep "active time:"); set ${ACTIVE:-0 0 0 0 0}; echo -e "${4}")"
> + w5_BUS="$(BUSY=$(echo "$w5dump" | grep "busy time:"); set ${BUSY:-0 0 0 0 0}; echo -e "${4}")"
> + dataair="$dataair<airtime5><active>$w5_ACT</active><busy>$w5_BUS</busy></airtime5>"
> + fi
> +
> err "$(date): Putting all information into a XML-File and save it at $SCRIPT_DATA_FILE"
>
> DATA="<?xml version='1.0' standalone='yes'?><data>"
> @@ -278,6 +292,7 @@ crawl() {
> DATA=$DATA"<batman_adv_gateway_list>$batman_adv_gateway_list</batman_adv_gateway_list>"
> DATA=$DATA"<client_count>$client_count</client_count>"
> DATA=$DATA"<clients>$dataclient</clients>"
> + DATA=$DATA"$dataair"
> DATA=$DATA"</data>"
>
> #write data to xml file that provides the data on httpd
>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : signature.asc
Dateityp : application/pgp-signature
Dateigröße : 833 bytes
Beschreibung: OpenPGP digital signature
URL : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20180121/223355d6/attachment.sig>
Mehr Informationen über die Mailingliste franken-dev