x2gobroker-loadchecker(8)

✨ NAME ✨

okay bestie, gather round πŸ’– this is x2gobroker-loadchecker β€” the Load checker service for X2Go Session Broker. it's from the x2gobroker-loadchecker(8) manual page, and yes, she serves looks and system load metrics.


🌸 SYNOPSIS 🌸

x2gobroker-loadchecker [ options ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, x2gobroker-loadchecker is a service that collects system load metrics from broker-associated X2Go Servers. she's nosy in the best way πŸ’…

when you wanna do load-balancing, the simplest way to detect "server load" is literally just counting the numbers of running and suspended sessions. no extra daemon, no service, nothing. the server with the least amount of sessions gets picked for starting the next X2Go session. easy peasy πŸ“

but β€” and this is the plot twist 😭 β€” just counting running and suspended sessions per X2Go Server as a representative for the server load can be highly inaccurate. not the vibe.

a better approach is checking each X2Go Server's load in regular intervals by the x2gobroker-loadchecker daemon (running on the broker host) and querying the x2gobroker-loadchecker daemon before selecting the best server on session startup requests. main character energy, honestly πŸ‘‘

the x2gobroker-loadchecker collects server metrics of all associated X2Go Servers and keeps the latest load factors in RAM. once the broker needs load factors of a certain session profile (i.e., of all servers configured in that session profile), the x2gobroker-loadchecker delivers that info immediately. obsessed. ✨

the remembered load factors may not be 100% up-to-date (default: collected within the last five minutes), but the response time of the load checker is much faster than a query to all possible X2Go Servers would be. speed πŸ’¨

the load factor calculation uses this algorithm:

                ( memAvail[MByte]/1000 ) * numCPUs * typeCPUs[MHz]
  load-factor = --------------------------------------------------
                           loadavg*100 * numSessions

the higher the load-factor, the more likely that a server will be chosen for the next to be allocated X2Go session. big number = big chance πŸ”₯

the communication between X2Go Session Broker and the Load Checker Service is handled through a unix domain socket file (<RUNDIR>/x2gobroker/x2gobroker-loadchecker.socket). that's their little group chat 🫢

this command is normally started through the host's init system. not you, bestie. the init system. πŸ’€

πŸŽ€ COMMON OPTIONS πŸŽ€

x2gobroker-loadchecker accepts the following common options:

  • -h, --help β€” Display a help with all available command line options and exit. very demure, very mindful πŸ™ˆ
  • -D, --daemonize β€” Fork this application to background and detach from the running terminal. she's leaving, bye πŸ’…
  • -P, --pidfile β€” Custom PID file location when daemonizing (default: <RUNDIR>/x2gobroker/x2gobroker-loadchecker.pid).
  • -L, --logdir β€” Directory where stdout/stderr will be redirected after having daemonized (default: /var/log/x2gobroker/).
  • -s <LOADCHECKERSOCKET>, --socket <LOADCHECKERSOCKET> β€” File name of the unix domain socket file used for communication between broker and load checker service.
  • -o <OWNER>, --owner <OWNER> β€” User ownership of the <LOADCHECKERSOCKET> file.
  • -g <GROUP>, --group <GROUP> β€” Group ownership of the <LOADCHECKERSOCKET> file.
  • -p <PERMISSIONS>, --permissions <PERMISSIONS> β€” Set these file permissions for the <LOADCHECKERSOCKET> file. Use numerical permissions (e.g. 0640).

🌈 FILES 🌈

  • <RUNDIR>/x2gobroker/x2gobroker-loadchecker.socket

πŸ‘‘ AUTHOR πŸ‘‘

this manual has been written for the X2Go project by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>. iconic behavior, fr fr πŸ’œ


and that's the whole page, bestie!! πŸŽ€ this was Version 0.0.4.x, dated Apr 2020, brought to you by the X2Go Session Broker manual collection. slay, go check your server load πŸ’–βœ¨πŸ¦‹