From 268f19d04a773f87e84350eac2823764b869dfc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Emin=20BA=C5=9EO=C4=9ELU?= Date: Thu, 13 Jun 2024 13:49:41 +0300 Subject: [PATCH] feat(system): create system usage message (#12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mehmet Emin BAŞOĞLU --- CMakeLists.txt | 4 +++- msg/ResourceUsageReport.msg | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 msg/ResourceUsageReport.msg diff --git a/CMakeLists.txt b/CMakeLists.txt index 7328b02..fd210e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,9 @@ ament_auto_find_build_dependencies() set(msg_files "msg/PublishedTime.msg" - "msg/MissionRemainingDistanceTime.msg") + "msg/MissionRemainingDistanceTime.msg" + "msg/ResourceUsageReport.msg" +) set(msg_dependencies builtin_interfaces diff --git a/msg/ResourceUsageReport.msg b/msg/ResourceUsageReport.msg new file mode 100644 index 0000000..31d1709 --- /dev/null +++ b/msg/ResourceUsageReport.msg @@ -0,0 +1,14 @@ +std_msgs/Header header + +# Process identifier +uint32 pid + +# CPU usage metrics +float32 cpu_cores_utilized + +# Memory usage metrics for the whole system +uint64 total_memory_bytes +uint64 free_memory_bytes + +# Memory usage metrics for the process +uint64 used_memory_bytes