🐧 live stats for linux based operating systems in mojo

Hello, been working on this app for a while:
It is an live system overview with :magnifying_glass_tilted_left: variable level of details.

(CPU, RAM, NET, Cooling, Sensors, PID ram & disk I/O)
The app will run on :penguin: linux based OS.

Motivations:

  • Test and improve my work in progress UI framework: ui-terminal-mojo
  • Showcase the ui
  • Create something useful and usable
  • Learn a little about linux based operating systems
  • Have something to show when looking for a job

That is a lot of I,
but the central idea is about creating something useful for you.

How the app look like:

How it works:

The app updates all of theses metrics every second and the values are shown on the ui.
Most of the elements on the screen also have an color that adapt to values,
and the goal is that it makes it easy to get an overview.

To give it a try:

GH Repo


:partying_face: Hope you like it !

Note: i’m not an expert in any of theses things and feedbacks are more than welcome.

10 Likes

Great! What would be really cool is if you can show GPU as well as CPU stats - that could differentiate it from utils like btop.

Thanks for feedback,
Yes, there are many GPU’s and many tools to get the metrics,
so i’ll just add an trait so that people can add their custom pannel :smiley:

Check out last commit:
Add :chart_increasing: for ĆPU and Freq

It adds “value over time” for CPU and FREQ:

If you’d really want this GPU now, you can easily add an field to system_info,
just add some logic in the update_values method to update the field,
there is this run function that can return the value of an bash script for example !

I’ll try to prioritize the extension feature but need thinking !

:new_button: app_progressive :heart_on_fire:
More user-friendly, progressive complexity, “Things shown only when needed”.
This is what the ui framework should be able to to more and better over time.

Ever feel like me not knowing how to learn all thoses useful linux based OS stats ?
That’s exactly why this exist and turns out there is an way to turn complexity into clarity,
and i think i’m starting to understand how and why to do that.

Very pleased, see README.md to get started with the app_progressive version.

Interestingly, there is no need for how-to’s!
I think this is working! Any feedbacks ? :person_bowing:

1 Like

:tada: Add GPU agnostic pannel with customizable metric fetcher (defaults to dummy data).

See Commit

Hi, just added an GPU metric pannel,
and an customizable metric fetcher for it: Dummy_GPU_metric_fetcher.mojo
by default, the fetcher returns dummy data.

See README.md,
it is just an function that has to return an String of formatted CSV data.
(that is all the ui care about)

All needed for an user is to create an shell script (in tmpfs if possible to not do disk i/o) ,
run it in the fetcher to get the return, format the data to the specified CSV format,
and return the String from the fetcher for the ui.

If your gpu have an tool,
maybe it returns JSON or CSV depending on the brand i guess.
Some gpu’s might only have virtual files to read and no tools,
so Path.read_* can be done in mojo for theses.
It should also possible to use an pip for that since mojo have PythonObject.

As explained in the readme and fetcher, it is up to the user to customize the fetcher:

  • get metrics
  • parse metrics if needed
  • hand the metrics to the app in an specific CSV format.

Even remote GPU’s will be supported that way with async later on.

Please don’t PR any solutions that bring external tools,
as good as they are, there are many many GPU’s.
What is needed is an unified metric format.

I hope this GPU pannel will really help people that asked for an GPU metrics pannel in their app.
Did my job so that the app can consume an specific CSV format,
and show the data regardless of what it is or where it comes from.
In fact, i don’t even have, use or need an GPU lol this is for y’all ! :heart_on_fire:

gpu_overview

3 Likes

Things are taking shape!
The ui is able to fetch only the selected columns,
and when needed, only the rows “really” on the screen!

Many new features, an 16 period network-card widget,
controls that appears only when hovering an area,
“advanced” stats available as columns like Swap and ContextSwitch.

Everything got done with the vanilla ui-framework,
it might be more capable that what i thought :partying_face:

To give a try to the app: the repo

1 Like