Skip to content

Commit 8c4b06e

Browse files
committed
add shared state in the report
1 parent 5f955d5 commit 8c4b06e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/lime-report/files/bin/lime-report.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,25 @@ generate_status() {
7171
paste_cmd opkg list-installed
7272
}
7373

74+
generate_shared_state() {
75+
echo -e "\n### shared-state-async registered datatypes\n"
76+
for section in $(uci show shared-state 2>/dev/null | grep '=dataType' | cut -d'.' -f2 | cut -d'=' -f1); do
77+
datatype=$(uci -q get shared-state.$section.name)
78+
if [ -n "$datatype" ]; then
79+
echo -e "\n### CMD shared-state-async dump $datatype\n"
80+
shared-state-async dump "$datatype" 2>&1
81+
fi
82+
done
83+
paste_file /tmp/shared-state/shared-state-async.conf
84+
paste_file /tmp/shared-state-get_candidates_neigh.cache
85+
paste_file /tmp/shared-state-get_candidates_neigh.lastrun
86+
}
87+
7488
generate_all() {
7589
generate_deviceinfo
7690
generate_config
7791
generate_status
92+
generate_shared_state
7893
}
7994

8095
[ "$1" = "--help" ] || [ "$1" = "-h" ] && {
@@ -83,9 +98,11 @@ generate_all() {
8398
echo "-h for help" && \
8499
echo "-d print only device info" && \
85100
echo "-c print only main configuration" && \
86-
echo "-s print only current status"
101+
echo "-s print only current status" && \
102+
echo "-ss print only shared-state-async data (publish all and dump all datatypes)"
87103
}
88104
[ "$1" = "" ] && header && generate_all
89105
[ "$1" = "-d" ] && header && generate_deviceinfo
90106
[ "$1" = "-c" ] && header && generate_config
91107
[ "$1" = "-s" ] && header && generate_status
108+
[ "$1" = "-ss" ] && header && generate_shared_state

0 commit comments

Comments
 (0)