Configure Kdump And Analyse Vmcore File In RHEL7 | A Complete Kdump Tutorial | Redhat 7 | CentOS 7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome today's topic is about academic configuration internet Enterprise Linux service 7 I'm currently running a red hat enterprise linux server 7.3 and if I just bring my console here you can able to see the server information so it is running seven point three right so what is scared of me the first question the Gotham beasts nothing but our features with which we have in Linux kernel and that features help us to them the memory information into a file so that file we call a VM call so example you have your system which is hung or it is crash so now you don't know what is the reason behind it so what kind of we'll going to do if you have configured then it will capture of capture a memory file or memory image which is also known as a VM call which L which will have the all information so later what we can do we can determine that VM core file to see what caused the issue or why the system was in hung state ok so to capture the VM kernel information we need a tool called key k exe c tool so this tool will help us to avoid going through the bios booting process and instead of that it will load your temporary lot a new temporary kernel and it will help to capture this vm core file so that is why we need a k exas c tool install in the system so first thing what we need we need to install the k eh CC tools and here you can also see the configuration the Kadem configuration file is this one I am calm and service associated is Kadem and default when we configure Kadem the location the vm core file will going to dump into inside this word christ location so that can be changed so now let's go to my console here and let's start the the configuration process so first thing like a same I need to install rpm called K exe tool k KX EC tools so by default since I have installed this system with GUI by default this package is installed so in your case if this package is not installed you probably need to install this package so you just simply need to do a yum install and you need to ensure your repository is configured so once I have done this what I need to do next thing is I need to unlock it or I need to reserve a memory for my Tristram because when the system will crash and reboot and will try to capture the VM column is it needs memory without memory it won't be able to capture the data or all the VM Co file so that is why we need to specify or reserve some amount of memory for custom so to a look at that information we have a file so that file is under it's less good grub grub 2 dot chips see a grab 2 dot CAG so this is the file so earlier the earlier version which we are using it in run Hat Enterprise Linux probably rather than the prize-winning six or five we had grabbed not this it was only just grub and now it is introduced an enhanced version which is called grab to so now we cannot configure or we cannot edit this file why because let me tell you if I just go to grub and just do a VI for this file and first line it says about do not edit this file so it is recommended that we should not edit this file instead we need to edit this + etc' default grub file and update this file with the command of grub - m'kay country so that is why it is recommended not to use this file or edit this file so what I'm going to do I'm going to go inside this file I'll do a VI / EDC default and grub so inside this file we have a line for the presque dumb so now you can probably go with the auto but I'm going to use or I'm going to allocate some amount of memory in my system currently I have 2gb of memory and I'm going to allocate 128 MB of size 4 Tristram and also I'm sure that this this line should not be in the beginning instead you should be put this information at the end of your file because sometimes what happens if you crash your system it is unable to find the swap volume and that K that caused an issue and you won't be able to capture the VM call so that is why we need to specify this information at the end of this line so I'm just going to copy this line here let me just highlight it and copy here space and let me just remove this line because I already mentioned this press information in this location so I just forgot to update see here so it is now Chris canonical to 128 MB so we just have to update this line here and once you update just save the file and to make the change in the actual configuration file which is grub dot CFG we need to run this command grub 2 MK config and I know software option and both grab to grab the CFG so now I just updated the file and saying that I have reserved 128 MB of memory for custom I can double check whether it is updated or not 128 both grub to grub dot CAG and now I can see the crash colonel okay I think the spelling is not correct here so I need to do it again so now it should be good so let me just run this command again and let me just double check whether it is showing here or not so it is saying so now next step is I need to restart my system to reserve this memory for crash colonel so let me just reboot it systemctl reboot so now my system is up let me just login so it is up let me just take a terminal quickly and su to route okay so I can also double check whether it is reserved or not in the missus output so let me just grab for colonel Indy missus and now I can able to see in the D message it is saying reserving 128 MB of memory out of 2gb of to 0 for 7 memory for pace colonel so that means it looks good so now next thing next step is to start the service so it is the same thing again if you are familiar with rhel7 command so we just have to start the Kadem service so it is random it is taking a little time and we should be good momentarily it should give me our best from here so meanwhile I can go to a different window or different terminal here by clicking or pressing ctrl shift e and Exum eyes the font size so it is started now and let me just any veil it so that when my system is rebooted the service comes up along with that so I just enabled it so now next step is to configure the settings so default the configuration file like I mentioned it is less EDC Kadim kampf so if you just go through this file it has all the information which you can use so there are many information we can copy this VM call while the system is good or the VM call is capture it can be copy the VM core file to remote location so for that there is some option we need to enable an sss password less authentication and we also specify user and we server it is going to be coffee so that information we need to specify and there is something called call collector so which will actually help us to compress our vm core file as much as smaller size so that is why we use this vm called collective and there are few options which you can use and let me just go and of this file and there are some options like default option is reboot so when the when we will initiate academ whether a system going to report or it will halt or far off and whether it will give you give you a bash prompt so those are the options we have it so we will make those changes and yeah these are the default example given so whether you can use a separate bar cache file system or you can use the root file system currently I don't have a separate file system so I'm going to use the same root file system and under that we have plus wire crash directory so I'm going to go with the default and if you wanted to create a separate file system you can specify which are the file system type we are using and you have to specify the file system information like this here either way is fine and the core collector dump I will just going to has this information here for now let me just go one line below here and make - see which will be which is going to compress the file and default option which is mentioning a cell I am going to say as reboot so these are the basic configuration which you need to do and apart from that if you wanted to copy the VM core file in remote location you probably need to enable this weather through NFS or through assesses right so I'm just going to show you with this configuration and this looks good for me and I did a mistake I would have we start this service after editing this fine it's not an issue so what I have to do is I just need to restore the service one more time and once I have done that I'm good so now the next step is I wanted to crash this system and why I wanted to check whether my VM core images are generating or not right so to do that we have some command called Caesar queue so what is this our queue so let me just open a txt file which is I have just saved it under this location say circu ok so Caesar Q is nothing but it is called as a magic key which we have in a Linux kernel it's it is understandable by the Linux kernel so that we can pass some low level of command so example your system is in in hung or free stage you are barely run any command and you want to reboot your system so in that case if you just reboot your system or if you heard about your system your file system may got corrupt right so to avoid that we have some features which is something called Caesar queue so through Caesar queue we can reboot the system and it will not corrupt your file system so this is a very useful command which can be used so default option or default parameter he can able to see about Caesar queue in this location and there are some settings you would be able to see the first setting is zero which is a disabled and one is for enabling all the function and there are other options like sixteen so default it is 16 so which means the water the information is currently holding by your kernel those will sink before your system reboot we can also manually pass this information through echo - s box this trigger command so this is what the C's RQ is and this is the benefit of Caesar cube so now what I'm going to do I'm going to press this system the first thing what I have to ensure is this is our key is enabled so let me just make the chance proc C's kernel Cesario so I just enabled it and now I can sing the current information the current memory information holding back kernel with this command sorry I just need to say get in here right so now it is synced and now the next step I'm going to crash it to kress the system there is a flag called C and to that we can crash our system and before that we can also ensure whether my kdump is functional or not so we can run systems CTL and step as kdump and I can able to see my services are running and here one good thing is we the service skadam command is also work so she can like this you can take like this as well like we are using in previous distribution for a dad and one more option you can able to see systemctl is active Kadem so it should say active so that means Mike Adam is running fine so now I'm going to crash it so to do that I will do this prom since I cube trigger so once I enter this it should capture the memory are dumped into VM call now you can able to see there is something happening which is you can see copying data and the percentage is now completed 25% and it is depend on the cresst term memory size which you have mentioned I have mentioned 128 MB so if you have specify more then it will is going to capture your custom faster so depend on the memory size you have specified it will it will increase your performance to capturing the memory data so it is currently 50 60 percentage and I believe in another probably 10 second we would be able to capture the informations and once it is captured you'd be able to see the system will reboot and it is 83% done and we are almost there so the BM core is now captured and I would be able to see the vm core information underworld crush as I mentioned in the city seek atom configuration so let the system boots up it will not going to take much time because it is running nothing so it is probably going to take hardly one or two minutes so my system is up and let me just log in in so my system is up and let me just stick in terminal here let me switch to route and increase the font size okay so now if I do a DF edge see I do not have a separate file system so one press is under slash and it is well priced so if I just go and save this directory now I can see a new directory created with the timestream when the system is pressed so this is the time stamp and it is default the IP is taking the loopback IP which is a local IP so now if I just go inside this directory and do an LS let me just clear the screen and I can able to see there is a VM core file which is generated and I can be able to do it do it do - assets to see the size of it so now I can see the size is around 300 MB so this VM core file size is depend on your memories so how much memory in your system so currently I have a memory of around 2 GB so it is as advisable or redhead recommend that whether for example if you have 16 GB of memory so it is recommended that you have the work trace file system what are the file system whether it is a separated or under road should have the same amount of size if your memory is 16gb then your file system also needs to be the same size so this is the recommendation form that had so for currently since I have only 2 GB of memory so the size is around 3 so it depends in your memory if your memory is 16gb then definitely your VM core size will going to be a huge slice so please keep that in mind so now the thing is the next step is to analyze it the analyze the VM Co file and check whether Y my system got crash and why this VM code generated so I wanted to analyze it so if you have subscribed your system with Red Hat you can able to provide this VM code to Red Hat and they would be able to tell you why your system is Christ and this also you can be able to do it with debugging for kernel so I have an another system where my debugging for kernel is installed and let me show you the another system is this one so this system is the same red hat system running the server name is server 0 2 and my P is 136 so let me just copy the VM core file into this and let's analyze the file so do an LS I think it is under and applicants at this location or you can directly copy not an issue so let me just do an SI p vm core and my IP is 192 168 169 136 and I'm going to save this file inside temp directory sorry okay I did not specify the username so which default take the root username so it is currently copying to my remote server which is server to and it is copied so let me just go to my server to here and let's see whether my vehicle is available here or not let me just do an LS VM core so here is the file so to analyze this we need to install a kernel called kernel debugging for and there is a command called cress so default it is installed if it is not installed you just have to do yum installed crash and it will install your trace RPM and for debug it debug info kernel you need to do a debug in for install and cannon so it will install your debugging for garden so I have already installed the kernel and now if I just locate it for that location where these VM Linux and currently it is under this location so now I need to run trace command and specify my debug info kernel and inside this I have the VM core which I am going to analyze so let me just run this command there is some warnings that can be ignored okay so I have got an information about the colonel my remote system which I have crashed it so with this colonel I can able to see so now my system name is our server right the business system which I have it and where I crashed my colonel and other information about which time it is crest and why your colonel is panic so here you can see this RTO was initiated and it is triggered by Caesar Q so that is the command due to my kernel panic so you have your root cause here itself so now also you will get some other information through bias command somebody ran this this our queue and not only that you would be able to see other information like your system you can trance is and you'd be able to see a similar information like why it is crash and you can also check other information like swab so whether when the system is crash whether you have a high swap utilisation or not so we can think so here you cannot see any issues and to check more option it you just need to run help command and here here you'll be able to see other information so example if you wanted to look analyze the log so if you just take the log here you'd be able to see the more information about the system so if I just go last line here I can able to see that this is our Q command was triggered and that is why the system is crash and the other options like let me just do one help again and you can see other information above the files so whenever when the system was crashed whether how many open for answer that in that particular time so you can just run these files command and you can able to see if there any open files so like that you can be able to see your crash dump information you can be able to analyze your VM call information form or you can just do help and you can specify and basically in sis you'll get your information why the system is pressed so here it is saying panic do doses RQ command is trigger so that is why my system was pressed so this is how you have to configure your Cris Kadem internal enterprise servers this process also can be followed in CentOS and a little different configuration in Susa and oppress the next service I can probably prepare a different video for that and I can show you how we need to configure in SUSE Linux ok so that's it for now I have to show you how kdump is configured and how to crash it and how to analyze VM core file so that's it for video if you liked this video or if you think this content is useful for useful for you please subscribe my channel for more video like this and also please hit like ok so that's it thank you so much for watching this video have a good day see you next time
Info
Channel: Tune To Linux
Views: 16,701
Rating: undefined out of 5
Keywords: kdump configuration in linux, kdump in linux, kdump configuration in rhel6, kdump configuration in rhel7, kdump configuration in centos7, kdump tutorial, step by step kdump configuration, kdump in centos, kdump in centos 7, how to configure kdump in rhel7, how to configure kdump in centos7, how to configure kdump in centos6, how to analyse kdump vmcore, kdump vmcore file capture, kdump sysrq command, kdump in rhel7, kdump in rhel6, kdump in centos6, kdump in centos7, kdump
Id: gdSNSVuqh0A
Channel Id: undefined
Length: 32min 44sec (1964 seconds)
Published: Wed Jul 05 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.