Issue
How to configure kdump to save vmcore on a remote server via SSH.
Environment
- CloudLinux
Solution
To do so, follow the next steps:
1. Prepare RSA key pair for kdump
# cp /root/.ssh/id_rsa /root/.ssh/kdump_id_rsa
Then add the public RSA key to your dump machine where the dump will be stored and test the connectivity with SSH.
2. Configure kdump. Update your /etc/kdump.conf so it looks like this
sshkey /root/.ssh/kdump_id_rsa
ssh root@<ip(domain)_of_the_dump_machine>
core_collector makedumpfile -F -l --message-level 1 -d 31
force_rebuild 1
Other parameters should be commented on.
Update /etc/sysconfig/kdump
with MKDUMPRD_ARGS="--builtin=libafs"
3. Restart kdump
# systemctl restart kdump
Then you can delete force_rebuild 1
from the /etc/kdump.conf
.
4. Test, if possible
If you have some test environment, it'd be great to test if all works as expected by crashing the test machine with:
echo c > /proc/sysrq-trigger
Secondly, we would like to ask the client to turn on debug logs in one of the affected servers:
sysctl kernel.printk=7
After all steps above are applied, we should wait for the issue to occur and see if we get a dump/debug logs.
Comments
0 comments
Please sign in to leave a comment.