Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Monitoring system metrics

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
adamk0001
Posts: 16
Joined: 2012-09-19 18:53

Monitoring system metrics

#1 Post by adamk0001 »

Hi, I have a set of terminals that I regularly start in xfce each time I log in to assist with system monitoring. I run megaclisas-status (requires root/sudo), sensors, free, htop, and iwconfig (requires root/sudo) as arguments to the "watch" tool. See sanitized screenshot for visual:
Image

I have thought about ways to make this easier & faster (e.g. with "screen"), but haven't had much success - screen can split a single terminal but not with uneven partitions, unless I missed something in the documentation.

I've also looked at some pre-built monitoring dashboards, but I haven't found something lightweight that also supports each metric. Most don't support megaclisas-status or iwconfig.

Is there a way to use the session function of xfce to recreate this terminal setup each time I login? or maybe I could use a bash script that could launch the terminals in the appropriate locations/sizes and run the commands?

I am open to any other suggestions as well...

Thank you for your help!!
The feeling of helplessness that accompanies the use of Non-Free Software after learning and understanding the virtues brought forth through Free Software is not something any person can or should abide by (https://www.fsf.org/about/what-is-free-software)

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Monitoring system metrics

#2 Post by sunrat »

Would Glances do what you want? It's in Debian repos.
https://github.com/nicolargo/glances

Or you can multiplex terminals with tmux - https://github.com/tmux/tmux/wiki also in Debian repos.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Monitoring system metrics

#3 Post by Dai_trying »

I think Terminator will do what you want, it can use config files to run a specific setup, ie with split windows and different commands running in each one. Once installed you can search the man page for usage and right click the terminal for preferences and splitting options.

adamk0001
Posts: 16
Joined: 2012-09-19 18:53

Re: Monitoring system metrics

#4 Post by adamk0001 »

Thanks for all the suggestions!

I think either tmux or Terminator would work. Initially, I had dismissed Terminator because it seems GNOME specific, while I run xfce. I looked into it more and only needed ~500k of packages + 3MB for installation, so it sure is lightweight. A little annoying to configure, but works really well once all set up:
https://imgur.com/a/sWR4UUW

I looked at Glances as well. It is a big footprint for what I require, considering all the monitoring tools already exist on my system.

My Terminator config file contents is below (taken from ~/.config/terminator/config). You can set up a launcher to run "terminator -l Monitoring" to automatically start the Monitoring layout.

A few notes:
1. I removed the UUID for each of my terminals. I am not sure if that foobars the portability of the config file. I hope Terminator will simply assign new UUID's if someone tries to stand this up on their own system.
2. I removed the interface name from the iwconfig command. You can insert your own or it will simply display all network interfaces, but it doesn't make sense to do that if you have any network interfaces without wireless extensions.
3. I have it configured to run "su - -c <command>" but it can be easily changed to sudo syntax.
4. The window size is based on a 1920x1200 resolution

Code: Select all

[global_config]
  window_state = maximise
  borderless = True
  extra_styling = False
  title_hide_sizetext = True
  title_transmit_fg_color = "#555753"
  title_transmit_bg_color = "#000000"
  title_receive_fg_color = "#555753"
  title_receive_bg_color = "#000000"
  title_inactive_fg_color = "#555753"
  title_inactive_bg_color = "#000000"
  inactive_color_offset = 1.0
  enabled_plugins = ,
  suppress_multiple_term_dialog = True
[keybindings]
[profiles]
  [[default]]
    cursor_color = "#aaaaaa"
    foreground_color = "#00b301"
    exit_action = hold
    custom_command = 'echo \"foo#bar\"'
  [[htop]]
    cursor_blink = False
    cursor_color = "#aaaaaa"
    foreground_color = "#00b301"
    scrollbar_position = hidden
    exit_action = restart
    use_custom_command = True
    custom_command = htop
  [[free]]
    cursor_blink = False
    cursor_color = "#aaaaaa"
    foreground_color = "#00b301"
    scrollbar_position = hidden
    exit_action = restart
    use_custom_command = True
    custom_command = watch -n 240 free -h
  [[megaclisas]]
    cursor_blink = False
    cursor_color = "#aaaaaa"
    foreground_color = "#00b301"
    scrollbar_position = hidden
    exit_action = restart
    use_custom_command = True
    custom_command = 'su - root -c "watch -n 240 megaclisas-status"'
  [[iwconfig]]
    cursor_blink = False
    cursor_color = "#aaaaaa"
    foreground_color = "#00b301"
    scrollbar_position = hidden
    exit_action = restart
    use_custom_command = True
    custom_command = 'su - root -c "watch -n 120 iwconfig"'
  [[sensors]]
    cursor_blink = False
    cursor_color = "#aaaaaa"
    foreground_color = "#00b301"
    scrollbar_position = hidden
    exit_action = restart
    use_custom_command = True
    custom_command = watch -n 240 sensors
[layouts]
  [[default]]
    [[[window0]]]
      type = Window
      parent = ""
    [[[child1]]]
      type = Terminal
      parent = window0
      profile = default
  [[Monitoring]]
    [[[child0]]]
      type = Window
      parent = ""
      order = 0
      position = 0:29
      maximised = True
      fullscreen = True
      size = 1920, 1171
      title = Monitoring
      last_active_window = True
    [[[child1]]]
      type = VPaned
      parent = child0
      order = 0
      position = 484
      ratio = 0.41509433962264153
    [[[child2]]]
      type = HPaned
      parent = child1
      order = 0
      position = 1179
      ratio = 0.6156657963446475
    [[[terminal3]]]
      type = Terminal
      parent = child2
      order = 0
      title = megacli sas
      profile = megaclisas
    [[[child4]]]
      type = VPaned
      parent = child2
      order = 1
      position = 182
      ratio = 0.37995824634655534
    [[[terminal5]]]
      type = Terminal
      parent = child4
      order = 0
      profile = free
      title = memory
    [[[terminal6]]]
      type = Terminal
      parent = child4
      order = 1
      profile = iwconfig
      title = network
    [[[child7]]]
      type = HPaned
      parent = child1
      order = 1
      position = 589
      ratio = 0.30757180156657965
    [[[terminal8]]]
      type = Terminal
      parent = child7
      order = 0
      profile = sensors
      title = sensors
    [[[terminal9]]]
      type = Terminal
      parent = child7
      order = 1
      profile = htop
      title = htop
[plugins]

The feeling of helplessness that accompanies the use of Non-Free Software after learning and understanding the virtues brought forth through Free Software is not something any person can or should abide by (https://www.fsf.org/about/what-is-free-software)

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Monitoring system metrics

#5 Post by Dai_trying »

Looks like you got it covered :) Terminator is usually one of the first packages I install on a new system, I find it to be really useful.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Monitoring system metrics

#6 Post by stevepusser »

Couldn't Conky show that information also?
MX Linux packager and developer

adamk0001
Posts: 16
Joined: 2012-09-19 18:53

Re: Monitoring system metrics

#7 Post by adamk0001 »

Thanks for the additional suggestion. I checked Conky out. It looks like Conky uses cairo (https://packages.debian.org/sid/conky-all) - you wouldn't have any way of knowing, but I don't have a fancy desktop compositor and don't plan to start using one. I just have xfce4's window manager, with compositing disabled. It's nice and fast, as I don't need eye candy. I didn't think that was relevant information to my original post, but I'm learning every day :)

It seems that I'd need to create a custom lua "widget" (or whatever conky calls them) for megaclisas, which doesn't make sense to me since I already have the program which spits everything needed to the terminal.

Thanks again for the suggestion. I'm going to stick with the Terminator approach for now.
The feeling of helplessness that accompanies the use of Non-Free Software after learning and understanding the virtues brought forth through Free Software is not something any person can or should abide by (https://www.fsf.org/about/what-is-free-software)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Monitoring system metrics

#8 Post by stevepusser »

Conky doesn't need compositing, and can even show pdeudo transparency on the xfce desktop with it disabled, (as in the MX 18.3 Live session) but I'm pretty sure a simple script can also create an megaclisas output that Conky can display, though I'm not a Conky guru.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Monitoring system metrics

#9 Post by Head_on_a_Stick »

Put it all on a console screen with dvtm so it's always available without taking up any desktop space.
deadbang

Post Reply