nodewatcher.d: Remove $(date) from debug output

Debug output is written to stderr now.
Therefore the output is happening in real time and
the current date and time are not necessary anymore.

Typically the date and time are added by the syslog
daemon.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Fabian Bläse 2020-04-22 16:05:25 +02:00
parent c1f694c319
commit 2eb675790e
5 changed files with 9 additions and 9 deletions

View File

@ -6,7 +6,7 @@ debug() {
(>&2 echo "$1")
}
debug "$(date): Collecting information from batman advanced and its interfaces"
debug "Collecting information from batman advanced and its interfaces"
if [ -f /sys/module/batman_adv/version ]; then
for iface in $(batctl if | sed 's/ //'); do
@ -53,7 +53,7 @@ if [ -f /sys/module/batman_adv/version ]; then
echo -n "<batman_adv_gateway_list>$batman_adv_gateway_list</batman_adv_gateway_list>"
else
debug "$(date): No batman data .."
debug "No batman data .."
exit 1
fi

View File

@ -17,7 +17,7 @@ inArray() {
return 1
}
debug "$(date): Collecting information from network interfaces"
debug "Collecting information from network interfaces"
interface_data=""

View File

@ -8,7 +8,7 @@ debug() {
(>&2 echo "$1")
}
debug "$(date): Collecting information about connected clients"
debug "Collecting information about connected clients"
client_count=0
dataclient=""

View File

@ -9,7 +9,7 @@ debug() {
(>&2 echo "$1")
}
debug "$(date): Collecting basic system status data"
debug "Collecting basic system status data"
SYSTEM_DATA="<status>online</status>"
@ -59,7 +59,7 @@ SYSTEM_DATA="$SYSTEM_DATA<local_time>$(date +%s)</local_time>"
load=$(awk '{ printf "<loadavg>"$3"</loadavg><processes>"$4"</processes>" }' /proc/loadavg)
SYSTEM_DATA="$SYSTEM_DATA$load"
debug "$(date): Collecting version information"
debug "Collecting version information"
SYSTEM_DATA="$SYSTEM_DATA<batman_advanced_version>$(cat /sys/module/batman_adv/version)</batman_advanced_version>"
SYSTEM_DATA="$SYSTEM_DATA<kernel_version>$(uname -r)</kernel_version>"
@ -95,7 +95,7 @@ SYSTEM_DATA="$SYSTEM_DATA<firmware_revision>$BUILD_DATE</firmware_revision>"
SYSTEM_DATA="$SYSTEM_DATA<openwrt_core_revision>$OPENWRT_CORE_REVISION</openwrt_core_revision>"
SYSTEM_DATA="$SYSTEM_DATA<openwrt_feeds_packages_revision>$OPENWRT_FEEDS_PACKAGES_REVISION</openwrt_feeds_packages_revision>"
debug "$(date): Collecting hood information and additional status data"
debug "Collecting hood information and additional status data"
SYSTEM_DATA="$SYSTEM_DATA<hood>$(uci -q get "system.@system[0].hood")</hood>"
SYSTEM_DATA="$SYSTEM_DATA<hoodid>$(uci -q get "system.@system[0].hoodid")</hoodid>"

View File

@ -23,7 +23,7 @@ debug() {
#This method generates the crawl data XML file that is being fetched by netmon
#and provided by a small local httpd
crawl() {
debug "$(date): Putting all information into a XML-File and save it at $SCRIPT_DATA_FILE"
debug "Putting all information into a XML-File and save it at $SCRIPT_DATA_FILE"
DATA="<?xml version='1.0' standalone='yes'?><data>"
@ -43,7 +43,7 @@ crawl() {
LANG=C
#Erzeugt die statusdaten
debug "$(date): Generate actual status data"
debug "Generate actual status data"
crawl
exit 0