Skip to content

feat(autoware_system_monitor): publish msgs for system_monitor API #2285

Merged
rej55 merged 5 commits intobeta/v0.48from
cherry-pick/beta/v0.48+system_monitor_api
Aug 8, 2025
Merged

feat(autoware_system_monitor): publish msgs for system_monitor API #2285
rej55 merged 5 commits intobeta/v0.48from
cherry-pick/beta/v0.48+system_monitor_api

Conversation

@iwatake2222
Copy link

@iwatake2222 iwatake2222 commented Aug 7, 2025

Description

Cherry-pick PR to beta/v0.48. This PR is expected to be included in X2 beta/v4.3.

Cherry-picking of the following PRs for Metrics collection

Related links

This PR implements the contents of the following PRs that added the API (msg) and have been already merged.

Private Links:

How was this PR tested?

ros2 topic echo /api/external/get/system_monitor
stamp:
  sec: 1585897285
  nanosec: 189880315
hostname: dpc2205002
cpu_temperature:
  stamp:
    sec: 1585897285
    nanosec: 189880315
  hostname: dpc2205002
  temperature: 60.0
  thermal_throttling: 1
memory_status:
  stamp:
    sec: 1585897285
    nanosec: 48099244
  hostname: dpc2205002
  usage: 20.946941375732422
gpu_status:
  stamp:
    sec: 1585897285
    nanosec: 7555326
  hostname: dpc2205002
  gpus: []
network_status:
  stamp:
    sec: 1585897285
    nanosec: 17687050
  hostname: dpc2205002
  interfaces:
  - name: lo
    rx_traffic: 2809.197265625
    tx_traffic: 2809.197265625
    capacity: -1.0
    rx_errors: 0
    tx_errors: 0
    collisions: 0
  - name: enp4s0
    rx_traffic: 0.014484170824289322
    tx_traffic: 0.004875780548900366
    capacity: 1000.0
    rx_errors: 0
    tx_errors: 0
    collisions: 0
  - name: docker0
    rx_traffic: 0.0
    tx_traffic: 0.0
    capacity: 65535.0
    rx_errors: 0
    tx_errors: 0
    collisions: 0
  error_ip_packet_reassembles_failed: 0
  error_udp_buf_rx: 0
  error_udp_buf_tx: 0
hdd_status:
  stamp:
    sec: 1585897285
    nanosec: 88705498
  hostname: dpc2205002
  devices:
  - name: /dev/nvme0n1
    read_data_rate: 0.0
    write_data_rate: 0.22304189205169678
    read_iops: 0.0
    write_iops: 21.65813636779785
  partitions:
  - size: 959827
    used: 384367
    avail: 526632
    capacity: 43
    filesystem: /dev/nvme0n1p2
    mounted_on: /

@github-actions
Copy link

github-actions bot commented Aug 7, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@iwatake2222 iwatake2222 changed the title Cherry pick/beta/v0.48+system monitor api feat(autoware_system_monitor): publish msgs for system_monitor API Aug 7, 2025
…ation#11020)

* feat(autoware_system_monitor): publish cpu_temperature

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* style(pre-commit): autofix

* make getter functions const

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

---------

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
…ion#11021)

* feat(autoware_system_monitor): publish memory_status

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* style(pre-commit): autofix

---------

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
…#11022)

* feat(autoware_system_monitor): publish gpu_status

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* style(pre-commit): autofix

* fix cpplint

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* Make a get function const and change unsigned int variables to int

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* add destructor to call nvmlShutdown

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* add casting

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* add casting

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* Make shut_down method protected

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

---------

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
…#11023)

* feat(autoware_system_monitor): publish hdd_status

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* style(pre-commit): autofix

* Improve HDD status handling: use emplace_back and safe vector access

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* style(pre-commit): autofix

* remove try block and use read values

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* Improve df error handling

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

---------

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
…tion#11024)

* feat(autoware_system_monitor): publish network_status

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* style(pre-commit): autofix

* fix cppcheck

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

* replace push_back with emblace_back

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>

---------

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: takeshi.iwanari <take.iwiw2222@gmail.com>
@iwatake2222 iwatake2222 force-pushed the cherry-pick/beta/v0.48+system_monitor_api branch from e228e8e to cee7c26 Compare August 7, 2025 08:39
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 7, 2025

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@iwatake2222 iwatake2222 requested a review from rej55 August 7, 2025 09:01
@rej55 rej55 merged commit a198a68 into beta/v0.48 Aug 8, 2025
42 of 45 checks passed
@rej55 rej55 deleted the cherry-pick/beta/v0.48+system_monitor_api branch August 8, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants