Posts Tagged ‘Technical’

Manowar in Kavarna

Monday, July 2nd, 2007

Everything actually started in Friday. Friday I was on a Webtech in Varna in the Technical University.This is the second Webtech conference made in Varna. I was on the lectures until dinner. Firstwe went with Nomen, Niki and Dancho to the TU University, and we lost some time searching for theroom after that we found the room where the lectures were going to be. We entered in the endingpart of the first introductionary lecture about webtech. After this there was a lecture forperl Catalyst, which was quite interesting btw after that a lecture for expect (hackman has leaded the lecture).After that we went to drink a coffee and I found out I have lost my wallet. I get mad because I thoughtwell God I try to be good to others to give to the poor etc. etc. and in return I loose 42 lv. I spendthe other part of the day staying alone on a bench outside the university and thinking about the humanexistence, after that I went home very disappointed and angry. Stelio a friend who is has led me to the Orthodox Christianianity. Called and I invited him to be my guest, we had a great time togetherdiscussing the human existence. The next day I wake up early and I was feeling awful, meaninglesslost. Nomen called and said there are on the 2nd day on the lectures of webtech conference againand that my wallet has been found with 42 lv. and my ID card in it. I PRAISED THE LORD! It wasquite a joyful for me. On the next day I decided I would go to the Manowar concert in Kavarnaand I bought the ticket from Amridikon. The concert was interesting as a whole but I realizedI’m not into metal music anymore. After that Nomen came and take me from Kavarna with a car andwe went to Tulenovo’s rocks awaiting the July Morning with some other friends (Sami, Toto, Iasho, Gegi etc.).The rocks were very beautiful and the sea’s view is great. We baked some meet and ate. In the morning, there was a Metal July. (Toto, Sami and Iasho banged there heads on Sepultura’s Roots Bloody Rootsand Territory. After that we made a sort of excursion in the Village of Tulenovo and around it around the rocks.We then moved to Balchik to leave one of the girls with us on the station to take a bus for her working place.And in the end we come back to Dobrich in 10. I was tired as hell. And sleep until 3. I then attended the Orthodox Church st. Georgi to pray to God. Later I bought some vegetables and fruits fromthe open market for my Grandma. And went to her home to give her the products. After that I saw lily on a coffee.And in the late afternood we had a walk with Nomen into the central park. Nomen suggested that it would be cool to drink beer in hishouse and to watch the film (Die Young 3) and that’s exactly what we did. This few days was quite a colorful It’s God behind thisstarting to answer my prayers slowly but surely. Thanks God for giving me all thiswonderful moments :]END—–

Reboot Safely a frozen (hanged up) Linux Server with Magic SysRQ Key combination

Monday, June 20th, 2011

Linux Magic SysRQ Key picture

Being a remote system administrator for many years from now, I’ve experienced many times sudden Linux crashes, mostly caused by system hardware overloads.

This is a common thing especially on busy Web Servers with (Apache/MySQL). Situations like this are really messy and many times in order to bringt the server back online, one has to either physically go to the Data Center or contact the Technical support to request a server reboot.

In this terrible times, data loss might occur if the Server reset button is used to cold reboot it.

Happily in 99% of the cases the data loss which might occur could be prevented with Linux’s kernel capability to support the Magic SysRQ key !

Having the Magic SysRQ key functionality being supported in Linux in past times wasn’t that common, thanksfully these days this has changed andlmost every Linux distrubution supports this handy feature.

Now you might wonder what is the magic with those Magic SysRQ key ?

Let me explain, Magic SysRQ is a kernel level functionality which supports even completely crashed Linux systems with the horrifying:

Kernel Panic
message to be properly shutdown.

Using Magic SysRQ instead of the mostly used indiced cold reboots is really advantageous, as all the opened files by programs on the crashed server which hanged will be properly saved and closed and thus possible data loss caused by the sudden server crash will be minimized.

One other good thing about the Magic SysRQ Key keyboard combination is that initiating the Magic SysRQ could be made blindly (no need for server monitor or display to present any error messages on the failed server).

Now to check if the magic sysrq is enabled on a server one should issue the command:

Here are some Magic SysRQ keyboard combinations one can use in case of server failure:

ALT+SYSRQ+M to dump memory info;
ALT+SYSRQ+P to dump processes states;
ALT+SYSRQ+S to sync disks;
ALT+SYSRQ+U to unmount all mounted filesystems;
ALT+SYSRQ+E to terminate processes;
ALT+SYSRQ+I to kill all processes
ALT+SYSRQ+U to try to unmount once again;
ALT+SYSRQ+B to reboot.

I would skip to explain what each of the keyboard combinations will do as I believe the above description explains it well.

One classics of combinations one might want to issue on a failed Linux server supporting the Magic SysRQ would be:

ALT+SYSRQ+R
ALT+SYSRQ+E
ALT+SYSRQ+I
ALT+SYSRQ+S
ALT+SYSRQ+U
ALT+SYSRQ+B

The ALT+SYSRQ+REISUB key combination is very popular among system administrators.
Also Magic SysRQ is heavily used by kernel developers as it includes many handy debugging options.

If you try the Magic SysRQ key on older servers and you realize it doesn’t react you will have to recompile the linux kernel and enable the CONFIG_MAGIC_SYSRQ kernel time compilation option.

The Magic SysRQ can also be initiated remotely on a properly running server 😉 by initiating:

server:~# echo b > /proc/sysrq-trigger

This command would be useful if you want to just have fun and test that magic sysrq works on your system for sure 😉

To sum it up using the Magic SysRQ will guarantee your locked up, server a Safe Reboot and will hopefully save you a lot of time for backups recovery.