å æ¥ã諸ã ã®é½åã§é éã«ãããã¹ãç°å¢ã®ãµã¼ã(Linux)ã®ã«ã¼ãã«ãã©ã¡ã¼ã¿ãå¼ã£ã¦ããã®ã§ãããã¡ãã£ã¨è¨å®(ã¡ã¢ãªã¾ãã)ãã¤ãããã¦ãã¾ãï½ãã³ãã³ãå®è¡ã¨ãããforkã§ããªããªã£ã¦ãã¾ã£ã(Cannot allocate memory...)ã
ãã§ãshutdownã³ãã³ããå®è¡ã§ããªããªã£ãã®ã§ãç´ããã¨æã£ãã®ã§ãããè²ã å¼ã£ãï¼æéããªãã£ããã¨ããããä¸æ¦OSãåèµ·åãã¡ãããããªãã¨(æ±
ããé éã«ãããµã¼ããªã®ã§ãç©ççãªé»æºã¹ã¤ããON/OFFãã§ããªã(å³å¯ã«ã¯åºæ¥ãç°å¢ã§ã¯ãã£ãã®ã§ããããã®ãµã¼ãã¯ããã«å
¥ã£ã¦ãªãã£ãï½)ãã®ã§ãSysRqãã¼ãéããã¨ã«ããã
ããæ¹
å°ãç¡çç¢çæã¯ããã¾ããã
# echo b > /proc/sysrq-trigger
ãå®è¡ããã¨ãå¼·å¶çã«ãªãã¼ãããããã¾ãã
ãã ãããã¡ã¤ã«ã·ã¹ãã ã®syncã¨ãumountãè¡ãããªãã®ã§ã注æãå¿
è¦ã§ãã
é常ãKernelã§ãã¸ãã¯SysRqãã¼ã¯æå¹ã«ãªã£ã¦ããªãã¨æãã¾ãããâã®ããã«ãç´æ¥"/proc/sysrq-trigger"ã«åºåããã°OKã§ãã
ã·ã§ã«ã³ãã³ããåãä»ããªãå ´åã¯ã"/proc/sys/kernel/sysrq"ã"1"ã«è¨å®ããã¦ãã(ã«ã¼ãã«ã§ãã¸ãã¯SysRqãã¼ãæå¹ã«ããã¦ãã)åæã§ã[Alt] + [SysRq/(PrtSc)] + [ã³ãã³ãkey]ãå®è¡ããã°OKã®ã¯ãã
ã¡ãªã¿ã«ãä¸è¨ä¾ã®å ´åã[ã³ãã³ãkey]ã¯"b"ã¨ãªãã¾ãã
(å®å ¨ã«åèµ·åããã«ã¯)
Linuxãããªã¼ãºããéã«ãå®å ¨ã«ãªãã¼ããããã¸ãã¯SysRqãã¼æ¼ä¸ã®ä¸é£ã®æµãããWikipediaのページã«æ¸ããã¦ãã¾ããã
R â E â I â S â U â B
マジックSysRqキー - Wikipedia
unRaw ï¼X Window Systemãããã¼ãã¼ãã®å¶å¾¡ãåãæ»ãï¼ tErminate ï¼ãã¹ã¦ã®ããã»ã¹ã«SIGTERMã·ã°ãã«ãéããæ£å¸¸ã«çµäºãããï¼ kIll ï¼ãã¹ã¦ã®ããã»ã¹ã«SIGKILLã·ã°ãã«ãéããå¼·å¶çã«çµäºãããï¼ Sync ï¼æ¸ãè¾¼ã¿ãã£ãã·ã¥ã®ãã¼ã¿ããã£ã¹ã¯ã«æ¸ãè¾¼ãï¼ Unmount ï¼ãã¹ã¦ã®ãã¡ã¤ã«ã·ã¹ãã ãèªã¿è¾¼ã¿å°ç¨ã§åãã¦ã³ãããï¼ reBoot ï¼ã·ã¹ãã ãåèµ·åããï¼
åè: ãã®ä»ã®SysRqãã¼
⻠以ä¸ã®æ¥æ¬èªè¨³ã¯ãWikipediaのページããæç²(æ±
'b' - Will immediately reboot the system without syncing or unmounting your disks. å³åº§ã«åèµ·åããããã®éãã¡ã¤ã«ã·ã¹ãã ã®syncãã¢ã³ãã¦ã³ãã¯è¡ãããªãã 'c' - Will perform a kexec reboot in order to take a crashdump. ã«ã¼ãã«ãã¯ã©ãã·ã¥ãããã 'd' - Shows all locks that are held. ç¾å¨ãã¼ã«ãããã¦ãããã¹ã¦ã®ããã¯ã表示ããã 'e' - Send a SIGTERM to all processes, except for init. init ï¼PID 1ï¼ãé¤ããã¹ã¦ã®ããã»ã¹ã«SIGTERMã·ã°ãã«ãéã ï¼ããã»ã¹ãçµäºãããï¼ã 'f' - Will call oom_kill to kill a memory hog process. ã¡ã¢ãªä¸è¶³ã解æ¶ããããã«ããã»ã¹ãçµäºããã oom_kill ãå¼ã³åºãã 'g' - Used by kgdb on ppc and sh platforms. Kernel Mode Settingï¼KMSï¼ä½¿ç¨æã«ãã«ã¼ãã«ã®ãã¬ã¼ã ãããã¡ã³ã³ã½ã¼ã«ã« åãæ¿ããããã®ç·æ¥æªç½®ãæä¾ããã 'h' - Will display help (actually any other key than those listed above will display help. but 'h' is easy to remember :-) ã³ã³ã½ã¼ã«ã«ç°¡åãªèª¬æãåºåããã 'i' - Send a SIGKILL to all processes, except for init. init ãé¤ããã¹ã¦ã®ããã»ã¹ã«SIGKILLã·ã°ãã«ãéã ï¼ããã»ã¹ãå¼·å¶çµäºãããï¼ã 'k' - Secure Access Key (SAK) Kills all programs on the current virtual console. NOTE: See important comments below in SAK section. ä»®æ³ç«¯æ«ä¸ã®ãã¹ã¦ã®ããã»ã¹ã«ã»ãã¥ã¢ã»ã¢ãã³ã·ã§ã³ã»ãã¼ï¼SAKï¼ãå®è¡ããã '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 ãã¹ã¦ã®é«åªå 度ããã³ãªã¢ã«ã¿ã¤ã ã¿ã¹ã¯ã®niceã¬ãã«ããªã»ããããã 'o' - Will shut your system off (if configured and supported). ã·ã¹ãã ãåæ¢ãããã 'p' - Will dump the current registers and flags to your console. ç¾å¨ã®ã¬ã¸ã¹ã¿ããã³ãã©ã°ãã³ã³ã½ã¼ã«ã«åºåããã 'q' - Will dump a list of all running timers. ãã¹ã¦ã®é«ç²¾åº¦ã¿ã¤ãããã³ã¯ããã¯ã½ã¼ã¹ã表示ããã 'r' - Turns off keyboard raw mode and sets it to XLATE. ãã¼ãã¼ããrawã¢ã¼ãããXLATEã¢ã¼ãã¸åãæ¿ãããX Windowã使ç¨ãã¦ããå ´åã ã¾ããã®æä½ãè¡ã£ã¦ãã¼ãã¼ãã解æ¾ããã 's' - Will attempt to sync all mounted filesystems. ãã¦ã³ãããã¦ãããã¹ã¦ã®ãã¡ã¤ã«ã·ã¹ãã ãsyncããã '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' - Dumps Voyager SMP processor info to your console. Voyager SMPããã»ããµæ å ±ã表示ããã 'w' - Dumps tasks that are in uninterruptable (blocked) state. ãããã¯ããã¦ããï¼D stateï¼ã¿ã¹ã¯ã®ãªã¹ãã表示ããã 'x' - Used by xmon interface on ppc/powerpc platforms. '0'-'9' - Sets the console log level, controlling which kernel messages will be printed to your console. ('0', for example would make it so that only emergency messages like PANICs or OOPSes would make it to your console.) ã³ã³ã½ã¼ã«ã«åºåããã«ã¼ãã«ã¡ãã»ã¼ã¸ã®ãã°ã¬ãã«ãå¶å¾¡ããã
åè

- ä½è : é«æ©æµ©å,å°ç°é¸é,山幡çºä½ä¹
- åºç社/ã¡ã¼ã«ã¼: ã½ãããã³ã¯ã¯ãªã¨ã¤ãã£ã
- çºå£²æ¥: 2006/11/18
- ã¡ãã£ã¢: åè¡æ¬
- è³¼å ¥: 14人 ã¯ãªãã¯: 197å
- ãã®ååãå«ãããã° (118件) ãè¦ã

詳解 Linuxã«ã¼ã㫠第3ç
- ä½è : Daniel P. Bovet,Marco Cesati,é«æ©æµ©å,æç°ç±ç¾å,æ¸ æ°´æ£æ,é«ææç£,å¹³æ¾é å·³,å®äºéå®
- åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã»ã¸ã£ãã³
- çºå£²æ¥: 2007/02/26
- ã¡ãã£ã¢: 大åæ¬
- è³¼å ¥: 9人 ã¯ãªãã¯: 269å
- ãã®ååãå«ãããã° (73件) ãè¦ã