Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lisa/operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,7 @@ def capture_system_information(self, saved_path: Path) -> None:

try:
systemd_analyze_tool = self._node.tools[SystemdAnalyze]
boot_time = systemd_analyze_tool.get_boot_time()
boot_time.information.update(self._node.get_information())
notifier.notify(boot_time)
systemd_analyze_tool.send_boot_time_messages()
except Exception as e:
self._node.log.debug(f"error on get boot time: {e}")

Expand Down
11 changes: 11 additions & 0 deletions lisa/tools/systemd_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from retry import retry

from lisa import notifier
from lisa.executable import Tool
from lisa.messages import ProvisionBootTimeMessage
from lisa.util import LisaException, find_groups_in_lines
Expand Down Expand Up @@ -78,6 +79,16 @@ def get_boot_time(self, force_run: bool = True) -> ProvisionBootTimeMessage:
boot_time.provision_time = self.node.provision_time
return boot_time

def send_boot_time_messages(self) -> None:
"""
Send boot time messages as ProvisionBootTimeMessage.
"""
boot_time = self.get_boot_time()
boot_time.information.update(self.node.get_information())

# Send ProvisionBootTimeMessage
notifier.notify(boot_time)

def plot(self, output_file: PurePath, sudo: bool = False) -> None:
self.run(f"plot > {output_file}", shell=True, sudo=sudo, expected_exit_code=0)

Expand Down
Loading