Skip to content

Commit

Permalink
Add the collection of OpenSVC threads
Browse files Browse the repository at this point in the history
This commit adds the collection of OpenSVC threads during the sosreport

Signed-off-by: tcarpentier <[email protected]>
  • Loading branch information
tcarpentier247 authored and arif-ali committed Mar 7, 2025
1 parent a65bad6 commit 3157204
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sos/report/plugins/opensvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ def setup(self):
self.add_dir_listing('/var/lib/opensvc', recursive=True)
self.get_status('vol')
self.get_status('svc')
pid_file = "/var/lib/opensvc/osvcd.pid"
try:
with open(pid_file, 'r', encoding='utf-8') as file:
pid = file.read().strip()
if not pid:
self._log_debug(f"{pid_file} is empty")
return
if not pid.isdigit():
self._log_debug(f"Invalid PID in {pid_file}: {pid}")
return
self.add_copy_spec(f"/proc/{pid}/task/*/status")
except (IOError, FileNotFoundError, PermissionError) as error:
self._log_debug(
f"Error while reading PID file {pid_file}: {error}"
)

def postproc(self):
# Example:
Expand Down

0 comments on commit 3157204

Please sign in to comment.