# \[ANN\] TerminalSystemMonitor.jl: Displays usage of CPU, RAM, and optionally GPU

**URL:** https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678
**Category:** Package Announcements
**Tags:** package, plotting
**Created:** [February 8, 2025, 5:36am UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678 "2025-02-08T05:36:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)
#### Post date: [February 8, 2025, 5:36am UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/1 "2025-02-08T05:36:35Z")

</div>

# Introduction

This Julia package TerminalSystemMonitor.jl displays CPU and RAM usage information on your computer.

It should work on many platforms such as Windows, macOS and Linux (including RaspberryPi 4,5 with 64bit OS)  
If necessary, you can display the usage of GPU resources.

## Installation

```julia
julia> using Pkg; Pkg.add("TerminalSystemMonitor.jl")

```

## Basic usage

```julia-auto
julia> using TerminalSystemMonitor; monitor()

```

This should output like below:

```julia-auto
╭───────────────────────╮╭───────────────────────╮╭───────────────────────╮
│ ┌ ┐││ ┌ ┐││ ┌ ┐│
│id: 0┤■■ 14 ││id: 4┤ 3 ││id: 8┤ 0 │
│id: 1┤■ 13 ││id: 5┤ 3 ││id: 9┤ 0 │
│id: 2┤■ 7.1 ││id: 6┤ 1 ││id: 10┤ 0 │
│id: 3┤■ 6.9 ││id: 7┤ 0 ││id: 11┤ 0 │
│ └ ┘││ └ ┘││ └ ┘│
╰───────────────────────╯╰───────────────────────╯╰───────────────────────╯
╭──────────────────────────────────────────────╮
│ ┌ ┐ │
│Mem: ┤■■■■■■■■■■■■■■■■■■■ 84.985 96.0 GiB│
│ └ ┘ │
│ Load average: 1.46 1.81 2.09 │
│ Uptime: 13 days, 21:30:29

```

If the width of your terminal is small (i.e., `displaysize(stdout)[1]` is small), our package TerminalSystemMonitor.jl  
will try adjust the layout graphs displaying CPU usage:

```julia-auto
╭───────────────────────╮
│ ┌ ┐│
│id: 0┤■■ 22.2 │
│id: 1┤■■ 19 │
│id: 2┤■ 15 │
│id: 3┤■ 10 │
│ └ ┘│
╰───────────────────────╯
╭───────────────────────╮
│ ┌ ┐│
│id: 4┤ 0 │
│id: 5┤ 0 │
│id: 6┤ 0 │
│id: 7┤ 0 │
│ └ ┘│
╰───────────────────────╯
╭───────────────────────╮
│ ┌ ┐│
│id: 8┤■ 8 │
│id: 9┤ 1 │
│id: 10┤ 1 │
│id: 11┤ 0 │
│ └ ┘│
╰───────────────────────╯
╭────────────────────────────────────────────╮
│ ┌ ┐ │
│ │
│Mem: ┤■■■■■■■■■■■■■■■■■■■ 84.826 │
│96.0 GiB │
│ └ ┘ │
│ │
│ Load average: 1.72 1.8 2.06 │
│ Uptime: 13 days, 21:31:54 │

```

## Monitoring GPU usage

The TerminalSystemMonitor.jl uses Package Extensions feature. See

[https://www.youtube.com/watch?v=TiIZlQhFzyk](https://www.youtube.com/watch?v=TiIZlQhFzyk) to learn more.

We need to load some auxiliary packages before calling `TerminalSystemMonitor.monitor`.

### NVIDIA GPU

If your computer has several NVIDIA’s GPU, try the following Julia command:

```julia
julia> using CUDA; using TerminalSystemMonitor; monitor()

```

 ![img](https://global.discourse-cdn.com/julialang/original/3X/a/c/ac019ad702b7315937e1a8281903590e307013a9.png)

### Mac computers with Apple silicon

If your computer is a Apple M-series device, so called computers with Apple silicon, try the following Julia command:

```julia
julia> using MacOSIOReport; using TerminalSystemMonitor; monitor()

```

 ![](https://global.discourse-cdn.com/julialang/original/3X/4/d/4db1d4c32f8df5ec5fa18f22d1d91354b74b5b1a.png)

The MacOSIOReport.jl can be found at [GitHub - AtelierArith/MacOSIOReport.jl: Porting macmon project to Julia using ObjectiveC.jl](https://github.com/AtelierArith/MacOSIOReport.jl). I ported the [vladkens/macmon](https://github.com/vladkens/macmon) project to Julia for TerminalSystemMonitor. I hope you like this package.

百聞は一見に如かず(Seeing is believing.) Give it try!

---

<div class="post-metadata">

### Author: ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)
#### Post date: [February 13, 2025, 3:27pm UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/2 "2025-02-13T15:27:51Z")

</div>

Awesome! Really cool to see a seemless way to monitur both CPU, RAM and GPU all from within a Julia process ❤

---

<div class="post-metadata">

### Author: ![Krastanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krastanov/32/6817_2.png) [@Krastanov](https://discourse.julialang.org/u/Krastanov)
#### Post date: [March 3, 2025, 3:42pm UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/3 "2025-03-03T15:42:08Z")

</div>

Have you looked in the new “app packaging” capabilities that Pkg provides? You can now ship applications, not just libraries with Pkg. It would be interesting to have this available in that manner.

---

<div class="post-metadata">

### Author: ![g-gundam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/g-gundam/32/47593_2.png) [@g-gundam](https://discourse.julialang.org/u/g-gundam)
#### Post date: [March 4, 2025, 9:46pm UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/4 "2025-03-04T21:46:52Z")

</div>

> [@Krastanov](#):
>
> Have you looked in the new “app packaging” capabilities that Pkg provides?

I’m curious about this, but I’m not sure where in the [docs for Pkg.jl](https://pkgdocs.julialang.org/v1/) it might be. Do you have a link to some docs for this feature?

---

<div class="post-metadata">

### Author: ![Krastanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krastanov/32/6817_2.png) [@Krastanov](https://discourse.julialang.org/u/Krastanov)
#### Post date: [March 4, 2025, 10:01pm UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/5 "2025-03-04T22:01:07Z")

</div>

It will be out in 1.12, it is in the dev version of the docs: [?. Apps · Pkg.jl](https://pkgdocs.julialang.org/dev/apps/#Creating-a-Julia-app)

---

<div class="post-metadata">

### Author: ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)
#### Post date: [March 5, 2025, 12:17am UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/6 "2025-03-05T00:17:54Z")

</div>

nice! i would suggest orienting the CPU bars vertically, instead of having three separate plots you could then just have one that spans the entire width.

---

<div class="post-metadata">

### Author: ![karei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karei/32/214809_2.png) [@karei](https://discourse.julialang.org/u/karei)
#### Post date: [March 5, 2025, 3:48am UTC](https://discourse.julialang.org/t/ann-terminalsystemmonitor-jl-displays-usage-of-cpu-ram-and-optionally-gpu/125678/7 "2025-03-05T03:48:18Z")

</div>

This package is very useful in terms of functionality, but there are some problems with the display. I guess you’re probably using the clear screen command every second, and the actual display screen of the derivative keeps flickering (vscode+julia REPL).

I’ve seen a better way to do this, which is to just move the cursor to the specified position and overwrite the output, as shown in [Term.jl/src/progress.jl at master · FedeClaudi/Term.jl · GitHub](https://github.com/FedeClaudi/Term.jl/blob/master/src/progress.jl).

The package’s idea of implementing progress bars is also suitable for your system monitor:

> Progress bars displays are updated in the background while your code executes. This is done by having the display rendering code run on a separate thread.
