With this release, we are introducing some quality of life changes for both livefpm CLI and botstopper.

Better livefpm

The livefpm command shows you the currently running requests that are being processed by PHP-FPM. This command is actually a bash alias and it basically runs hypernode-fpm-status every 0.2 seconds using the watch command. This alias served us well for about 10 years, but this release we’re upgrading it to be more user-friendly and efficient.

Over the past weeks we have added a new --watch option to the hypernode-fpm-status command, which basically does the same as the old livefpm alias. The main benefit to this is that it only has to bootstrap things once, then every refresh just means to fetch the current data and plot that to the screen.

By only bootstrapping things once, the live view becomes much more responsive:

  • Loading/initializing Python modules takes 100-150 milliseconds
  • On cluster loadbalancer servers, every app server needs an SSH connection, taking 100-500 milliseconds each

The bootstrap now takes care of both things: loading the Python modules and (optionally) setting up SSH connections. Combined, this makes the livefpm command much more responsive and real-time.

After testing the watch mode extensively, we have changed the livefpm alias to run hypernode-fpm-status --watch instead.

Botstopper utilities

When analyzing Botstopper behavior on your Hypernode, you want to dig through the logs. Botstopper logs to a logfile using JSONL format, so every line in that log is a valid JSON object. Initially you could dig through these log files with a command like:
jq . /var/log/botstopper/botstopper.log or as a live view: tail -f /var/log/botstopper.log | jq ..
This approach worked, but it wasn’t very user-friendly to get meaningful insights.

Introducing a new command: hypernode-parse-botstopper-log. This command does all the parsing, formatting and filtering for you. You only need to supply the right command options! We have accompanied this command with useful bash aliases:

  • alias pbl='hypernode-parse-botstopper-log': shorthand command for the botstopper log parser command
  • alias tbl='tail -f /var/log/botstopper/botstopper.log': outputs the raw log entries as they come in
  • alias livebotstopper='tbl|pbl': shows you the formatted log entries as they come in

Go read about this command in our documentation!