diff options
author | Peter Hunt <pehunt@redhat.com> | 2021-12-22 10:11:04 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-01-03 12:25:31 -0500 |
commit | 18938b27197e1fa97a88b6768fbe8e3811c1daf9 (patch) | |
tree | 1e59b5fb66d64dcb83db9e20f703d77420062daa | |
parent | 7472f8fa3b4129c61106f20f3ab9840b2585e232 (diff) | |
download | sos-18938b27197e1fa97a88b6768fbe8e3811c1daf9.tar.gz |
[crio] Collect goroutine information
According to instructions in https://github.com/cri-o/cri-o/blob/main/tutorials/debugging.md
Signed-off-by: Peter Hunt <pehunt@redhat.com>
-rw-r--r-- | sos/report/plugins/crio.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sos/report/plugins/crio.py b/sos/report/plugins/crio.py index 56cf64a7..17b016d8 100644 --- a/sos/report/plugins/crio.py +++ b/sos/report/plugins/crio.py @@ -78,6 +78,8 @@ class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): images = self._get_crio_list(img_cmd) pods = self._get_crio_list(pod_cmd) + self._get_crio_goroutine_stacks() + for container in containers: self.add_cmd_output("crictl inspect %s" % container, subdir="containers") @@ -102,4 +104,13 @@ class CRIO(Plugin, RedHatPlugin, UbuntuPlugin): ret.pop(0) return ret + def _get_crio_goroutine_stacks(self): + result = self.exec_cmd("pidof crio") + if result['status'] != 0: + return + pid = result['output'].strip() + result = self.exec_cmd("kill -USR1 " + pid) + if result['status'] == 0: + self.add_copy_spec("/tmp/crio-goroutine-stacks*.log") + # vim: set et ts=4 sw=4 : |