Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@JuanjoSalvador
Created January 3, 2020 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JuanjoSalvador/7c2f7209f33ca0b59f515da74b61c97c to your computer and use it in GitHub Desktop.
Save JuanjoSalvador/7c2f7209f33ca0b59f515da74b61c97c to your computer and use it in GitHub Desktop.
Script that checks your Mastodon instance's process memory usage
#!/bin/bash
systemd-cgtop | grep mastodon* | awk 'BEGIN { printf "%-28s %s", "SERVICE", "MEMORY USAGE\n";
printf "%-28s %s", "-------", "------------\n" }
{ printf "%-30s %10s\n", substr($1, 15), $4 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment