1*24226c4fSGopichand Paturi#!/usr/bin/env bash 2*24226c4fSGopichand Paturi# 3*24226c4fSGopichand Paturi# config: 234 10 4*24226c4fSGopichand Paturi# @brief: Get the occ information. 5*24226c4fSGopichand Paturi# 6*24226c4fSGopichand Paturi 7*24226c4fSGopichand Paturi# shellcheck disable=SC1091 8*24226c4fSGopichand Paturi. "$DREPORT_INCLUDE"/functions 9*24226c4fSGopichand Paturi 10*24226c4fSGopichand Paturi#fetch occ control data 11*24226c4fSGopichand Paturifile_name="occ.log" 12*24226c4fSGopichand Paturi 13*24226c4fSGopichand Paturidesc="occ control" 14*24226c4fSGopichand Paturicommand="busctl call --verbose --no-pager \ 15*24226c4fSGopichand Paturi org.open_power.OCC.Control \ 16*24226c4fSGopichand Paturi /org/open_power/control \ 17*24226c4fSGopichand Paturi org.freedesktop.DBus.ObjectManager \ 18*24226c4fSGopichand Paturi GetManagedObjects" 19*24226c4fSGopichand Paturi 20*24226c4fSGopichand Paturiadd_cmd_output "$command" "$file_name" "$desc" 21*24226c4fSGopichand Paturi 22*24226c4fSGopichand Paturi#fetch occ control host data 23*24226c4fSGopichand Paturidesc="occ conrol host" 24*24226c4fSGopichand Paturicommand="busctl call --verbose --no-pager \ 25*24226c4fSGopichand Paturi org.open_power.OCC.Control \ 26*24226c4fSGopichand Paturi /xyz/openbmc_project/control \ 27*24226c4fSGopichand Paturi org.freedesktop.DBus.ObjectManager \ 28*24226c4fSGopichand Paturi GetManagedObjects" 29*24226c4fSGopichand Paturiadd_cmd_output "$command" "$file_name" "$desc" 30*24226c4fSGopichand Paturi 31*24226c4fSGopichand Paturi#fetch occ sensors data 32*24226c4fSGopichand Paturidesc="occ sensor" 33*24226c4fSGopichand Paturicommand="busctl call --verbose --no-pager \ 34*24226c4fSGopichand Paturi org.open_power.OCC.Control \ 35*24226c4fSGopichand Paturi /xyz/openbmc_project/sensors \ 36*24226c4fSGopichand Paturi org.freedesktop.DBus.ObjectManager \ 37*24226c4fSGopichand Paturi GetManagedObjects" 38*24226c4fSGopichand Paturiadd_cmd_output "$command" "$file_name" "$desc" 39*24226c4fSGopichand Paturi 40*24226c4fSGopichand Paturiocc_dir="/var/lib/openpower-occ-control" 41*24226c4fSGopichand Paturiif [ -d "$occ_dir" ]; then 42*24226c4fSGopichand Paturi add_copy_file "$occ_dir" "$desc" 43*24226c4fSGopichand Paturifi 44