1#!/usr/bin/env bash
2#
3# config: 2 20
4# @brief: Get fanctl dump details
5#
6
7. $DREPORT_INCLUDE/functions
8
9desc="fan control dump"
10file_name="fan_control_dump.json"
11
12# collect data only if fanctl is present
13if [ -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
21fi
22