Next Previous Contents

5. ¦Û¤v°Ê¤â«ü«n

³oùتº°Q½×¬O°w¹ï³æ½Õ¼Ò¦¡ªº UPS ±±¨î¦Ó¼g´Nªº¡CµM¦Ó¡A ¤j³¡¤Àªº¹Lµ{¹ï³æ½Õªº UPS »PÁo©úªº UPS ´X¥G¬O¤@¼Ëªº¡C³Ì¤jªº¤£¦P¦b©ó UPS ºÊ±±µ{¦¡ (°ò¥»¤W¬O powerd) ¦p¦ó»P UPS ·¾³q¡C

¦b¶}©l¤§«e¡A§Ú«Øij¥H¤Uªº¤u§@¬yµ{:

5.1 ±z©Ò»Ýªº¤u§@ (Á`µ²)

5.2 ³oÀ³¸Ó¬O°µ¤°»ò¤u§@ªº?

UPS ªº¤u§@

·í¹q¤O®ø¥¢®É¡A UPS «ùÄò¨ÑÀ³¹q¸£©Ò»Ýªº¹q¤O¡A ¨Ã¥H°e¥X­«¸m°T¸¹©Î¬O¦b¥¦ªº±±¨îªú¤W¥´¶}³s±µ°T¸¹¥H³qª¾¹q¸£¹q¤O®ø¥¢¤F¡C

°T¸¹Æl½uªº¤u§@

°T¸¹Æl½u¬O³]­p¬°·í UPS °e¥X­«¸m°T¸¹®É¡A·|¨Ï±o¯S®íªº§Ç¦Cªú±±¨î±µ¸} (°ò¥»¤W¬O DCD) ¥X²{°ª¹q¦ì¡C

Powerd ªº¤u§@

powerd µ{¦¡­t³dºÊµø§Ç¦Cªú¡C¥¦«O«ùµÛ UPS ©Ò»Ý¦Ó¤É°ª / ­°§C§Ç¦Cªú±±¨î±µ¸}ªº°ª / §C¹q¦ì (°ò¥»¤W¡A DTR ±µ¸}¥²¶·«O«ù¦b°ª¹q¦ì¥BÃö³¬ UPS ªº±µ¸}¥²¶·«O«ù¦b§C¹q¦ì) ¡C·í powerd µoı±±¨î±µ¸}Åܦ¨°ª¹q¦ì¡A¥¦·|¦b /etc/powerfail Àɤ¤¼g¤J FAIL ³o­Ó¦r¨Ã°e SIGPWR °T¸¹µ¹ init ¦æµ{¡C ·í±±¨î±µ¸}¦A¦¸Åܦ^§C¹q¦ì®É¡A¥¦·|¦b /etc/powerfail Àɤ¤¼g¤J OK ³o­Ó¦r¨Ã°e SIGPWR °T¸¹µ¹ init ¡C

Init ªº¤u§@ (°£¤W­z¤§¥~¥¦­t³d©Ò¦³ªº¤u§@)

·í¥¦±µ¨ì¤F SIGPWR °T¸¹¡A¥¦·|Àˬd /etc/powerfail ÀÉ¡C ¦pªGùØÀY¬O FAIL ³o­Ó¦r²´¥¦·|°õ¦æ /etc/inittab Àɤ¤ powerfail ¨º¤@¦æªº«ü¥O¡C¦pªGùØÀY¬O OK ³o­Ó¦r¥¦«h°õ¦æ inittab Àɤ¤ powerokwait ¨º¤@¦æªº«ü¥O¡C

5.3 ¦p¦ó³]©w¦n©Ò¦³ªº¤u§@

¥H¤U§Ú­Ì°²³]±z¦³¤@±ø¥i¥H©M powerd ¥¿±`¤u§@ªº°T¸¹Æl½u¡C ¦pªG±z¤£½T©w±zªº°T¸¹Æl½u¬O§_¥i¥H¤u§@ (©Î¥¦¦p¦ó¤u§@)¡A½Ð°Ñ¦Ò °T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c ¤@¸`¡A¨º¨à¦³Ãö©ó¤Ö¨£ªº°T¸¹Æl½u³B²z¤Î­«·s³]©w powerd.c ªº¸ê°T¡C °T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c<@ref>serial-port§Ç¦Cªú±µ¸}ªº«ü©w ¤Î °T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c<@ref>serial-port§Ç¦Cªú±µ¸}ªº«ü©w<@ref>ioctl¦³ÃöŪ¼g RS232 ³o¨â¸`¤]±N¹ï±z¦³À°§U¡C

¦pªG±z»Ý­n»s§@¤@±ø°T¸¹Æl½u¡A½Ð¨£ ¦p¦ó»s§@°T¸¹Æl½u ªº¸Ô²Ó»¡©ú¡A¥H¤Î ¦p¦ó»s§@°T¸¹Æl½u<@ref>ups-specificUPS ¸ê®Æ¸`¿ï ¤@¸`¤¤¦³Ãö±zªº UPS ªº¤p¸`¡C «áªÌ¥i¯à¤]¥]§t¤F»s³y°Ó©Ò´£¨Ñªº°T¸¹Æl½uªº¬ÛÃö¸ê°T¡C ©Î³\±zÀ³¦Ü¤Ö±N ¦p¦ó»s§@°T¸¹Æl½u<@ref>ups-specificUPS ¸ê®Æ¸`¿ï<@ref>ups-specificUPS ¸ê®Æ¸`¿ï ¤¤©Ò¦³ªº¤p¸`ÂsÄý¹L¤@¹M¡A¦]¬°¨C¤@¤p¸`³£·|¦³¤@¨ÇÃB¥~ªº¤@¯ë©Ê¸ê®Æ¯à¹ï±z¦³À°§U¡C

®¥³ß±z! ±zªº Linux ¨t²Î²{¦b¤w¦b UPS ªº«OÅ@¤U¡A ¥B¥¦±N·|¦b¹q¤O¯ÓºÉ¤§«e¦w¥þ¦aÃö¾÷¤F¡C

5.4 ¶i¤@¨Bªº§ïµ½


Next Previous Contents