Skip to content

Implement dora inspect top Command #1210

@ZhangHanDong

Description

@ZhangHanDong

Goal: Real-time monitor node resource usage (similar to Linux top)

Functional Requirements:

  • Real-time refresh display (1-5 second intervals)
  • Display CPU, memory, I/O for each node
  • Support interactive sorting (by CPU/memory)
  • Press 'q' to exit

Technical Points:

  • Use sysinfo to periodically query process resources
  • Use terminal control sequences for clearing and refreshing screen
  • Optional: Use ratatui to build TUI (if interaction needed)

Acceptance Criteria:

$ dora inspect top
Refreshing every 2s...

NODE            CPU    MEMORY   I/O READ  I/O WRITE
detector_node   15.8%  450 MB   10 MB/s   2 MB/s
camera_node     5.2%   120 MB   50 MB/s   0 MB/s
planner_node    8.1%   200 MB   1 MB/s    5 MB/s

Press 'q' to quit

Compatibility: New command, does not affect existing functionality

Dependencies:

  • sysinfo crate
  • Optional: ratatui (if interactive sorting needed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLIwaiting-for-authorThe pull request requires adjustments by the PR author.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions