1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Copyright 2025 Lablup Inc. and Jeongkyu Shin
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! # all-smi
//!
//! A cross-platform library for monitoring GPU, NPU, CPU, and memory hardware.
//!
//! `all-smi` provides a unified API for querying hardware metrics across multiple
//! platforms and device types including NVIDIA GPUs, AMD GPUs, Apple Silicon,
//! Intel Gaudi NPUs, Google TPUs, Tenstorrent, Rebellions, and Furiosa NPUs.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use all_smi::{AllSmi, Result};
//!
//! fn main() -> Result<()> {
//! // Initialize with auto-detection
//! let smi = AllSmi::new()?;
//!
//! // Get all GPU/NPU information
//! for gpu in smi.get_gpu_info() {
//! println!("{}: {}% utilization, {:.1}W",
//! gpu.name, gpu.utilization, gpu.power_consumption);
//! }
//!
//! // Get CPU information
//! for cpu in smi.get_cpu_info() {
//! println!("{}: {:.1}% utilization", cpu.cpu_model, cpu.utilization);
//! }
//!
//! // Get memory information
//! for mem in smi.get_memory_info() {
//! println!("Memory: {:.1}% used", mem.utilization);
//! }
//!
//! Ok(())
//! }
//! ```
//!
//! ## Using the Prelude
//!
//! For convenience, you can import all common types with the prelude:
//!
//! ```rust,no_run
//! use all_smi::prelude::*;
//!
//! fn main() -> Result<()> {
//! let smi = AllSmi::new()?;
//! let gpus: Vec<GpuInfo> = smi.get_gpu_info();
//! println!("Found {} GPU(s)", gpus.len());
//! Ok(())
//! }
//! ```
//!
//! ## Platform Support
//!
//! | Platform | GPUs | NPUs | CPU | Memory |
//! |----------|------|------|-----|--------|
//! | Linux | NVIDIA, AMD | Gaudi, TPU, Tenstorrent, Rebellions, Furiosa | Yes | Yes |
//! | macOS | Apple Silicon | - | Yes | Yes |
//! | Windows | NVIDIA, AMD | - | Yes | Yes |
//!
//! ## Features
//!
//! - **GPU Monitoring**: Utilization, memory, temperature, power, frequency
//! - **NPU Monitoring**: Intel Gaudi, Google TPU, Tenstorrent, Rebellions, Furiosa
//! - **CPU Monitoring**: Utilization, frequency, temperature, P/E cores (Apple Silicon)
//! - **Memory Monitoring**: System RAM, swap, buffers, cache
//! - **Process Monitoring**: GPU processes with memory usage
//! - **Chassis Monitoring**: Total power, thermal pressure, fan speeds
// =============================================================================
// Public Library API
// =============================================================================
/// High-level client API for hardware monitoring.
/// Unified error types for the library.
/// Prelude module for convenient imports.
// Re-export main types at crate root for convenience
pub use ;
pub use ;
// =============================================================================
// Internal Modules (also exported for advanced usage and testing)
// =============================================================================
/// Device readers and types for GPU, CPU, memory monitoring.
/// Parsing utilities and macros.
/// Application state management.
/// Command-line interface definitions.
/// Network client for remote monitoring.
/// Storage monitoring.
/// Common traits for collectors and exporters.
/// Terminal UI components.
/// Utility functions.
/// Configuration module.