File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
board/aarch64/rootfs/usr/share/product/marvell,armada-ap807/etc/support.d Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ ecc_stat ()
6+ {
7+ local chan=
8+ local base=
9+
10+ for chan in 0 1; do
11+ base=$(( 0xf0020360 + 0x200 * chan))
12+
13+ echo " DRAM Channel $chan ECC Status"
14+ echo -n " Log config: " ; devmem $(( base + 0x0 )) 32
15+ echo -n " 1b errors: " ; devmem $(( base + 0x4 )) 32
16+ echo -n " Info 0: " ; devmem $(( base + 0x8 )) 32
17+ echo -n " Info 1: " ; devmem $(( base + 0xc )) 32
18+ echo
19+ done
20+ }
21+
22+ [ -n " $1 " ] || { echo " usage: $0 OUT-DIR" ; exit 1; }
23+ work=" $1 " /marvell-cn913x
24+ mkdir -p " ${work} "
25+
26+ ecc_stat > " ${work} " /ecc-stat
Original file line number Diff line number Diff line change @@ -383,6 +383,17 @@ cmd_collect()
383383 collect system/netstat.txt ss -tunlp
384384 fi
385385
386+ for script in $( find " /etc/support.d" -type f -executable 2> /dev/null | sort) ; do
387+ echo " [$( date -Iseconds) ] Running ${script} ..." >> " ${EXEC_LOG} " 2>&1
388+
389+ if " ${script} " " ${COLLECT_DIR} " >> " ${EXEC_LOG} " 2>&1 ; then
390+ echo " [$( date -Iseconds) ] Success: ${script} " >> " ${EXEC_LOG} " 2>&1
391+ else
392+ exit_code=$?
393+ echo " [$( date -Iseconds) ] Failed (exit ${exit_code} ): ${script} " >> " ${EXEC_LOG} " 2>&1
394+ fi
395+ done
396+
386397 # Completion timestamp in log
387398 echo " " >> " ${EXEC_LOG} "
388399 echo " Completed: $( date -Iseconds) " >> " ${EXEC_LOG} "
You can’t perform that action at this time.
0 commit comments