Linux shutdown restart five methods (SysRq shutdown halt init IPMI)

Source: Internet
Author: User
Tags system echo

Linux shutdown restart five methods (sysrq shutdown halt init) Current version cat /etc/debian_version5.0.1 one, Linux shutdown command (top three types) 1, Shutdown -h now (-h:halt after shutdown.) haltinit 02, Linux Restart command shutdown -r (-r:reboot after shutdown.) Rebootinit 6 second, special case restart and shutdown (can ping   the above command can not be used in case   is the system hangs) 1, see if the kernel supports cat /boot/config-' uname  -r ' |grep  ' Config_magic_sysrq ' config_magic_sysrq=y2, temporarily on or off echo 0 > /proc/sys/ Kernel/sysrqecho 1 > /proc/sys/kernel/sysrq0 - disable sysrq completely1  - ENABLE ALL FUNCTIONS OF SYSRQ3, permanently set through the SYSCTL command SYSCTL -W KERNEL.SYSRQ =1sysctl -a|grep  "KERNEL.SYSRQ" kernel.sysrq = 14, specific command restart system echo  "B" > /proc/ Sysrq-trigger ' B '      - will immediately reboot the system  without syncing or unmounting         &nbsP;your disks. Shut down system  echo  "O" > /proc/sysrq-trigger ' o '      -  will shut your system off  (if configured and supported) .  three, Invoke IPMI command shutdown and restart (if configured) 1. Restart the machine ipmitool -ilanplus -h 172.16.1. -u root -p  123456 power reset2, power off ipmitool -i lanplus -h 172.16.1. -u root  -p 123456 power off some sysrq command parameters description ' B '       - Will  immediately reboot the system without syncing or unmounting your  Disks. ' C '       - will perform a system crash by a  null pointer dereference. A crashdump will be taken if configured. ' d '       - shows all locks that are held. ' E '     &nbsP; - send a sigterm to all processes, except for init. ' F '       - will call oom_kill to kill a memory  hog process. ' G '       - Used by kgdb  (Kernel debugger) ' H '        - Will display help  (actually any other key  than those listed here will display help. but  ' h '  is easy  to remember :-) ' i '       - send a sigkill to  all processes, except for init. ' J '       - Forcibly  "Just thaw it"  - filesystems  frozen by the fifreeze ioctl. ' K '       - Secure Access Key  (SAK)  KILLS ALL&NBsp;programs on the current virtual console. note: see important  Comments below in sak section. ' L '       - Shows a stack backtrace for all  Active cpus. ' M '       - Will dump current memory info to  Your console. ' n '       - used to make rt tasks nice-able ' o '        - Will shut your system off  (if configured  and supported). ' P '       - will dump the current registers and  flags to your console. ' Q '       - will dump per cpu lists of all  armed hrtimers  (but not regular timer_list timers) &nbsP;and detailed information about all clockevent devices. ' R '       - Turns off keyboard raw mode and  Sets it to xlate. ' S '       - Will attempt to sync all mounted  Filesystems. ' T '       - will dump a list of current tasks  and their information to your console. ' U '       - will attempt to remount all mounted  filesystems read-only. ' V '       - forcefully restores framebuffer console ' V '        - causes etm buffer dump [arm-specific] ' W '        - Dumps tasks that are in uninterruptable  (blocked)  stAte. ' X '       - used by xmon interface on ppc/powerpc  platforms. show global pmu registers on sparc64. ' Y '       - Show global CPU Registers [SPARC-64  Specific] ' Z '       - dump the ftrace buffer

This article is from the "7928217" blog, please be sure to keep this source http://7938217.blog.51cto.com/7928217/1643948

Linux shutdown restart five methods (SysRq shutdown halt init IPMI)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.