mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Include kernel logs when downloading logs (#1551)
Instead of writing the kernel logs to the photonvision logs, this will download them in the same zip file as the photonvision logs. Only includes dmesg logs from the current boot, which is fine since we should capture most of them in our logs now.
This commit is contained in:
@@ -424,10 +424,13 @@ public class RequestHandler {
|
||||
ShellExec shell = new ShellExec();
|
||||
var tempPath = Files.createTempFile("photonvision-journalctl", ".txt");
|
||||
var tempPath2 = Files.createTempFile("photonvision-kernelogs", ".txt");
|
||||
// In the command below:
|
||||
// dmesg = output all kernel logs since current boot
|
||||
// cat /var/log/kern.log = output all kernal logs since first boot
|
||||
shell.executeBashCommand(
|
||||
"journalctl -u photonvision.service > "
|
||||
+ tempPath.toAbsolutePath()
|
||||
+ " && journalctl -k > "
|
||||
+ " && dmesg > "
|
||||
+ tempPath2.toAbsolutePath());
|
||||
|
||||
while (!shell.isOutputCompleted()) {
|
||||
|
||||
Reference in New Issue
Block a user