1*55e92765SMarri Devender Rao#!/usr/bin/env bash
2*55e92765SMarri Devender Rao#
3*55e92765SMarri Devender Rao# config: 2 20
4*55e92765SMarri Devender Rao# @brief: Get fanctl dump details
5*55e92765SMarri Devender Rao#
6*55e92765SMarri Devender Rao
7*55e92765SMarri Devender Rao. $DREPORT_INCLUDE/functions
8*55e92765SMarri Devender Rao
9*55e92765SMarri Devender Raodesc="fan control dump"
10*55e92765SMarri Devender Raofile_name="fan_control_dump.json"
11*55e92765SMarri Devender Rao
12*55e92765SMarri Devender Rao# collect data only if fanctl is present
13*55e92765SMarri Devender Raoif [ -e "/usr/bin/fanctl" ]; then
14*55e92765SMarri Devender Rao
15*55e92765SMarri Devender Rao    command="rm -f /tmp/fan_control_dump.json; /usr/bin/fanctl dump; \
16*55e92765SMarri Devender Rao           cat /tmp/fan_control_dump.json"
17*55e92765SMarri Devender Rao
18*55e92765SMarri Devender Rao    add_cmd_output "$command" "$file_name" "$desc"
19*55e92765SMarri Devender Rao    rm -f /tmp/fan_control_dump.json
20*55e92765SMarri Devender Rao
21*55e92765SMarri Devender Raofi
22