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 | |
| 15 | command="rm -f /tmp/fan_control_dump.json; /usr/bin/fanctl dump; \ |
| 16 | cat /tmp/fan_control_dump.json" |
| 17 | |
| 18 | add_cmd_output "$command" "$file_name" "$desc" |
| 19 | rm -f /tmp/fan_control_dump.json |
| 20 | |
| 21 | fi |