The application you are about to work on is a [**Desktop System Monitor**](https://en.wikipedia.org/wiki/System_monitor). The app will monitor the computers system resources and performance, such as CPU, RAM, SWAP, Fan, Network and more.
For the GUI you will use the [_Dear ImGui_](https://github.com/ocornut/imgui/wiki#about-the-imgui-paradigm) library for C++.
### Instructions
#### **Dear ImGui**
As stated above the GUI you are going to use is _Dear ImGui_ there are somethings you should know about this library/API.
The first important point to be aware is that ImGui is an **immediate mode graphic user interface**, as the name clearly says "ImGui".
For better understanding there are two types of UIs, **retained mode** and **immediate mode**.
- **Immediate mode**: application state is separated from the graphics library. It’s the application responsibility for drawing commands when necessary. In other words, in immediate mode the client calls directly cause rendering of graphics objects to the display.
- **Retained mode**: the client calls do not directly cause actual rendering, but instead updates an abstract internal model, which is maintained within the library's data space. You can see more about this mode [here](https://en.wikipedia.org/wiki/Retained_mode).
The file system provided, [here](https://assets.01-edu.org/system-monitor/system-monitor.zip), will contain all the ImGui IPA, you can better understand the fs referring to what is listed below.
To monitor the computers system resources and performance you will have to use the `/proc` filesystem.
The `/proc` filesystem is a virtual system that does not exist on disk, this system is created by the kernel when the system boots, and destroyed by it
when the system shuts down.
This filesystem contains information about the system, from the CPU, to memory, to active processes and much more. For this reason it can be regarded as
a control and information centre for the kernel. As a matter of fact, allot of the system utilities are simple calls to files in this directory.
You can acquire more knowledge about this filesystem by taking a look to the `proc` manuel page (`man proc`).
---
#### **Monitorization**
For this project you must present the following monitorization:
- **System monitor**, that will contain :
- The type of OS (Operating System).
- The user logged into the computer.
- The computer name, this being the **hostname**.
- The total number of tasks/processes that are currently running, sleeping, uninterrruptible, zombie, traced/stopped or interrupted.
- Type of CPU
- A tabbed section containing `CPU`, `Power`, `Fan` and `Thermal` information, this information include a performance graphic for all those topics.
This graph should contain some kind of checkbox or button to be able to stop the animation whenever the user desires to do so, and two slider bars.
The first slider bar should be able to control the `FPS` of the graph, and the second slide bar should control the `y` scale of the graph.
-`CPU` should present this graph with a overlay text saying the current percentage of the CPU.
-`Fan`, should include the following information, the status of the fan, (enable/active), the current speed and the level. And should also present the graph stated above.
- A text box that lets the user filter the table. Users must be able to select multiple rows of the table.
example :
![image](mem.gif)
- **Network**, that will contain :
- The network ipv4, (`lo`, `wlp5s0` and other networks that the computer may have).
- A tab bar that should contain two tables :
-`RX` (network receiver) containing the following data : bytes, packets, errs, drop, fifo, frame, compressed and multicast.
-`TX` (network transmitter) containing the following data : bytes, packets, errs, drop, fifo, colls, carrier and compressed.
- It should also contain a tabbed section for both `RX` and `TX`, those sections should display a visual usage (ex: progress bar), of all network present on the computer. This visual display should obey the following rules:
- Each network should be converted from **bytes** to **GB**, **KB** or **MB** depending on the value. It should not display values that