diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 10:58:21 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 10:58:21 -0400 |
| commit | 002e3d7d13c414ea874abbee8d82803dd3a72fe5 (patch) | |
| tree | 6627c12fa07f6a1cf73e5aaeb7390e698dd3a896 /tools/rmtop/include/rmtop.h | |
| parent | 2f249817df327f5dcccf0464ad517fa60d6071d3 (diff) | |
| download | open-iov-002e3d7d13c414ea874abbee8d82803dd3a72fe5.tar.gz open-iov-002e3d7d13c414ea874abbee8d82803dd3a72fe5.zip | |
debug: green-eye wave 3 - RM harness, local simulator, device map, MCP plugin, value-validation demos, CI pipeline, toolchain docs; add host RM tools rmtool/rmtop
Diffstat (limited to 'tools/rmtop/include/rmtop.h')
| -rw-r--r-- | tools/rmtop/include/rmtop.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tools/rmtop/include/rmtop.h b/tools/rmtop/include/rmtop.h new file mode 100644 index 0000000..9335e89 --- /dev/null +++ b/tools/rmtop/include/rmtop.h @@ -0,0 +1,49 @@ +/* rmtop.h - state and rendering declarations for the rmtop dashboard. */ +#ifndef RMTOP_H +#define RMTOP_H + +#include <time.h> +#include "rmtool.h" + +#define RMTOP_VERSION "0.1.0" +#define RMTOP_MAX_ENGINES NV2080_GPU_MAX_ENGINES_LIST_SIZE + +struct rmtop_state { + int gpu_minor; + char model[RM_NAME_LEN]; + char bdf[RM_BDF_LEN]; + char uuid[RM_UUID_LEN]; + char driver[80]; + + int rm_rc; + int have_rm; + char rm_name[RM_NAME_LEN]; + NvU32 mc_arch; + NvU32 mc_impl; + NvU32 mc_rev; + NvU8 mc_subrev; + + NvU32 vram_total_kib; + NvU32 vram_usable_kib; + NvU32 heap_size_kib; + NvU32 heap_free_kib; + NvU32 bar1_size_kib; + NvU32 bar1_avail_kib; + + int have_timer; + NvU64 timer_nsec; + + NvU32 engine_count; + NvU32 engine_list[RMTOP_MAX_ENGINES]; + char engine_names[RMTOP_MAX_ENGINES][24]; + int engine_names_ok; + + time_t sampled_at; +}; + +int rmtop_collect(struct rm_ctx *ctx, struct rmtop_state *st); +void rmtop_render_plain(const struct rmtop_state *st, enum rm_format format); +void rmtop_render_curses(const struct rmtop_state *st, int interval_ms, + int paused); + +#endif /* RMTOP_H */ |
