engineyard / ey-cookbooks-stable-v7

Other
6 stars 5 forks source link

Make status of Puma workers more readable by humans #220

Open dvalfre opened 1 year ago

dvalfre commented 1 year ago

In order to get the status of the Puma workers, we can run /engineyard/bin/app_<app_name> status. This produces a status result and a bunch of unformatted json with details.

While that output is fine for system utilities, it's not so human friendly. Let's help ourselves by extending the control script with something like

status-pretty() {
    cd ${current_path}
    pumactl -S /var/run/engineyard/<%= @app_name %>/puma_<%= @app_name %>.state stats
}

or by passing a second argument to the script (like --pretty) and parse it as the ey-puma_legacy recipe does for port settings

Until then, the following command show a pretty print of the status of the Puma workers: /engineyard/bin/app_<app_name> status | tail -1 | json_pp.