Skip to content

Instantly share code, notes, and snippets.

@jeremyje
Created September 6, 2014 20:09
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 jeremyje/b10b0e91e631a82c5f00 to your computer and use it in GitHub Desktop.
Save jeremyje/b10b0e91e631a82c5f00 to your computer and use it in GitHub Desktop.
Startup script for systemd based OSes to profile startup performance.
#!/bin/bash
ID=${RANDOM}
export CLOUDSDK_PYTHON=/usr/bin/python2
systemd-analyze plot > plot.svg
systemd-analyze blame > systemd-analyze-blame.txt
systemd-analyze critical-chain > systemd-analyze-critical-chain.txt
gsutil cp *.txt gs://jeremyje/systemd-debug-${ID}/
gsutil cp *.svg gs://jeremyje/systemd-debug-${ID}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment