Last active
April 20, 2020 03:13
-
-
Save Ending2015a/30ee5a4620bd9e99469b50d35609eb03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://ppt.cc/fgUIKx | |
sudo apt-get install -y git | |
if [ ! -f "dmesg-initcall.pl" ] ; then | |
wget https://raw.githubusercontent.com/tinyclub/tinydraw/master/histogram/examples/linux-boot-graph/dmesg-initcall.pl -O dmesg-initcall.pl | |
fi | |
if [ ! -f "bootgraph.pl" ] ; then | |
wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/bootgraph.pl -O bootgraph.pl | |
fi | |
if [ ! -d "./tinydraw" ] ; then | |
git clone https://github.com/tinyclub/tinydraw.git ./tinydraw | |
fi | |
mkdir -p system-log | |
echo "Gemerating system info" | |
dmesg > system-log/dmesg.log | |
cat system-log/dmesg.log | perl dmesg-initcall.pl > system-log/initcall.log | |
cat system-log/dmesg.log | perl bootgraph.pl > system-log/bootgraph.svg | |
./tinydraw/histogram/histogram.sh system-log/initcall.log > system-log/linux-boot-histogram.svg | |
systemd-analyze plot > system-log/systemd-plot.svg | |
systemd-analyze blame > system-log/systemd-log.txt | |
echo "DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment