# CPUMonitorMagics { #vscodenb.CPUMonitorMagics }

```python
vscodenb.CPUMonitorMagics()
```

IPython magics for CPU monitoring.

## Methods

| Name | Description |
| --- | --- |
| [monitor](#vscodenb.CPUMonitorMagics.monitor) | Monitor CPU usage during cell execution. |

### monitor { #vscodenb.CPUMonitorMagics.monitor }

```python
vscodenb.CPUMonitorMagics.monitor(line, cell)
```

Monitor CPU usage during cell execution.

Usage:
    %%monitor
    # your code here

    %%monitor --width 100 --interval 1.0
    # your code here

    %%monitor --persist
    # display remains after completion

    %%monitor --color
    # use color coding (green/yellow/red)

    %%monitor --summary
    # show table with CPU and memory statistics

    %%monitor --group-by task
    # group by SLURM task instead of node

    %%monitor --label "Training Epoch 1"
    # display with custom label