Marri Devender Rao | 55e9276 | 2022-03-25 04:33:33 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # config: 2 20 |
| 4 | # @brief: Get fanctl dump details |
| 5 | # |
| 6 | |
| 7 | . $DREPORT_INCLUDE/functions |
| 8 | |
| 9 | desc="fan control dump" |
| 10 | file_name="fan_control_dump.json" |
| 11 | |
| 12 | # collect data only if fanctl is present |
| 13 | if [ -e "/usr/bin/fanctl" ]; then |
| 14 | |
Patrick Williams | 9d26e4f | 2022-12-08 06:46:44 -0600 | [diff] [blame] | 15 | command="rm -f /tmp/fan_control_dump.json; /usr/bin/fanctl dump; \ |
Marri Devender Rao | 55e9276 | 2022-03-25 04:33:33 -0500 | [diff] [blame] | 16 | cat /tmp/fan_control_dump.json" |
| 17 | |
Patrick Williams | 9d26e4f | 2022-12-08 06:46:44 -0600 | [diff] [blame] | 18 | add_cmd_output "$command" "$file_name" "$desc" |
| 19 | rm -f /tmp/fan_control_dump.json |
Marri Devender Rao | 55e9276 | 2022-03-25 04:33:33 -0500 | [diff] [blame] | 20 | |
| 21 | fi |