Commit Graph

8 Commits

Author SHA1 Message Date
Maciej Borzecki
840ce01e92 debug-tools: trivial script to process startup timings
The script parses startup logs obtained with SNAPD_DEBUG=1, extracts relevant
messages and presents an overview of the timings, which looks like so:

0.026017s       start -> snap to snap-confine
0.003458s       snap to snap-confine -> snap-confine enter
0.000892s       snap-confine enter -> snap-confine mount namespace start
0.106204s       snap-confine mount namespace start -> snap-confine mount namespace finish
0.001186s       snap-confine mount namespace finish -> snap-confine to snap-exec
0.002771s       snap-confine to snap-exec -> snap-exec to app
approx. total: 0.140528s

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-05-16 12:20:42 +02:00
Maciej Borzecki
e2c397b96e debug-tools: list all snaps
List all snaps, including the inactive ones.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-05-12 10:29:35 +02:00
Paweł Stołowski
5386d7f4be snap-debug-info: Print validation sets and validation set assertions. 2022-04-15 14:10:39 +02:00
Alberto Mardegan
5fa8b5dc05 debug-tools: cleanup files on termination 2022-03-31 14:39:07 +03:00
Alberto Mardegan
aa4515185a debug-tools: add comments to explain the hard passages 2022-03-28 09:55:26 +03:00
Ian Johnson
f20e1bd8fa debug-tools: add script to help debugging GCE instances which fail to boot
When debugging GCE spread runs where the VM fails to boot properly, you need to
look at the serial console, however doing so with the gcloud command line tool
is a bit finnicky.

This is a bash script which essentially will collect and follow all of the
output on the serial console from a GCE instance.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2022-03-25 16:28:06 -05:00
Ian Johnson
ff0b95f3bd debug-tools/snap-debug-info.sh: print message if no gadget snap found
This was supposedly pushed to #11546 but somehow that PR got merged without the
commit in it, so re-submit the patch again :-)

This would otherwise fail with trying to print off the contents of
/snap//current/meta/gadget.yaml which does not exist.

Thanks to Alberto for the suggestion.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2022-03-23 08:46:29 -05:00
Ian Johnson
2c87a6bcbe debug-tools/snap-debug-info.sh: add debug script
This is the first iteration of the debug script for debugging customer issues,
with a collection of easily gathered and commonly requested information that is
helpful in debugging issues on Ubuntu Core.

Eventually this will become a snap command and a REST API endpoint, but for now
a script will have to do.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2022-03-22 10:41:02 -05:00