Monitor
This page documents the monitoring stack under jumper_extension.monitor, including the core monitor and metric backends. High‑level usage is described in the Public API and Jupyter API sections; the content below is generated directly from the Python code.
Core
MonitorUnavailableError
Bases: RuntimeError
This monitor is a stub and cannot be used.
Source code in jumper_extension/monitor/common.py
32 33 | |
OfflinePerformanceMonitor
Offline monitor that satisfies MonitorProtocol.
Holds static DataFrames plus metadata from a manifest; does not collect live data.
Source code in jumper_extension/monitor/common.py
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 | |
UnavailablePerformanceMonitor
A stub that type-checks against MonitorProtocol but fails at runtime.
Any attribute access or method call raises MonitorUnavailableError, except 'running', which always returns False.
Source code in jumper_extension/monitor/common.py
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 | |
CPU
PsutilCpuCollector
Bases: CpuCollectorBackend
CPU backend implemented via psutil.
Source code in jumper_extension/monitor/metrics/cpu/psutil.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
Memory
PsutilMemoryCollector
Bases: MemoryCollectorBackend
Memory backend implemented via psutil.
Source code in jumper_extension/monitor/metrics/memory/psutil.py
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 | |
IO
PsutilIoCollector
Bases: IoCollectorBackend
I/O backend implemented via psutil.
Source code in jumper_extension/monitor/metrics/io/psutil.py
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 | |
Process
PsutilProcessCollector
Bases: ProcessCollectorBackend
Process backend implemented via psutil.
Source code in jumper_extension/monitor/metrics/process/psutil.py
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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
filter_process(proc, mode)
Check if process matches the filtering mode.
Source code in jumper_extension/monitor/metrics/process/psutil.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
get_filtered_processes(level='user', mode='cpu', handle=None)
Get filtered processes for CPU monitoring.
Source code in jumper_extension/monitor/metrics/process/psutil.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
get_process_pids()
Get current process PID and all its children PIDs.
Source code in jumper_extension/monitor/metrics/process/psutil.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
safe_proc_call(proc, proc_func, default=0)
Safely call a process method and return default on error.
Source code in jumper_extension/monitor/metrics/process/psutil.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
snapshot(context)
Compute process_pids then collect cpu/memory/io for every known PID.
Populates context["process_pids"], context["cpu"], context["rss"], context["io"], context["user_pids"], and context["slurm_pids"].
Source code in jumper_extension/monitor/metrics/process/psutil.py
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 | |
GPU
GpuCollectorBackend
Bases: CollectorBackend
A pluggable backend that provides GPU discovery and metric collection.
Source code in jumper_extension/monitor/metrics/gpu/common.py
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 | |
collect(level, context)
Collect metrics for the given level.
Returns: (gpu_util, gpu_band, gpu_mem)
Source code in jumper_extension/monitor/metrics/gpu/common.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
shutdown()
Clean up resources if needed.
Source code in jumper_extension/monitor/metrics/gpu/common.py
19 20 21 | |
GpuDiscovery
Finds all available GPU device backends at runtime.
Source code in jumper_extension/monitor/metrics/gpu/common.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
MultiGpuCollector
Combined GPU pipeline member — aggregates all discovered device backends.
Source code in jumper_extension/monitor/metrics/gpu/common.py
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 142 143 144 | |
NullGpuCollector
Bases: GpuCollectorBackend
A no-op backend used when no GPU backend is available.
Source code in jumper_extension/monitor/metrics/gpu/common.py
78 79 80 81 82 83 84 | |
NvmlGpuCollector
Bases: GpuCollectorBackend
NVIDIA NVML backend (uses pynvml).
Source code in jumper_extension/monitor/metrics/gpu/nvml.py
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 142 143 144 145 146 | |
AdlxGpuCollector
Bases: GpuCollectorBackend
AMD ADLX backend (uses ADLXPybind).
Source code in jumper_extension/monitor/metrics/gpu/adlx.py
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 | |