跳转到内容
Ask AI

Kdump

此内容尚不支持你的语言。

This chapter provides examples on how to use Netconf to manage Kdump-tools configurations on AsterNOS devices.

Request example to modify Kdump-tools configurations via edit-config.

<config>
<top>
<kdump>
<enabled>true</enabled>
<memory>0M-2G:256M,2G-4G:512M,4G-8G:618M,8G-:800M</memory>
<num_dumps>3</num_dumps>
</kdump>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db">
<ok/>
</rpc-reply>

Request example to retrieve Kdump-tools configurations via get-config with subtree filter.

<filter type="subtree">
<top>
<kdump/>
</top>
</filter>

Response example

<data>
<top>
<kdump xmlns="http://asterfusion.com/ns/yang/asternos-kdump">
<enabled>true</enabled>
<memory>0M-2G:256M,2G-4G:512M,4G-8G:618M,8G-:800M</memory>
<num_dumps>3</num_dumps>
</kdump>
</top>
</data>

Show kernel core dump and dmesg files. Request example to get dump files of Kdump-tools via rpc show-kdump-files

<show-kdump-files/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2c0ad596-f0f7-475c-9dd0-de1f17dcfc0a">
<data xmlns="http://asterfusion.com/ns/yang/asternos-kdump">
Kernel core dump files Kernel dmesg files
------------------------------------------ ------------------------------------------
/var/crash/202506261458/kdump.202506261458 /var/crash/202506261458/dmesg.202506261458
</data>
</rpc-reply>

Request example to get logs of Kdump-tools via rpc show-kdump-logging

<show-kdump-logging/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:eaaaaeb0-637b-4b70-ab8a-2f01f68014cf">
<data xmlns="http://asterfusion.com/ns/yang/asternos-kdump">
[ 409.482325] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 409.487406] RIP: 0033:0x7fafbff34340
[ 409.491004] Code: 40 00 48 8b 15 c1 aa 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d a1 32 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89
[ 409.509857] RSP: 002b:00007ffe2d74d308 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 409.517467] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fafbff34340
[ 409.524637] RDX: 0000000000000002 RSI: 000055a76e5a59a0 RDI: 0000000000000001
[ 409.531807] RBP: 000055a76e5a59a0 R08: 0000000000000007 R09: 0000000000000073
[ 409.538986] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000002
[ 409.546163] R13: 00007fafc0010760 R14: 0000000000000002 R15: 00007fafc000b9e0
[ 409.553339] </TASK>
</data>
</rpc-reply>

Request example to get logs of the specified file via rpc show-kdump-logging

<show-kdump-logging>
<filename>dmesg.202506261458</filename>
<lines>20</lines>
</show-kdump-logging>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:613002e1-6ad4-42d3-afc8-704304fa8031">
<data xmlns="http://asterfusion.com/ns/yang/asternos-kdump">[ 409.441175] ? syscall_exit_to_user_mode+0x1e/0x40
[ 409.445995] ? do_syscall_64+0x61/0xb0
[ 409.449768] ? ptep_set_access_flags+0x2e/0x40
[ 409.454240] ? wp_page_reuse+0x60/0x70
[ 409.458013] ? auditd_test_task+0x39/0x50
[ 409.462050] ksys_write+0x6b/0xf0
[ 409.465385] do_syscall_64+0x55/0xb0
[ 409.468982] ? handle_mm_fault+0xdb/0x2d0
[ 409.473023] ? do_user_addr_fault+0x1b0/0x550
[ 409.477415] ? exit_to_user_mode_prepare+0x44/0x1f0
[ 409.482325] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 409.487406] RIP: 0033:0x7fafbff34340
[ 409.491004] Code: 40 00 48 8b 15 c1 aa 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d a1 32 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89
[ 409.509857] RSP: 002b:00007ffe2d74d308 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
[ 409.517467] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fafbff34340
[ 409.524637] RDX: 0000000000000002 RSI: 000055a76e5a59a0 RDI: 0000000000000001
[ 409.531807] RBP: 000055a76e5a59a0 R08: 0000000000000007 R09: 0000000000000073
[ 409.538986] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000002
[ 409.546163] R13: 00007fafc0010760 R14: 0000000000000002 R15: 00007fafc000b9e0
[ 409.553339] </TASK>
</data>
</rpc-reply>