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