Skip to content

Commit 509e8a7

Browse files
committed
hw-mgmt: scripts: Add hw-mgmt tree dump to sysfs monitor service
Adding the hw-mgmt tree dump before termination of sysfs monitor service to facilitate service debugging. Bug: 4603973 Signed-off-by: Felix Radensky <[email protected]>
1 parent d6ee3b5 commit 509e8a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

usr/usr/bin/hw-management-sysfs-monitor.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ do_start_sysfs_monitor()
7676
log_info "sysfs monitor done!"
7777
# Write the current time into the sysfs ready file.
7878
echo "$current_time" > "$SYSFS_MONITOR_RDY_FILE"
79+
# Generate debug dump of hw-mgmt tree
80+
find -L $hw_management_path -maxdepth 4 ! -name '*_info' ! -name '*_eeprom' \
81+
! -name '*.sh' ! -name '*.py' ! -name 'led_*_state' -exec ls -la {} \; -exec cat {} \; > /var/log/hw-mgmt-val.log 2>/dev/null
7982
# Exit the sysfs monitor.
8083
exit 0
8184
fi
@@ -126,4 +129,4 @@ case $SYSFS_MONITOR_ACTION in
126129
exit 1
127130
;;
128131
esac
129-
exit 0
132+
exit 0

0 commit comments

Comments
 (0)