¤¤¤å UPS Howto Harvey J. Stein, [1]abel@netvision.net.il, Berger Financial Research, Ltd. v2.02, 31 March 1997 _________________________________________________________________ ¥»¤å¯àÀ°§U±z±N Linux ¨t²Î³s±µ¨ì¤£Â_¹q¨t²Î (uninterruptable power supply, UPS)... ¦pªG©¯¹Bªº¸Ü .... ª©ÅvÁn©ú: Copyright (c) 1994, 1995, 1996, 1997 by Harvey J. Stein. You may use this document as you see fit, as long as it remains intact. In particular, this notice (along with the contributions below) must remain untouched. _________________________________________________________________ 1. ²¤¶ * 1.1 ¦³°^Ämªº¤H­Ì * 1.2 ½Ð¯S§Oª`·N * 1.3 ¨ä¥Lªº¤å¥ó 2. ½Ðª`·N¤w¹L®Éªº¸ê°T 3. Áo©úªº»P³æ½Õªº UPS 4. ³nÅé 5. ¦Û¤v°Ê¤â«ü«n * 5.1 ±z©Ò»Ýªº¤u§@ (Á`µ²) * 5.2 ³oÀ³¸Ó¬O°µ¤°»ò¤u§@ªº? * 5.3 ¦p¦ó³]©w¦n©Ò¦³ªº¤u§@ * 5.4 ¶i¤@¨Bªº§ïµ½ 6. µwÅ骺ª`·N¨Æ¶µ * 6.1 ¦p¦ó»s§@°T¸¹Æl½u * 6.2 °T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c _________________________________________________________________ 1. ²¤¶ ¥» HOWTO ¤å¥ó¥]§t¤F¦p¦ó³s±µ UPS ¨ì°õ¦æ Linux ªº¹q¸£¤W¡C ¨ä·Qªk¬O¥H¾A·í ªº¤è¦¡±N¤GªÌ¬Û³s±µ¡A¨Ï±o Linux ¥i¥H¦b¹q·½Â_¹q¥H¤Î UPS ªº¹q¦À¯Ó¥ú«e¦w¥þ ¦aÃö¾÷¡C ¨ä¤¤ÁÙ¥]¬A¤F¤@¨Ç¥iÀ°§U±z«Ø¥ß¤W­z³s½uªº³nÅé¡A¥H¤Î¸Ô­z¸Ó³s½uªº¹B§@¤è¦¡¡C °²¦p±z¯à§ä¨ì¤@­Ó¤w³]©w¦n¥i¥H¨Ï¥Î±zªº UPS ªº³nÅé¡A «h«áªÌªº»¡©ú¹ï±z¨Ó»¡ ³q±`¬O¤£»Ý­nªº¡C§_«hªº¸Ü¡A±z¥²¶·¥J²Ó¦a¾\Ū¥¦¡C ¦b¬Û·íªºµ{«×¤W¥»¤å¥ó¤w¤ñ°_§Ú¦b¤T¦~«e©Ò¼¶¼gªº­ì¤å¦h¥X¤F«Ü¦h¤º®e¡C ©Ò¦³ªº °ò¥»¸ê®Æ³£¥i¥H¦b SysVinit ¤¤ªº powerd man page ùاä¨ì¡C ¾¨ºÞ¦b¤T¦~«e¦³ ¤H¥i¯àµLªk¦b¤@¯ëªº Linux ®M¥ó¤¤§ä¨ì³o½g man page ¡A ¦ý§Ú¤£¬Û«H¤µ«áÁÙ·| ¦Aµo¥Í³o¼Ëªº±¡ªp¡C °£¦¹¤§¥~¡A·í§Ú²Ä¤@¦¸¼¶¼g³o½g Howto ¡A°£¤F powerd.c ¥H¥~¨Ã¨S¦³¨ä¥Lªº³nÅé ¥i¥H°µ¬° Linux/UPS ¤§¶¡ªº·¾³q»P±±¨î¡C ¦Ó¤µ¤é§Ú­Ì«h¥i¥H¦b [2]Sunsite's UPS directory ¤U§ä¨ì¤@¤j°ï UPS ±±¨î³nÅé¡C µM¦Ó¡A¨ü¨ì RedHat §Y±N­«·s¦L»s Dr. Linux ªº¿EÀy¡A§Ú¤]¶}©l­«¼g³o½g UPS Hotwo ¡C ¬°¤°»ò©O? ¶â .... * §Ú·Q¡AÃB¥~ªº¤@¯ë©Ê·§Æ[±N¯à¦³§U©ó¤F¸Ñ¦p¦ó±N Linux ¨t²Î³s¤W UPS ¡A §Y ¨Ï¥¦¥u¬O¥t¤@¥÷¤º®e¬Û¦Pªº¤å¥ó¡C * ³o½g HOWTO ºâ¬O¦UºØ¯S®í UPS ¸ê®ÆªºÀxÂîw --- ¦b³o¨à¦³³\¦h©|¥¼³Q¾ã¦X ¤J¤@¯ë³nÅé®M¥ó¤¤ªº UPS ¸ê°T¡C * ³o½g HOWTO ¥]§t¤F¤@¨Ç¦b¨ä¥L¤å¥ó¤¤§ä¤£¨ìªºÃB¥~¸Ô²Ó¸ê®Æ¡C * ¤@¨Ç¥i¥H¦b [3]Sunsite's UPS directory §ä±o¨ìªº UPS ³nÅé¦ü¥G»¡©ú¤å¥ó ³£¤Ö±o¥i¼¦¡C ±z¤]³\»Ý­n¥ý¾\ð饻¤å¥H¤F¸Ñ¦p¦ó¨Ï¥Î¥L­Ì¡C * ²{¦b³o¥ó¨Æ¦ü¥G¤w¦³¤F¦Û¤vªº¥Í©R¤F¡C·í¤@½g HOWTO ¤å¥ó¦]¦Ó½Ï¥Í®É¨Æ¹ê´N §ó¥[©úÅã¤F¡C¥t¤@­Ó¤ñ¸û¤£©úÅ㪺¨Æ¹ê¬O·í¥¦¥²¶·¤W§ÉºÎı®É¡C (Ķµù: ³o ¤@¥y¯º¸Ü§Ú¬Ý¤£À´°Õ! ­ü! ½±o¦nÄê ....) 1.1 ¦³°^Ämªº¤H­Ì §Ú¥Ã»·³£·|·P¿E¨º¨Ç´¿¸gµ¹§ÚÀ°§U¡Bµ¹§Ú«Øij¡B¥H¤Îµ¹§Ú¯S®íªº UPS ¸ê®Æªº¤H­Ì ¡C ¨ä¤¤¥]¬A¤F: * Hennus Bergman ( [4]hennus@sky.owl.nl) * Charli ( [5]mefistos@impsat1.com.ar) * Ciro Cattuto ( [6]Ciro Cattuto) * Nick Christenson ( [7]npc@minotaur.jpl.nasa.gov) * Lam Dang ( [8]angit@netcom.com) * Markus Eiden ( [9]Markus@eiden.de) * Dan Fandrich ( [10]dan@fch.wimsey.bc.ca) * Ben Galliart ( [11]bgallia@orion.it.luc.edu) * Danny ter Haar ( [12]dth@cistron.nl) * Christian G. Holtje ( [13]docwhat@uiuc.edu) * Raymond A. Ingles ( [14]inglesra@frc.com) * Peter Kammer ( [15]pkammer@ics.uci.edu) * Marek Michalkiewicz ( [16]ind43@sun1000.ci.pwr.wroc.pl) * Jim Ockers ( [17]ockers@umr.edu) * Evgeny Stambulchik ( [18]fnevgeny@plasma-gate.weizmann.ac.il) * Clive A. Stubbings ( [19]cas@vjet.demon.co.uk) * Miquel van Smoorenburg ( [20]miquels@cistron.nl) * Slavik Terletsky ( [21]ts@polynet.lviv.ua) * Tom Webster ( [22]webster@kaiwan.com) ½Ðª`·N¤U¤èªº email ¦a§}¬O¦Û¹q¤l«H¥ó¤¤¸`¿ý¤U¨Óªº¡A¥¦­Ì¤]³\·|¹L´Á¡C ¦Ó¤W ¤èªº email ¦a§}¥i¯à¤]·|¹L´Á¡A¦ý¦³¨Ç¬O¤ñ°_¤U¤èÁÙ­n·sªº¡C °£¦¹¤§¥~¡A¦pªG¦]§Úªº²¨©¿¦Ó¦b¤Wªí¤¤º|±¼¥ô¦ó¤@¦ì¦³°^ÄmªÌªº¸Ü¡A§Ú¯uªº«Ü©ê ºp¡C ½Ð±z email µ¹§Ú¡A§Ú·|±N±zªº¦W¦r¥[¤W¥h¡C 1.2 ½Ð¯S§Oª`·N §Ú¯uªºµLªk«OÃÒ³o¨ÇªFªF¹ï±z·|¦³®Ä¡C³sµ² UPS ¨ì¹q¸£¤W¬O¤@¥ó¬Û·í¦³§Þ¥©ªº¤u §@¡C ¨ä¤¤¤§¤@©Î¤GªÌ³£¦³¥i¯à·|¿N±¼¡BÃz¬µ¡BµÛ¤õ¡B©ÎªÌ¬O¤Þµo²Ä¤T¦¸¥@¬É¤j¾Ô ¡C °£¦¹¤§¥~¡A§Ú¥u¦³¹ï Advice 1200 A UPS¡A¥H¤Î 5kva Best Ferrups ¦³ª½±µ ªº¸gÅç¡A ¦Ó¥B§Ú¤]¤£»Ý­n¦Û¤v°µ¤@±ø°T¸¹½u¡C©Ò¥H¡A½Ðª`·N! ¾¨¥i¯à¦a¦¬¶°±zªº UPS ªº©Ò¦³¸ê°T¡C ½Ð¥ý¦Ò¼{²M·¡¡A¤£­nÀH«K¬Û«H¥ô¦ó±z¦b¥»¤å¤¤©Î¨ä¥L¦a¤è©ÒŪ ¨ìªº¤º®e¡C ¥t¤@¤è­±¡A§Ú¥¿ºÉ¥i¯à¦a¦¬¶°©Ò¦³¨Ï§Úªº UPS ¥i¥H¤u§@ªº¤èªk¡A ¨ä¤¤¦³«Ü¦h¤£ ¬O¨Ó¦Û»s³y°Óªº¸ê°T¡A©Ò©¯¤]¨S¦³¿N±¼¥ô¦óªF¦è¡A©Ò¥H³o¨Ç³£¬O¥i¯àªº¡C 1.3 ¨ä¥Lªº¤å¥ó ¥»¤å¨Ã¨S¦³¥]§t©Ò¦³ UPS ªº¤@¯ë¯S©Ê»P¯à¤O¡C¦p±z»Ý­n³oÃþ«¬ªº¸ê°T¡A§A¥i¥H¬Ý ¬Ý [23]The UPS FAQ¡C ³o½g¤å¥ó¦P®É¤]¥i¥H¦b [24]ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/answers/UPS-faq ¤¤ §ä¨ì¡C¥¦¬O¥Ñ Nick Christenson ( [25]npc@minotaur.jpl.nasa.gov) ©ÒºûÅ@ªº ¡A¦ý¬Ý°_¨Ó¦n¹³¦Û±q 1995 ¦~¥H«á´N¨S¦³¦A­«¼g¤F¡C¦pªG±z­n email µ¹¥L¡A ¥L §Æ±æ±z¥i¥H¦b«H¥óªº Subject ¨º¤@¦æ©ñ¤J UPS ©Î UPS FAQ ©Î¨ä¥L¬ÛÃöªºµü¥y¡C ¦³³\³\¦h¦hªº UPS »s³y°Ó¦bºô¸ô¤¤µÞªÞ¡C ¨ä¤¤¦³¨Ç½T¹ê¦b¥L­Ìªººô­¶¤¤´£¨Ñ¤F ¦³¥Îªº¸ê°T¡C±z¥i¥H¦b [26]The UPS Directory ¤¤§ä¨ì³o¨Ç UPS »s³y°Óªººô­¶ ²ªí¡C¸Óºô¯¸¤]¥]§t¤F [27]UPS FAQ ³o½g¤å¥ó¡C 2. ½Ðª`·N¤w¹L®Éªº¸ê°T §Ú­è­èµo²{©³¤U¦³¤@¨Ç¸ê®Æ¤w¸g¹L®É¤F¡C¨ä¤¤¨Ó¦Û [28]the latest sysvinit package ªº init daemon ¤ñ°_§Ú©Ò¯à´y­zªºÁÙ­n²­®¡C ¾¨ºÞ¬Ý°_¨Ó¥Ø«eªºª©¥» »P¸Óµ{¦¡§¹¦¨®Éªºª©¥»¬Û®e¡A¦ý·í¤¤¤´µM¦³¤@¨Ç¹ï UPS ¬Û·í­«­n ªº¤ä´©¨S¦³¤å ¥ó»¡©ú¡C ©³¤U©Ò²­zªº±±¨î¾÷¨î¥u¯àÅý powerd °eµ¹ init powerfail ©Î powerok ³o¨â­Ó °T®§¤§¤@¦Ó¤w¡Cinit ±µ¨ì powerfail °T®§®É°õ¦æ¤@­Ó©R¥O¡A¦Ó·í¥¦±µ¨ì powerok ®É«h°õ¦æ¥t¤@­Ó©R¥O¡C ³o±N¾É¦Ü powerd ¦b³B²z§C¹q¤O°T¸¹¤Î¨ä¥L¯S®í ª¬ªp®É²£¥ÍÅÞ¿è¤Wªº½ÆÂø©Ê¡C ¸û·sª©¥»ªº init (¹³¬O 2.58 ª©) ´N¤ñ¸ûºë¨}¤F¡C ¥¦¥i¥H¦b±µ¨ì°T¸¹®É¿ï¾Ü ¤T ­Ó script ¤¤¤§¤@¨Ó°õ¦æ¡C¦p¦¹¤@¨Ó¡A init ¥i¥H¦b±µ¨ì¹q·½Â_¹q°T¸¹®É°õ¦æ powerfail script ¡A¥i¥H°õ¦æ¤@­Ó powerfailnow script °µ¥ß§YªºÃö¾÷ ¡A¥H¤Î ¤@­Ó powerok script ¨Ó°±¤î¥ô¦ó¥¿¦b¶i¦æªºÃö¾÷°Ê§@¡C³o¼Ë¤ñ°_­n§Ú­Ì¦Û¦æ³B ²z³o¨Ç¾÷¨î­n²³æ¦h¤F¡C ¾¨ºÞ³oùؤj³¡¤Àªº°Q½×¤´°²³]¨Ï¥Îªº init ³q°T¤è¦¡¡A §Ú¤w¥[¤J¤F¨â­Ó·sªº³¹ ¸`¨Ó´y­z·sªº³s½u¤èªk¡C³o¨â­Ó³¹¸`¬O <@ref>ciroTrust Energy Protector 400/650 ¤Î <@ref>ciroTrust Energy Protector 400/650<@ref>apc700APC Smart-UPS 700¡C¨ä¤¤«eªÌ¯S§O¸Ô²Ó¡C¤GªÌ³£¥]§t¤F¤@­Ó powerd.c ÀÉ¡A ¥¦¥i¥H¦b¦¬¨ì§C¹q ¤O°T¸¹®É°e°T¸¹µ¹ init ¥H¶i¦æºò«æÃö¾÷¡A ´N¹³¬O /etc/inittab Àɤ¤¨º´X¦æ©Ò ¼gªº¤@¼Ë¡C¨ä¾lªº¡A §Ú©Ò¯à§i¶D±zªº´N¥u¦³½Ð±z¬Ý¬Ý init ªº­ì©l½X¤F¡C ´N§Ú©Òª¾ªº¡A¦b¥H¤U©Ò¦Cªº UPS ³nÅé®M¥ó¤¤¦³³\¦h¤]±Ä¥Î¤F·s¦¡ªº³s½u¤è¦¡¡C 3. Áo©úªº»P³æ½Õªº UPS UPS ¤j¦Ü¤À¬°¨âÃþ¡A§Ú¤À§O¥s¥¦­Ì ``Áo©úªº (Smart)''»P ``³æ½Õªº (Dumb)''¡C ¤GªÌ¤§¶¡ªº®t²§¦b©ó§Ú­Ì¯à¦Û UPS Àò±o¦h¤Öªº°T®§¥H¤Î§Ú­Ì¯à°÷¹ï UPS ¤U¹F¦h ¤Ö©R¥O¡C ³æ½Õªº UPS + ÂǥѧǦCªú (serial port) »P¹q¸£¬Û³s¡C + ¨Ï¥Î modem ±±¨î½u»P¹q¸£¬Û³q°T¡C + ¥i¥H¦b¹q¤O¬O§_®ø¥¢®Éµ¹¹q¸£°e°T¸¹¡C + ¤]³\¥i¥H¦b UPS ªº¹q¤O¬O§_°¾§C®É³qª¾¹q¸£¡C + ¹q¸£³q±`¥i¥H°e°T¸¹µ¹ UPS Åý¥¦±N¦Û¤vÃö³¬¡C Áo©úªº UPS + ÂǥѧǦCªú (serial port) »P¹q¸£¬Û³s¡C + ¥H¤@¯ëªº¸ê®Æ¶Ç¿é½u¸g§Ç¦Cªú»P¹q¸£·¾³q¡C + ¦h¥b¦³¤@²Õ©R¥O»y¨¥¥i¥HÅý¹q¸£¦Û UPS ¨º±oª¾¦U¦¡¦U¼Ëªº¸ê°T¡A ¥H³] ©w¦UºØ¹B§@°Ñ¼Æµ¹ UPS¡A¦P®É¤]¾Þ§@ UPS (¹³¬O±N¥¦Ãö±¼) ³q±`Áo©úªº UPS ³£¥i¥H¦b³æ½Õªº¼Ò¦¡¤U¾Þ§@¡C³o¬O«Ü¦³¥Îªº¡A¦]¬°´N§Ú©Òª¾¡A ³Ì±`¨£ªºÁo©ú UPS (¹³¬O APC) »s³y°Ó¥uÄ@·N³zÅS¥L­Ìªº UPS ³q°T¨ó©wµ¹¨º¨Çñ ¸p¤Fµ´¤£¬ªÅS¾÷±K¦P·N®Ñªº¤H­Ì¡C ´N§Ú©Òª¾¡A¥u¦³ BEST ¤½¥q©Ò»s§@ªº UPS ¥i¥H«Ü®e©ö¦a¦b Linux ¤U¹B§@¡C °£¦¹ ¤§¥~¡A BEST ¤½¥qÁÙ¦³§¹¾ãªº¤å¥ó»¡©ú¤F¥L­Ìªº UPS ªºÁo©ú¼Ò¦¡ (¥H¤Î³æ½Õ¼Ò ¦¡)¡C BEST ¤½¥q¤]´£¨Ñ¤F¥i¥H»P¥L­Ìªº UPS ·¾³qªºµ{¦¡ªº­ì©l½X¡C ©Ò¦³¦C¦b [29]³nÅé ³¹¸`ªº³nÅé¬Ò¥i¦b³æ½Õ¼Ò¦¡¤U»P UPS ·¾³q¡C³o¨Ç³£¬O±z¯u¥¿ »Ý­nªº¡C¦³¨Ç³nÅé«h«ÅºÙ»¡¥i¥H¦bÁo©ú¼Ò¦¡¤U¾Þ§@ ARC UPS ¡A¦ý§Ú¤£ª¾¹D¥L­Ì¬O ¦p¦óÀò­ã¦Ó°µ¨ìªº¡C ¤@­Ó§¹¾ãªºµ{¦¡¹B§@·|¸õ¥X¤@­Óµøµ¡¡AùØÀY¥]§t¤F¦³½ìªº«× ¶qªí¡A ¥NªíµÛ¦U¦¡¦U¼Ëªº UPS ²Î­p¸ê®Æ¡A¹³¬O­t¸üµ{«×¡B¤º³¡·Å«×¡BÂ_¹q°O¿ý ¡B¿é¤J¹qÀ£¡B ¤Î¿é¥X¹qÀ£ ...... µ¥µ¥¡C¬Ý°_¨Ó¦ü¥G smupsd-0.7-1.i386.rpm µ{¦¡ (¨£ [30]³nÅé¤@¸`) ¥i¥H°µ¨ì³o¨Ç¡C ¹ï©ó¨ä¥Lªº³nÅé§Ú«h¤£´±½T©w¡C ¥H¤Uªº¤º®e§Ú±NºÉ¶q»±­­©ó¦p¦ó½Õ¾ã±zªº¨t²Î¨Ï¨ä¯à»P³æ½Õ¼Ò¦¡¤Uªº UPS ¤@°_¤u §@¡C ¦Ó¹ïÁo©ú¼Ò¦¡ªº UPS ¦Ó¨¥¡A°ò¥»·Qªk¬O¤@¼Ëªº¡A¦ý»Ý­n¤°»ò¼Ëªº powerd °Ñ»P¤u§@¥H¤Î±z»Ý­n¤°»ò¼Ëªº°T¸¹Æl½u¬OÀHµÛ UPS ¦Ó¦³¤£¦Pªº¡C 4. ³nÅé °ò¥»¤W¡A±z©Ò»Ýªº´N¬O¤@­Ó¥i¥H¤u§@ powerd µ{¦¡ÀÉ¡A³q±`±z¥i¥H¦b /sbin/powerd ¤U§ä¨ì¥¦¡C¥¦³q±`¬OÄÝ©ó SysVinit ¨t²Îªº¤@³¡¤À¡C ´N§Ú©Òª¾¡A ©Ò¦³ªñ´Áª©¥»ªº Linux ¨t²Î³£¥]§t¤F¤@­Ó¸û·sª©ªº SysVinit ¡C ¦ý¦b«D±`ªº ª©¥»«h¤£¥]§t powerd¡C °ß¤@ªº°ÝÃD¬O±zªº°T¸¹Æl½u¥i¯à¤£¯à»P±zªº powerd ³]©w¬Û°t¦X¡A ¦b³o±¡ªp¤U±z ¥²¶·­«·s°µ¤@±ø°T¸¹Æl½u¡A©ÎªÌ¬O§ä¨Ó¤@¥÷ powerd.c Àɨíק復¨Ï±o¥¦¯à°t¦X ±zªº°T¸¹Æl½u¤u§@¡C©ÎªÌ¬O¡A ±z¥i¥H¨Ï¥Î¥H¤U©Ò¦Cªº³nÅé¡A¤j³¡¤Àªº³nÅ餹³\±z °µ¾A·íªº³]©w¥H°t¦X±zªº°T¸¹Æl½u¡C ´N¹³­è­è©Ò´£¨ìªº¡A°£¤F¨Ï¥Î SysVinit ªº powerd ¤§¥~±z¤]¥i¥H®³²{¦³ªº¥ô¦ó ¤@ºØ UPS ³nÅé¨Ó¥Î¡C¥Ø«e¦³³\¦h³nÅé¥i¥HÀ°§U±z«Ø¥ß¹q¸£»P UPS ¤§¶¡ªº³s½u¡C ¦b§Ú²Ä¤@¦¸¼g³o½g HOWTO ®É³£ÁÙ¨S¦³³o¨Ç³nÅé¡A ¦Ó³o¤]¬O¬°¤°»ò§Ú­n¼g³o½g HOWTO ¡C¨Æ¹ê¤W¡A±z¤]¥i¥H±q¤¤¿ï¤@­Ó³nÅé¨Ó¥Î¡A ¦Ó§¹¥þ©¿²¤³o½g HOWTO ªº¤º ®e¡C ¦b 1997 ¦~ 3 ¤ë 15 ¤é¥ª¥k¡A [31]Sunsite ªº UPS ¥Ø¿ý ¤U¥i¥H§ä¨ì¤@¤j°ïªº ³nÅé¥i¥Î¡C¦Ó¦b¨ä¥Lªººô¯¸¦ü¥G¤]¦³ UPS ±±¨î³nÅé¥i¥H§ä¨ì¡C ¥H¤U¬O§Ú¥Ø«e©Ò §ä¨ìªº (°£¤F¨ä¤¤¨â­Ó¥H¥~¡A¨ä¥L³£¬O¦b sunsite §ä¨ìªº): [32]Enhanced_APC_BackUPS.tar.gz ³o¬O¤@­Ó¥i¥H±±¨î APC Áo©ú¼Ò¦¡ªº UPS ¡C¬Ý°_¨Ó°ò¥»¤W¬O¨Ì¾Ú BUPS Howto (¥]§t¤F³o¤@½g) ¡A¦ý¤]¦n¹³¦³¤@¨Ç§C¹q¤Oĵ§iªº¤ä´©¡C [33]Enhanced_APC_UPSD-v1.4.tar.gz ¦b .lsm Àɤ¤´£¨ì¥¦±q«e´N¬O¤W¤@­Ó©Ò´£¨ìªº³nÅé¡A ¦ý¨Æ¹ê¤W¥¦¥¿¬O±N ¤W¤@­Ó³nÅ骺 .tar.gz ÀÉ¥]¸Ë¦b¥¦ªº tar.gz Àɤ§¤º¡C¨º½g¤å¥ó»¡©ú¦³ °ÝÃD¡A¬Ý°_¨Ó¥¦¦ü¥G¦P®É¤ä´© APC UPS ªºÁo©ú»P³æ½Õ¼Ò¦¡¡A¦ý§Ú¤£´±½T ©w¡C [34]apcd-0.5.tar.gz ³o¬O¥t¤@­Ó¥i¥H±±¨î APC UPS ©óÁo©ú¼Ò¦¡¤U¹B§@ªº³nÅé¡C ¬Ý°_¨Ó¦ü¥G¥i ¥H¤ä´©¥D/±q¼Ò¦¡ (¤]´N¬O»¡¡A·í°±¹q®É¥i¥H¥Ñ¤@¥x¾÷¾¹°e°T¸¹µ¹¥t¤@¥x ¾÷¾¹¥s¥¦Ãö¾÷) ¡C ¬Ý°_¨Ó¦ü¥G¬O¨Ï¥Î¤F UPS ªºÁo©ú¼Ò¦¡¡A¤£¹³¬O¸g¥Ñ modem ªº°T¸¹½u¨Ó±±¨î¡C [35]smupsd directory ¤S¬O¥t¤@­Ó±±¨î APC UPS ªº³nÅé¡C¬Ý°_¨Ó¥i¥H¦b«D±`Áo©ú (tm) ¼Ò¦¡¤U ¾Þ§@ UPS ¡CÁ|¨Ò¨Ó»¡¡A¥¦¥]§t¤F¤@­Ó Java ¹Ï§Î¤¶­±ªº UPS ºÊ±±¤u¨ãµ{ ¦¡¡C ¸Ó¥Ø¿ý¤U¥]§t¤F¤w½sĶ¦nªº RPM §Î¦¡ªº³nÅé ( [36]ftp://cms180.cmsnet.com/pub/smupsd/smupsd-0.7-1.i386.rpm) ¡A ¤@­Ó­ì©l½X RPM ®æ¦¡ÀÉ ( [37]ftp://cms180.cmsnet.com/pub/smupsd/smupsd-0.7-1.src.rpm) ¡A ¥H¤Î¤@­Óðé§ÚÀÉ®× ( [38]ftp://cms180.cmsnet.com/pub/smupsd/smupsd-0.7-1.README) ¡C [39]genpower-1.0.1.tgz ¤@­Ó¤@¯ë¤Æªº UPS ±±¨î³nÅé¡C¥¦¥]§t¤F«Ü¦hºØ UPS ªº³]©w --- ¨âºØ TrippLite ªº³]©w¡A¥H¤Î¤TºØ APC ªº³]©w¡C¦P®É¤]¥]§t¤F«Ü¦nªº»¡©ú¤å ¥ó¡Cª«¶W©Ò­È¡C [40]powerd-2.0.tar.gz ¤@­Ó SysVinit ªº powerd µ{¦¡ªº´À¥N«~¡C »P¥¦ªº»¡©ú¤å¥ó©Ò´£¨ìªº¬Û ¤Ï¡A¥¦¦ü¥G¨S¦³¾ã¦X¨ì SysVinit 2.62 ª©¤¤¡C¥¦ªºÀuÂI¦b©ó¥¦¥i¥H°µ¬° ¦b¨ä¥L¾÷¾¹¤W°õ¦æªº powerd ªº¦øªAºÝ (°²¦p±zªº¾÷¾¹¦³³s¤Wºô¸ô¥B¥u¦³ ¤@­Ó UPS ªº¸Ü) ¡A¦Ó¥B¥¦¥i¥H¥Î³]©wÀɨӶi¦æ³]©w ---- ¬G¨ä­ì©l½X¤£ »Ý­×§ï¤Î­«·s½sĶ¡C [41]upsd-1.0.tgz ¥t¤@­Ó powerd ªº´À¥N«~¡C¬Ý°_¨Ó¦ü¥G»P powerd-2.0.tar.gz ¦³³\¦h¬Û ¦üªº¯S¦â¡C [42]checkups.tar ³o­Ó³nÅé¬O¥Î¨Ó±±¨î Best UPS ªº¡C¥¦¬Oª½±µ¨Ó¦Û Best ¤½¥qªººô­¶ªº¡C ¥¦¥]§t¤F¦hºØ unix ªº¥i°õ¦æÀÉ¡A¦ý§ó­«­nªº¬O¡A¥¦ÁÙ¥]§t¤F­ì©l½X¡A ¬G±z¥i¥H¦b Linux ¤U´ú¸Õ¥¦¡A¦Ó¥B°²¦p¥¦µLªk¤u§@¡A±z¤]¥i¥H¸ÕµÛ­×§ï ¥¦¡C ¦¹­ì©l½X¦P®É¥]§t¤F¦b³æ½Õ¼Ò¦¡¤U±±¨î UPS ªº "°ò¥»ÀË´ú" «ü¥O¡A ¥H¤Î¤@¨Ç§óºë¥©ªº "¥ý¶iÀË´ú" «ü¥O --- ·í UPS ¦^³ø»¡¥¦¥u³Ñ X ¤ÀÄÁ ªº¹q¤O®É§Yµo¥XÃö¾÷ªº°T¸¹¡A¦Ó¤£¬Oµ¥¨ì X ¤ÀÄÁ«á¹q¤O³£¥Î¥ú¤F¤~¶}©l Ãö¾÷¡C ¦¹¥ý¶iÀË´úµ{¦¡¤]·|¦b UPS µo¥X¹³¬O©P³òÀô¹Ò·Å«×¹L°ª¡B±µªñ§C ¹q¤O¡B §C¥æ¬y¹q¿é¥X¡B©ÎªÌ¬O¨Ï¥ÎªÌ´ú¸Õµ¥Äµ§i®ÉÃö³¬¾÷¾¹¡C [43]bestups-0.9.tar.gz ¥i¯à¦b±zŪ¨ì³o½g¤å³¹®É¡A¦¹¦b sunsite ¥i¥H§ä±o¨ìªº³nÅé¤wµo®i±o«Ü ¦n¤F¡C ¥¦¬O¤@¹ï¥i¥H¬Û¤¬³q°Tªº¼Ò²Õ¡A¥Î¥H±±¨î Best Ferrups UPS¡C¥¦ ¥i¥H¦bÁo©ú¼Ò¦¡¤U ±±¨î UPS ¡C¥¦¥i¥H»P powerd-2.0 ¦X§@¾Þ±± --- ³o ¤@ÂI¦b·í±z¦³¤@­Ó¤j«¬ªº Best Ferrups UPS ¤ä´©³s±µ¦bºô¸ô¤W¾÷¾¹ªº¹q ¤O®É®æ¥~¦³¥Î¡C ½Ðª`·N§Ú¥u¬O§Ö³t¦aÂsÄý¹L³o¨Ç³nÅé¡C§Ú¨Ã¨S¦³¥Î¥¦­Ì¡A°£¤F¨º­Ó§Ú­Ì¤~¶}©l¨Ï ¥Îªº [44]bestups-0.9.tar.gz ¥H¤Î [45]powerd-2.0.tar.gz ¡A ¨ä¤¤ ``¤~¶} ©l'' ·N«ä¬O»¡§Ú­Ì¤~¦b¤W­Ó¬P´Á¥|¶}¨Ï°µ´ú¸Õ¡C 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µ{: * ²¤Åª³o½g¤å¥ó¡C * ¤U¸ü¨Ã¼f¬d©Ò¦³¬Ý°_¨Ó¯S§O¾A¦X±zªº UPS ªº³nÅé¡C * ¤U¸ü¨Ã¼f¬d©Ò¦³§ó¤@¯ë¤Æªº³nÅé¡C½Ðª`·N¦³¨Ç¸û¤@¯ë¤Æªº³nÅé¨Æ¹ê¤W§ó¬°±j ¤j¡B ¦³§ó¦nªº»¡©ú¤å¥ó¡B¥B¤ñ°_¨º¨Ç¸û¯S®íªº³nÅé§ó®e©ö¨Ï¥Î¡C * ¦pªG±z¨ÌµMµLªkÅý UPS ¤u§@¡A©Î¬O±zªº¤è¦V¨Ì¤£²M·¡¡A ½Ð±z¥J²Ó¾\Ū¥» ¤å¡A¨Ã¸Õ¸Õ°µ hack ªº¤u§@ .... 5.1 ±z©Ò»Ýªº¤u§@ (Á`µ²) * ±N±zªº¹q¸£±µ¤W UPS ¡C * ¥Î¯S®íªº°T¸¹Æl½u±N±zªº¹q¸£ªºªº¦ê¦Cªú»P UPS ³s±µ¦b¤@°_¡C * ¦b±zªº¹q¸£¤W¶] powerd (©Î¨ä¥LÃþ¦üªº³nÅé) ¡C * ³]©w±zªº init µ{¦¡¨Ï¥¦¯à¦b powerfail ¤Î powerok ¨Æ¥óµo¥Í®É°µ¾A·íªº ³B²z (¨Ò¦p¤À§O±Ò°Ê shutdown µ{§Ç¤Î°±¤î¥¿¦b°õ¦æªº shutdown µ{§Ç)¡C 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½Ð°Ñ¦Ò [46]°T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c ¤@¸`¡A¨º¨à¦³Ãö©ó¤Ö¨£ªº°T¸¹Æl½u³B²z¤Î­«·s³]©w powerd.c ªº¸ê°T¡C [47]°T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c<@ref>serial-port§Ç¦Cªú±µ¸}ªº«ü©w ¤Î [48]°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½Ð¨£ [49]¦p¦ó»s§@°T¸¹Æl½u ªº¸Ô²Ó»¡©ú¡A¥H¤Î [50]¦p¦ó»s§@°T¸¹Æl½u<@ref>ups-specificUPS ¸ê®Æ¸`¿ï ¤@¸`¤¤¦³Ãö±zªº UPS ªº¤p¸`¡C «áªÌ¥i¯à¤]¥]§t¤F»s³y°Ó©Ò´£¨Ñªº°T¸¹Æl½uªº¬Û Ãö¸ê°T¡C ©Î³\±zÀ³¦Ü¤Ö±N [51]¦p¦ó»s§@°T¸¹Æl½u<@ref>ups-specificUPS ¸ê®Æ ¸`¿ï<@ref>ups-specificUPS ¸ê®Æ¸`¿ï ¤¤©Ò¦³ªº¤p¸`ÂsÄý¹L¤@¹M¡A¦]¬°¨C¤@¤p¸` ³£·|¦³¤@¨ÇÃB¥~ªº¤@¯ë©Ê¸ê®Æ¯à¹ï±z¦³À°§U¡C * ­×§ï /etc/inittab ÀÉ¡C¼g¤J¹³¥H¤Uªº¤º®e: # What to do when power fails (Halt system & drain battery :): pf::powerfail:/etc/powerfailscript +5 # If power is back before shutdown, cancel the running shutdown. pg:0123456:powerokwait:/etc/powerokscript * ¼g /etc/powerfailscript ¤Î /etc/powerokscript ³o¨â­Ó script ÀɤÀ§O ¦b¤­¤ÀÄÁ (©Î¨ä¥L±z³ßÅwªº®É¶¡) ¤§¤º¶i¦æÃö¾÷¤Î°±¤î¥ô¦ó¦s¦bªº shutdown µ{§Ç¡C ¨Ì±z©Ò¥Îªº shutdown µ{¦¡ª©¥»ªº¤£¦P¡A ¥¦¥i¯à·|¬Û·í³æ ²¥H¦Ü©ó±z®Ú¥»¤£»Ý¨Ï¥Î script ÀÉ¡A©ÎªÌ¬O¤@¦æ bash ªº script Àɹ³¬O ¥H¤U³o¤@¦æ: kill `ps -aux | grep "shutdown" | grep -v grep | awk '{print $2}'` (¬°¤FÁקK±z§Ë¿ù¡A¤W¤@¦æ¤¤²Ä¤@­Ó³æ¤Þ¸¹¬O¤Ï¦V³æ¤Þ¸¹¡A²Ä¤G¤Î²Ä¤T­Ó¬O³æ ¤Þ¸¹¡A ¦Ó³Ì«á¤@­Ó«h¬°¤Ï¦V³æ¤Þ¸¹¡C) * ¥Î¥H¤Uªº©R¥O§i¶D init ­«·sŪ¨ú inittab Àɤ¤ªº³]©w: telinit q * ½së® rc.local Àɦb¶}¾÷®É°õ¦æ powerd ¡C¨ä»yªk¦p¤U: powerd ¨ä¤¤¡A½Ð±z¦Û¦æ±N ³o­Ó¦r´À´«¦¨ modem ©Ò³s±µªº§Ç¦Cªú¦W¡A¹³¬O /dev/cua1¡C * ±N¹q¸£ªº§Ç¦Cªú»P UPS ªº°T¸¹Æl½u¬Û³s¡C½Ð¥ý¤£­n±N¹q¸£ªº¹q·½ª½±µ±µ¨ì UPS ¤W¡C * ±N¤@­Ó¥ú·½ (¦p¿Oªw) ±µ¨ì UPS ¤W¡C * °õ¦æ powerd¡C * ¨Ì·Ó¥H¤Uªº¨BÆJ¶i¦æ´ú¸Õ: + ©Þ±¼ UPS ªº´¡ÀY¡C o Àˬd¸Ó¿Oªw¬O§_¤´µM«GµÛ¡C o Àˬd /etc/powerfailscript ¬O§_¤w¶}©l°õ¦æ¡C o Àˬd shutdown ¬O§_¥¿¦b°õ¦æ¡C + ±µ¦^ UPS ªº´¡ÀY¡C o Àˬd¸Ó¿Oªw¬O§_¤´µM«GµÛ¡C o Àˬd /etc/powerokscript ¬O§_¤w¶}©l°õ¦æ¡C o Àˬd /etc/powerfailscript ¬O§_¤w°±¤î°õ¦æ¡C o Àˬd shutdown ¬O§_¤w°±¤î°õ¦æ¡C + ¦A¦¸©Þ±¼ UPS ªº´¡ÀY¡C©ñµÛ¤£¥hºÞ¥¦¨Ã½T©w¹q¸£¦b¤@¬q®É¶¡«á ¥i¥H¥¿ ±`Ãö¾÷¡C + ¦MÀI¨BÆJ¡C ¦b©Ò¦³ªº¨BÆJ¬Ý°_¨Ó³£¥¿±`¤§«á¡A ±N¹q¸£¹q·½Ãö³¬¨Ã±N¹q ¸£ªº¹q·½±µ¨ì UPS ¤W¡C½Ð°õ¦æ¤@­Ó script ¤j¬ù¨C¬íÄÁ°µ¤@¦¸ sync µwºÐ¸ê®Æ¦^¦sªº°Ê§@¡A¦P®É¤]¶]¥t¤@­Ó script «ùÄò¥H find «ü¥O·j´M ¾ãÁûµwºÐ¡C¨ä¤¤²Ä¤@­Ó script ¬O¬°¤F½T«O¦w¥þ¡A¦Ó²Ä¤G­Ó«h¬O§Uªø¹q ¤Oªº®ø¯Ó¡C²{¦b¡A±N UPS ªº´¡ÀY©Þ¥X¡A¦A¦¸Àˬd shutdown ¬O§_¤w¦b ¹B§@¡A¨Ãµ¥«Ý¤@¬q®É¶¡¡C ½T©w¹q¸£¦b UPS ªº¹q¤O¥Î§¹«e§¹¥þ¦aÃö¾÷¡C ¦¹¤@¨BÆJ¬O«Ü¦MÀIªº¡A ¦]¬°¦pªG UPS ªº¹q¤O¦b¹q¸£§¹¦¨Ãö¾÷¤§«e¥ý¥Î §¹¤F¡A ±zªºÀɮרt²Î±N·|¨ü·l¡A¥B±z±N¥i¯à¥á¥¢¤@¨ÇÀɮסC ±z¥i¯à¦b ¶i¦æ³o¶µ´ú¸Õ¤§«e·|·Q­n³Æ¥÷±z©Ò¦³ªºÀɮסA ¨Ã±N¶}©lÃö¾÷ªº®É¶¡³] µu¤@ÂI¥H¶}©l³o¶µ´ú¸Õ¡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ªº§ïµ½ * ­×§ï powerd.c ¨Ï¥¦¦bºÊµø UPS ªº°T¸¹½u®É¯à±oª¾¹q¦À¹q¤O¤w®z¡C ·í¹q¤O ·L®z®É¡A°¨¤W¶i¦æºò«æÃö¾÷µ{§Ç¡C * ­×§ïÃö¾÷µ{§Ç¨Ï¥¦¦b powerfail ±¡ªp¤UÃö¾÷®É¡A ¯à°÷¦b§¹¦¨©Ò¦³¤u§@¤§«á ±N UPS Ãö±¼¡C 6. µwÅ骺ª`·N¨Æ¶µ 6.1 ¦p¦ó»s§@°T¸¹Æl½u ¥»¸`ªº¤º®e¥u¬O¨Ç§Ú¦bºô¸ô¤W¬Ý¨ìªº¸ê°T¡C§Ú¨Ã¨S¦³¿Ë¦Û¸Õ¹L¡A ©Ò¥H§ÚµLªk¨Ì§Ú ªº¸gÅç¼g¤U¨Ó¡C¦pªG¦³¤H¦³¸gÅç¡A³Â·Ð±z¬°§Ú¼g³o¤@¸` :)¡C ¦P®É¤]½Ð±z°Ñ¦Ò <@ref>gps1000ACCODATA ªº GPS1000 ¤¤¦³Ãö GPS1000 ªº¸ê®Æ¡A¤£¥²»¡¡A <@ref>gps1000ACCODATA ªº GPS1000<@ref>ups-specificUPS ¸ê®Æ¸`¿ï ³o¤@¸`¤¤©Ò¦³¯S®í UPS ªº¸ê®Æ¤]¬O­È ±o°Ñ¦Òªº¡C >From miquels@caution.cistron.nl.mugnet.org Wed Jul 21 14:26:33 1993 Newsgroups: comp.os.linux Subject: Re: UPS interface for Linux? From: miquels@caution.cistron.nl.mugnet.org (Miquel van Smoorenburg) Date: Sat, 17 Jul 93 18:03:37 Distribution: world Organization: Cistron Electronics. In article <1993Jul15.184450.5193@excaliber.uucp> joel@rac1.wam.umd.edu (Joel M. Hoffman) writes: > §Ú¥¿¥´ºâ­nÁʶR UPS (¤£Â_¹q¨t²Î)¡A§Úª`·N¨ì¦³¨Ç¨ã¦³ LAN ªº¤¶­±¡A > ¥i¥H¦b°±¹q®É¦V LAN °e°T¸¹¡C > > ¦Ó Linux ¦³¨S¦³³o¼Ëªº¤¶­±©O? > > ÁÂÁ±zªº¦^µª¡C > >-Joel >(joel@wam.umd.edu) > ·í§Ú¦b­×§ï¤W¤@ª©ªº SysVinit ®É (²{¦bªºª©¥»¬O 2.4)¡A ¨º®É§Úªº¹q¸£¦³¤@­Ó UPS ¡A©Ò¥H§Ú¥[¤J¤F¹ï¥¦ªº¤ä´©¡C ±z¤]³\¤w¦b³Ìªñªº¤@­Ó ¼ÐÀYÀɤ¤¬Ý¨ì¤F #define SIGPWR 30 ³o¤@¦æ :-)¡CÁ`¤§¡A§Ú¨Ã¨S¦³¨º­Ó¯S®íªº¤¶­±¡A¦ý¤j¦h¼Æªº UPS ¬O¾a²£¥Í©Î¤¤Â_¤@­Ó¹q·½¤¤Â_°T¸¹¦b¹B§@ªº¡C §Ú·Q¨ì¤@­Ó²³æªº¤è¦¡¥i¥H±N¥¦ªº°T¸¹½u³s±µ¨ì¹q¸£°T¦Cªúªº DCD ±µ¸}¡C¦b SysVinit ®M¥ó¤¤¦³¤@­Ó¥s°µ 'powerd' ªº±`¾nµ{¦¡¥i¥H°lÂܨúʵø¸Ó°T¸¹½u¡A·í°T¸¹ªºª¬ºA§ïÅܮɥ¦·|°e¤@­Ó SIGPWR ªº°T¸¹µ¹ init µ{¦¡¡A¦]¦¹ init «K¥i¥H±Ä¨ú¾A·íªº¦æ°Ê (¹³¬O¦b 5 ¤ÀÄÁ¤§«áÅý¨t²ÎÃö¾÷) ¡C¦p¦ó±N°T¸¹½u»P UPS ¬Û³s¦b "powerd.c" ¤w¦³»¡©ú¡A¦ý§ÚÁÙ¬O¹Ï¥Ü¦p¤U¥H°µ¬°¸ÑÄÀ: +------------------------o DTR | +---+ | | resistor | | 10 kilo-Ohm | | +---+ To serial port. | +-----o-------+------------------------o DCD | | o UPS | \ relais | \ | | | +-----o-------+------------------------o GND µe±oÁÙ¥i¥H¶Ü? §Æ±æ³o¼Ë·|¦³À°§U¡C SysVinit ¥i¥H¦b sunsite (©Î¥i¯à¦b tsx-11) ¤U§ä¨ì¡AÀɦW¬O SysVinit2.4.tar.z ¡C Mike. -- Miquel van Smoorenburg, Ibmio.com: cannot open CONFIG.SYS: file handle broke off. >From danny@caution.cistron.nl.mugnet.org Wed Jul 21 14:27:04 1993 Newsgroups: comp.os.linux Subject: Re: UPS interface for Linux? From: danny@caution.cistron.nl.mugnet.org (Danny ter Haar) Date: Mon, 19 Jul 93 11:02:14 Distribution: world Organization: Cistron Electronics. In article <9307174330@caution.cistron.nl.mugnet.org> miquels@caution.cistron.nl.mugnet.org (Miquel van Smoorenburg) writes: > ¦p¦ó±N°T¸¹½u»P UPS ¬Û³s¦b "powerd.c" ¤w¦³»¡©ú¡A > ¦ý§ÚÁÙ¬O¹Ï¥Ü¦p¤U¥H°µ¬°¸ÑÄÀ: ¸Ó¹Ï¥Ü¨Ã¤£¤Q¤À²M·¡¡A½Ð§ï¥Î¥H¤Uªº¹Ï¥Ü! > > +------------------------o DTR > | > +---+ > | | resistor > | | 10 kilo-Ohm > | | > +---+ To serial port. > | > +-----o-------+------------------------o DCD > | > o UPS > \ relais > \ > | > +-----o--------------------------------o GND > ¨ä¤¤ DTR ±µ¸}¬O«O«ù¦b°ª¹q¦ì¡A«h·í UPS ªº¥~¬É¿é¤J¹q·½®ø¥¢®É¡A ¨º­Ó¶}Ãö (relais) ·|Ãö³¬¡C¦Ó¹q¸£«K¬OºÊµø DCD ¿é¤J±µ¸}¡Aµ¥µÛ¥¦Åܦ¨§C¹q¦ì¡C ·í¨Æ±¡µo¥Í®É¥¦±N·|±Ò°ÊÃö¾÷µ{§Ç ... _____ Danny -- <=====================================================================> Danny ter Haar or Robins law #103: 'a couple of lightyears can't part good friends' 6.2 °T¸¹Æl½u¤Ï¦V¤ÀªR¤Î­×§ï power.c References 1. mailto:abel@netvision.net.il 2. http://sunsite.unc.edu/pub/Linux/system/ups 3. http://sunsite.unc.edu/pub/Linux/system/ups 4. mailto:hennus@sky.owl.nl 5. mailto:mefistos@impsat1.com.ar 6. mailto:ciro@stud.unipg.it 7. mailto:npc@minotaur.jpl.nasa.gov 8. mailto:angit@netcom.com 9. mailto:Markus@eiden.de 10. mailto:dan@fch.wimsey.bc.ca 11. mailto:bgallia@orion.it.luc.edu 12. mailto:dth@cistron.nl 13. mailto:docwhat@uiuc.edu 14. mailto:inglesra@frc.com 15. mailto:pkammer@ics.uci.edu 16. mailto:ind43@sun1000.ci.pwr.wroc.pl 17. mailto:ockers@umr.edu 18. mailto:fnevgeny@plasma-gate.weizmann.ac.il 19. mailto:cas@vjet.demon.co.uk 20. mailto:miquels@cistron.nl 21. mailto:ts@polynet.lviv.ua 22. mailto:webster@kaiwan.com 23. ftp://navigator.jpl.nasa.gov/pub/doc/faq/UPS.faq 24. ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/answers/UPS-faq 25. mailto:npc@minotaur.jpl.nasa.gov 26. http://www.upssystems.uk.com/upsdir.html 27. http://www.upssystems.uk.com/upsfaqs.html 28. http://sunsite.unc.edu/pub/Linux/system/daemons/init/sysvinit-2.64.tar.gz 29. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#software 30. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#software 31. http://sunsite.unc.edu/pub/Linux/system/ups 32. http://sunsite.unc.edu/pub/Linux/system/ups/Enhanced_APC_BackUPS.tar.gz 33. http://sunsite.unc.edu/pub/Linux/system/ups/Enhanced_APC_UPSD-v1.4.tar.gz 34. http://sunsite.unc.edu/pub/Linux/system/ups/apcd-0.5.tar.gz 35. ftp://cms180.cmsnet.com/pub/smupsd/ 36. ftp://cms180.cmsnet.com/pub/smupsd/smupsd-0.7-1.i386.rpm 37. ftp://cms180.cmsnet.com/pub/smupsd/smupsd-0.7-1.src.rpm 38. ftp://cms180.cmsnet.com/pub/smupsd/smupsd-0.7-1.README 39. http://sunsite.unc.edu/pub/Linux/system/ups/genpower-1.0.1.tgz 40. http://sunsite.unc.edu/pub/Linux/system/ups/powerd-2.0.tar.gz 41. http://sunsite.unc.edu/pub/Linux/system/ups/upsd-1.0.tgz 42. http://www.bestpower.com/section/software/checkups.tar 43. http://sunsite.unc.edu/pub/Linux/system/ups/bestups-0.9.tar.gz 44. http://sunsite.unc.edu/pub/Linux/system/ups/bestups-0.9.tar.gz 45. http://sunsite.unc.edu/pub/Linux/system/ups/powerd-2.0.tar.gz 46. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#hacking 47. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#hacking 48. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#hacking 49. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#make-cable 50. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#make-cable 51. file://localhost/tmp/zh-sgmltools.14833/UPS-HOWTO.txt.html#make-cable