Add cooling device stat dump in BR

Test: Verified dumpstate_board.txt

(cherry picked from commit 3a3004d07a1db8d23a71a6481bbeb5d31a03d173)

Change-Id: I7d42bce8d63da01ee2415349926eec6506d1b062
Signed-off-by: TeYuan Wang <kamewang@google.com>
This commit is contained in:
Wei Wang
2020-01-16 21:29:40 -08:00
committed by Cyan_Hsieh
parent aa401a16b8
commit eaed077922

View File

@@ -470,6 +470,8 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
DumpFileToFd(fd, "dmabuf process info", "/d/dma_buf/dmaprocs");
RunCommandToFd(fd, "Temperatures", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/thermal* ; do type=`cat $f/type` ; temp=`cat $f/temp` ; echo \"$type: $temp\" ; done"});
RunCommandToFd(fd, "Cooling Device Current State", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/cooling* ; do type=`cat $f/type` ; temp=`cat $f/cur_state` ; echo \"$type: $temp\" ; done"});
RunCommandToFd(fd, "Cooling Device Time in State", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/cooling* ; do type=`cat $f/type` ; temp=`cat $f/stats/time_in_state_ms` ; echo \"$type:\n$temp\" ; done"});
RunCommandToFd(fd, "Cooling Device Trans Table", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/cooling* ; do type=`cat $f/type` ; temp=`cat $f/stats/trans_table` ; echo \"$type:\n$temp\" ; done"});
RunCommandToFd(
fd, "LMH info",
{"/vendor/bin/sh", "-c",