uec@sddlZddlZddlmZmZmZmZdefdYZdeefdYZdeeefdYZ dS( iN(tPlugint RedHatPlugint DebianPlugint UbuntuPlugintKDumpcBs#eZdZdZdZdZRS(sKdump crash dumps tkdumptsystemtdebugcCs|jdddgdS(Ns /proc/cmdlines/sys/kernel/kexec_crash_loadeds/sys/kernel/kexec_crash_size(t add_copy_spec(tself((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pytsetups(ssystemsdebug(t__name__t __module__t__doc__t plugin_nametprofilesR (((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pyRst RedHatKDumpcBs/eZdZdZdZdZdZRS(s/etc/kdump.confs kexec-toolscCsStdd>}x4|D],}|j|r|jdjdSqWWdQXdS(Ns /etc/fstabtrit/t(topent startswithtsplittrstrip(R tdevicetfptline((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pytfstab_parse_fs"s  !c Csd}d}tddk}xa|D]Y}|jdrM|jd}q%|jd r%|jd}|j|}q%q%WWdQX||S( NRs /var/crashs/etc/kdump.confRtpathitext2text3text4txfs(RRRR (RRRR(R tfsRRRR((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pytread_kdump_conffile)s cCstt|jdtjd}tjj|rM|jd|n|j dddgy|j }Wnt k rd}nX|j dj |dS( Ns/boot/initramfs-s kdump.imgs lsinitrd %ss/etc/kdump.confs/etc/udev/rules.d/*kexec.ruless/var/crash/*/vmcore-dmesg.txts /var/crashs{}/*/vmcore-dmesg.txt( tsuperRR tplatformtreleasetosRtexiststadd_cmd_outputRR"t Exceptiontformat(R t initramfs_imgR((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pyR 6s   (s/etc/kdump.conf(s kexec-tools(R R tfilestpackagesRR"R (((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pyRs   t DebianKDumpcBseZdZdZdZRS(s/etc/default/kdump-toolss kdump-toolscCsjtt|jdtj}tjj|rI|jd|n|jd|j dgdS(Ns/var/lib/kdump/initrd.img-slsinitramfs -l %sskdump-config shows/etc/default/kdump-tools( R#R.R R$R%R&RR'R(R(R R+((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pyR Qs (s/etc/default/kdump-tools(s kdump-tools(R R R,R-R (((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pyR.Ls( R&R$t sos.pluginsRRRRRRR.(((s5/usr/lib/python2.7/site-packages/sos/plugins/kdump.pyt s  "/