docs: Update Debugging.md with information on logextract

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-01-11 13:46:20 -05:00
parent 5caff594c5
commit f1222565b8
1 changed files with 28 additions and 5 deletions

View File

@ -115,17 +115,20 @@ gtkwave avrsim.vcd
``` ```
Manually sending commands to the micro-controller Manually sending commands to the micro-controller
------------------------------------------------- =================================================
Normally, Klippy would be used to translate gcode commands to Klipper Normally, the host klippy.py process would be used to translate gcode
commands. However, it's also possible to manually send Klipper commands to Klipper micro-controller commands. However, it's also
commands (functions marked with the DECL_COMMAND() macro in the possible to manually send these MCU commands (functions marked with
Klipper source code). To do so, run: the DECL_COMMAND() macro in the Klipper source code). To do so, run:
``` ```
~/klippy-env/bin/python ./klippy/console.py /tmp/pseudoserial 250000 ~/klippy-env/bin/python ./klippy/console.py /tmp/pseudoserial 250000
``` ```
See the "HELP" command within the tool for more information on its
functionality.
Generating load graphs Generating load graphs
====================== ======================
@ -148,3 +151,23 @@ Then graphs can be produced with:
``` ```
One can then view the resulting **loadgraph.png** file. One can then view the resulting **loadgraph.png** file.
Extracting information from the klippy.log file
===============================================
The Klippy log file (/tmp/klippy.log) also contains debugging
information. There is a logextract.py script that may be useful when
analyzing a micro-controller shutdown or similar problem. It is
typically run with something like:
```
mkdir work_directory
cd work_directory
cp /tmp/klippy.log .
~/klipper/scripts/logextract.py ./klippy.log
```
The script will extract the printer config file and will extract MCU
shutdown information. The information dumps from an MCU shutdown (if
present) will be reordered by timestamp to assist in diagnosing cause
and effect scenarios.