XFCE GENMON FUN
Welcome, Guest.
“Theory and practice sometimes clash. And when that happens, theory loses. Every single time.” ― Linus Torvalds

Author Topic: XFCE GENMON FUN  (Read 1690 times)

Offline CwF

  • Elite Member
  • *****
  • Posts: 421
XFCE GENMON FUN
« on: January 13, 2020, 01:18:55 PM »
While I enjoy a large pretty cpu graph, it's a little obnoxious once its larger than an EQ display. I thought for awhile on the info I really wanted to know from my beast and reduced it, boiled it down to almost nothing.

Add a genmon to an xfce panel and point it to your newly created /usr/bin/uptime.sh


Code: [Select]
#!/bin/bash
echo "<txt>"$(VAR="$(cat /proc/loadavg)"
OAL=${VAR%%.*}
FIL=$(cat /proc/loadavg | cut -d '.' -f 2)
PRC=$(cat /proc/loadavg | cut -d ' ' -f 4)
echo "$OAL$FIL $PRC")"</txt>"
echo "<tool>"$(uptime -p)"</tool>"

Anyway, that's how I like it.Condensed!
first number is the last minutes load average, 1.00=1 core of work.
second number is the last five minutes of load average in whole cores.
then the last set are executing threads/might want to execute threads.

Now on the uptime mouse hover display, I'd like to maybe ask the author of uptime to add months to break up the weeks, and looking ahead add a year field too. Then maybe drop the "up" and append "ago, you booted this computer" and it could go across the screen like a story.

"1 year, 3 months, 2 weeks, 5 days, 16 hours, 18 minutes ago, you booted this computer"

I suppose we could add "and 32 seconds" to try and get it all the way across the screen...

Offline Crimson

  • Contributor
  • *******
  • Posts: 571
  • Defeating a sandwich only makes it tastier.
    • «FC» FunHouse Clan
Re: XFCE GENMON FUN
« Reply #1 on: January 18, 2020, 10:35:49 AM »
Geeze, let's see Windows stay on that long. My friends server can't stay on for longer than a week because of those beloved forced updates. Rejoice my fellow penguins!
Custom Linux PC Intel® Core™ i7-4790K Radeon™ RX 5700 XT 16GB DDR3 256GB M.2 NVMe 5.5TB Storage

Offline CwF

  • Elite Member
  • *****
  • Posts: 421
Re: XFCE GENMON FUN
« Reply #2 on: January 18, 2020, 11:13:58 AM »
Does anybody find these numbers useful? They may be of more interest on systems like mine running a hypervisor instead of a single user system. I'm interested mostly in the process counts.

My example was a wishful example I do expect to see. Some may scoff at the hypersior/vm model at being more reliable with all the complexity, but no it's seriously more stable. VM's have issues all the time, part of their purpose, and are rebooted and forced off on a regular basis. The host just keeps on humming. I usually do a courtesy reboot on the host every so often for something.

A real one in traditional output still pretty impressive:

Code: [Select]
$  uptime
 09:06:47 up 85 days, 18:11,  3 users,  load average: 1.20, 1.07, 1.11


I do see core loads up to mid 20's on occasion...
Honestly, a XP VM often makes it the full span of host life, since with all it does it is also the systems intranet samba server and a common drive is a pae memory ram drive.

Offline Spatry

  • Benevolent Dictator
  • Administrator - Sysop
  • **********
  • Posts: 5602
  • Cup of Linux Founder
    • Cup of Linux
Re: XFCE GENMON FUN
« Reply #3 on: January 20, 2020, 10:34:23 AM »
Yup... My Opensimulator server can boast equivalent up-times although I will admit that I restart the server software daily from within a tmux instance. Got to love the longevity and reliability of Linux!
Windows assumes the user is an idiot... Linux DEMANDS Proof!

Offline misko_2083

  • Newbie
  • **
  • Posts: 12
Re: XFCE GENMON FUN
« Reply #4 on: March 15, 2020, 10:58:00 AM »

Anyway, that's how I like it.Condensed!
CwF The script is not condensed enough. ;)

This will do:

Code: [Select]
#!/bin/bash
IFS=" " read a b c d e </proc/loadavg
echo "<txt>${a%.*}${a#*.} ${b%.*} ${d}</txt>"
echo "<tool>"$(uptime -p)"</tool>"


« Last Edit: March 16, 2020, 07:42:12 AM by Spatry »

Offline CwF

  • Elite Member
  • *****
  • Posts: 421
Re: XFCE GENMON FUN
« Reply #5 on: March 16, 2020, 09:32:33 AM »
This will do:

Very good, I should have said "verbose simplex" for my expanded code.

It's the display of info that is condensed, as opposed to an equalizer like cpu usage display... I do have one like that, with an on/off button. Unfortunately off isn't off, just hidden.

Actually, genmon is doing more for me now, not sure why I didn't notice it sooner. More control than widgets and things, temps, fans, weather, etc. Might experiment with using it for radio tuners, if that is bashible. So I'll post easy to follow expanded code, and you can condense it for me!

Offline misko_2083

  • Newbie
  • **
  • Posts: 12
Re: XFCE GENMON FUN
« Reply #6 on: March 16, 2020, 12:41:29 PM »
I use genmon only for audacious.

 https://i.imgur.com/IlxCHX5.mp4

Adapted ohnonot's script that was written for tint2.
The TINT2 plugin, Executor, is much more powerful than genmon.

 https://notabug.org/ohnonot/media-player-info/src/master/mpi-panel