Capturing kernel error/stack trace after running a command in bash

Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm trying to capture what looks like a kernel error/stack trace when I run the command sudo zpool import. There error starts with:
[104.877657] BUG: unable to handle kernel paging request at 00000000ffff4167
...
I've tried simply redirecting stderr to a file with sudo zpool import &> err_file but that doesn't seem to capture it (I'm using bash) - the error still prints to the screen.
How can I grab the entire error message?
bash kernel
add a comment |Â
up vote
2
down vote
favorite
I'm trying to capture what looks like a kernel error/stack trace when I run the command sudo zpool import. There error starts with:
[104.877657] BUG: unable to handle kernel paging request at 00000000ffff4167
...
I've tried simply redirecting stderr to a file with sudo zpool import &> err_file but that doesn't seem to capture it (I'm using bash) - the error still prints to the screen.
How can I grab the entire error message?
bash kernel
You will most probably need to redirect the error to the file as at the moment, it is redirecting to screen and so use "sudo zpool import 2> err_file"
â Raman Sailopal
Feb 1 at 12:10
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm trying to capture what looks like a kernel error/stack trace when I run the command sudo zpool import. There error starts with:
[104.877657] BUG: unable to handle kernel paging request at 00000000ffff4167
...
I've tried simply redirecting stderr to a file with sudo zpool import &> err_file but that doesn't seem to capture it (I'm using bash) - the error still prints to the screen.
How can I grab the entire error message?
bash kernel
I'm trying to capture what looks like a kernel error/stack trace when I run the command sudo zpool import. There error starts with:
[104.877657] BUG: unable to handle kernel paging request at 00000000ffff4167
...
I've tried simply redirecting stderr to a file with sudo zpool import &> err_file but that doesn't seem to capture it (I'm using bash) - the error still prints to the screen.
How can I grab the entire error message?
bash kernel
asked Feb 1 at 11:47
Timmy O'Mahony
1134
1134
You will most probably need to redirect the error to the file as at the moment, it is redirecting to screen and so use "sudo zpool import 2> err_file"
â Raman Sailopal
Feb 1 at 12:10
add a comment |Â
You will most probably need to redirect the error to the file as at the moment, it is redirecting to screen and so use "sudo zpool import 2> err_file"
â Raman Sailopal
Feb 1 at 12:10
You will most probably need to redirect the error to the file as at the moment, it is redirecting to screen and so use "sudo zpool import 2> err_file"
â Raman Sailopal
Feb 1 at 12:10
You will most probably need to redirect the error to the file as at the moment, it is redirecting to screen and so use "sudo zpool import 2> err_file"
â Raman Sailopal
Feb 1 at 12:10
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
The error message isn't being written to the console by the zpool command. The kernel is writing the message. It's most likely being written to the console via syslog/rsyslog.
You might be able to find the error message by running dmesg which will print the kernel messages. dmesg > err_file
Ah that shows it. Great! I actually forgot to mention I checkedtail -f /var/log/dmesgbut didn't see it in there. Why is it showing up when I run the commanddmesginstead of in the log files?
â Timmy O'Mahony
Feb 1 at 12:14
1
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
The error message isn't being written to the console by the zpool command. The kernel is writing the message. It's most likely being written to the console via syslog/rsyslog.
You might be able to find the error message by running dmesg which will print the kernel messages. dmesg > err_file
Ah that shows it. Great! I actually forgot to mention I checkedtail -f /var/log/dmesgbut didn't see it in there. Why is it showing up when I run the commanddmesginstead of in the log files?
â Timmy O'Mahony
Feb 1 at 12:14
1
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
add a comment |Â
up vote
2
down vote
accepted
The error message isn't being written to the console by the zpool command. The kernel is writing the message. It's most likely being written to the console via syslog/rsyslog.
You might be able to find the error message by running dmesg which will print the kernel messages. dmesg > err_file
Ah that shows it. Great! I actually forgot to mention I checkedtail -f /var/log/dmesgbut didn't see it in there. Why is it showing up when I run the commanddmesginstead of in the log files?
â Timmy O'Mahony
Feb 1 at 12:14
1
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
The error message isn't being written to the console by the zpool command. The kernel is writing the message. It's most likely being written to the console via syslog/rsyslog.
You might be able to find the error message by running dmesg which will print the kernel messages. dmesg > err_file
The error message isn't being written to the console by the zpool command. The kernel is writing the message. It's most likely being written to the console via syslog/rsyslog.
You might be able to find the error message by running dmesg which will print the kernel messages. dmesg > err_file
answered Feb 1 at 12:02
sapensadler
48016
48016
Ah that shows it. Great! I actually forgot to mention I checkedtail -f /var/log/dmesgbut didn't see it in there. Why is it showing up when I run the commanddmesginstead of in the log files?
â Timmy O'Mahony
Feb 1 at 12:14
1
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
add a comment |Â
Ah that shows it. Great! I actually forgot to mention I checkedtail -f /var/log/dmesgbut didn't see it in there. Why is it showing up when I run the commanddmesginstead of in the log files?
â Timmy O'Mahony
Feb 1 at 12:14
1
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
Ah that shows it. Great! I actually forgot to mention I checked
tail -f /var/log/dmesg but didn't see it in there. Why is it showing up when I run the command dmesg instead of in the log files?â Timmy O'Mahony
Feb 1 at 12:14
Ah that shows it. Great! I actually forgot to mention I checked
tail -f /var/log/dmesg but didn't see it in there. Why is it showing up when I run the command dmesg instead of in the log files?â Timmy O'Mahony
Feb 1 at 12:14
1
1
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
OK, answering my own question: unix.stackexchange.com/questions/191560/â¦
â Timmy O'Mahony
Feb 1 at 12:15
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421185%2fcapturing-kernel-error-stack-trace-after-running-a-command-in-bash%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You will most probably need to redirect the error to the file as at the moment, it is redirecting to screen and so use "sudo zpool import 2> err_file"
â Raman Sailopal
Feb 1 at 12:10