diff --git a/self-diagnostics/Makefile b/self-diagnostics/Makefile index 29fd66467..790ef782e 100644 --- a/self-diagnostics/Makefile +++ b/self-diagnostics/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=self-diagnostics -PKG_VERSION:=1.0.2 +PKG_VERSION:=1.0.3 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0-only diff --git a/self-diagnostics/README.md b/self-diagnostics/README.md index 932c0496e..7178fc130 100644 --- a/self-diagnostics/README.md +++ b/self-diagnostics/README.md @@ -19,7 +19,7 @@ Options: It also has an uci file to configure the various parameters: ```bash -# cat /etc/config/self-diagnostics +# cat /etc/config/self-diagnostics config globals 'globals' option extended_spec_dir '/etc/self-diagnostics/spec' option exec_timeout '5' @@ -117,7 +117,7 @@ Extension Module(s): ### Run and collect logs ```bash -# self-diagnostics +# self-diagnostics /tmp/self-diagnostics-report-EX600-Y.0721140081.tar.gz ``` diff --git a/self-diagnostics/files/usr/sbin/self-diagnostics b/self-diagnostics/files/usr/sbin/self-diagnostics index 0e7f6a6d3..e52cc622e 100755 --- a/self-diagnostics/files/usr/sbin/self-diagnostics +++ b/self-diagnostics/files/usr/sbin/self-diagnostics @@ -37,7 +37,7 @@ log() { log_file="${REPORT_DIR}/execution.log" if [ "$VERBOSE" -eq 1 ]; then - logger -t $0 "$*" + logger -t $0 "$*" fi echo "[$(date +%Y:%m:%d-%H:%M:%S)] $*" >> ${log_file} } @@ -77,7 +77,7 @@ config_load() [ -n "${temp}" ] && \ REPORT_NAME="$(eval echo ${temp})" - REPORT_NAME="${REPORT_NAME// /_}" + REPORT_NAME="${REPORT_NAME//[ \/]/_}" temp="$(uci -q get self-diagnostics.globals.compression_level)" [ -n "${temp}" ] && \ diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/config.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/config.json index b4db3efd3..23151def4 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/config.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/config.json @@ -7,15 +7,15 @@ }, { "description": "Installed Packages", - "cmd": "opkg list-installed" + "cmd": "opkg list-installed" }, { "description": "Database", - "cmd": "db export" + "cmd": "db export" }, { "description": "Configuration", - "cmd": "uci export" + "cmd": "uci export" }, { "description": "Runtime Configuration", @@ -23,7 +23,7 @@ }, { "description": "Firmware Environment", - "cmd": "fw_printenv" - } + "cmd": "fw_printenv" + } ] } diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/multiap.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/multiap.json index a2123dd8a..0f070c689 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/multiap.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/multiap.json @@ -8,7 +8,7 @@ { "type": "file", "file": "/etc/config/ieee1905" - } + } ], "exec" : [ { @@ -34,7 +34,7 @@ { "description": "IEEE1905 Others", "cmd": "ubus call ieee1905 others" - }, + }, { "description": "IEEE1905 Topology", "cmd": "ubus call ieee1905.topology dump" @@ -42,7 +42,7 @@ { "description": "MAP Agent Info", "cmd": "ubus call map.agent info" - }, + }, { "description": "MAP Agent Status", "cmd": "ubus call map.agent status" @@ -50,7 +50,7 @@ { "description": "MAP Agent Backhaul Info", "cmd": "ubus call map.agent backhaul_info" - }, + }, { "description": "MAP Controller Status", "cmd": "ubus call map.controller status" @@ -66,6 +66,6 @@ { "description": "Data Elements Dump", "cmd": "ubus call wifi.dataelements.collector refresh; sleep 2; ubus call wifi.dataelements.collector dump2" - } + } ] } diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/network.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/network.json index 2592e432c..40194750c 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/network.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/network.json @@ -12,7 +12,7 @@ { "description": "Linux Network Interface Config", "cmd": "ifconfig -a" - }, + }, { "description": "IPv4 Routes", "cmd": "ip -d r" @@ -60,7 +60,7 @@ { "description": "Bridge FDB", "cmd": "bridge fdb" - }, + }, { "description": "TCP listened ports", "cmd": "netstat -tlnp" diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/system.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/system.json index eb3c65b7f..c1a5d284e 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/system.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/system.json @@ -3,65 +3,65 @@ "exec" : [ { "description": "Firmware banks", - "cmd": "ubus call fwbank dump" - }, + "cmd": "ubus call fwbank dump" + }, { "description": "System Info", "cmd": "ubus call system info" }, { "description": "Board Info", - "cmd": "ubus call system board" + "cmd": "ubus call system board" }, { "description": "Running Processes", - "cmd": "top -b -n 1" + "cmd": "top -b -n 1" }, { "description": "Kernel Parameters", - "cmd": "sysctl -A 2>/dev/null" - }, + "cmd": "sysctl -A 2>/dev/null" + }, { "description": "System Log", - "cmd": "timeout 5 logread -l 1000" + "cmd": "timeout 5 logread -l 1000" }, { "description": "Driver Message", - "cmd": "timeout 5 dmesg" + "cmd": "timeout 5 dmesg" }, { "description": "PCI Devices", - "cmd": "lspci -k" + "cmd": "lspci -k" }, { "description": "Installed Modules", - "cmd": "lsmod" + "cmd": "lsmod" }, { "description": "CPU Info", - "cmd": "cat /proc/cpuinfo" + "cmd": "cat /proc/cpuinfo" }, { "description": "Memory Info", - "cmd": "cat /proc/meminfo" + "cmd": "cat /proc/meminfo" }, { "description": "Slab Info", - "cmd": "cat /proc/slabinfo" + "cmd": "cat /proc/slabinfo" }, { "description": "eMMC Partition/Volume Info", "cmd": "fdisk -l", "dependency" : { "file": "/sbin/fdisk" - } + } }, { "description": "NAND Partition/Volume Info", "cmd": "ubinfo --all", "dependency" : { "file": "/usr/sbin/ubinfo" - } - } + } + } ] } diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/trx69.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/trx69.json index 26bff7fb2..31b8dcaca 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/trx69.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/trx69.json @@ -4,13 +4,13 @@ { "type": "file", "file": "/etc/config/cwmp" - } + } ], "exec" : [ { "description": "TR-181 DM MAP", "cmd": "uci -c /etc/bbfdm/dmmap export" - }, + }, { "description": "TR-181 Parameters via BBFDM", "cmd": "bbfdmd -c get Device." @@ -18,7 +18,7 @@ { "description": "TR-181 Parameters via CWMP", "cmd": "icwmpd -c get Device." - }, + }, { "description": "TR-069 status", "cmd": "ubus call tr069 status" @@ -31,17 +31,17 @@ "type": "file", "file": "/var/log/icwmpd.log" } - ] + ] }, { "description": "TR-181 Parameters via USP", "cmd": "obuspa -c get Device.", "timeout": 10 - }, + }, { "description": "USP Agent Database", "cmd": "obuspa -f $(uci -q get obuspa.global.db_file) -c show database" - }, + }, { "description": "USP Logs", "cmd": "cat /var/log/obuspa.log", @@ -50,7 +50,7 @@ "type": "file", "file": "/var/log/obuspa.log" } - ] - } + ] + } ] } diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/voice.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/voice.json index 25ab1b86b..4a32c4410 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/voice.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/voice.json @@ -4,7 +4,7 @@ { "type": "file", "file": "/etc/config/asterisk" - } + } ], "exec" : [ { @@ -14,7 +14,7 @@ { "description": "Endpoint Count", "cmd": "ubus call endpt count" - }, + }, { "description": "Voice Status", "cmd": "ubus call voice.asterisk status" @@ -27,7 +27,7 @@ "type": "file", "file": "/etc/config/dect" } - ] + ] }, { "description": "DECT Handsets", @@ -37,7 +37,7 @@ "type": "file", "file": "/etc/config/dect" } - ] - } + ] + } ] } diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json index 70dccb541..601ab4346 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json @@ -4,7 +4,7 @@ { "type": "file", "file": "/sys/class/ieee80211" - } + } ], "exec" : [ { @@ -26,6 +26,6 @@ { "description": "iwinfo interface details", "cmd": "/usr/bin/iwinfo" - } + } ] }