Setup apcupsd » Historie » Version 3
Jeremias Keihsler, 12.01.2017 09:35
1 | 1 | Jeremias Keihsler | h1. Install apcupsd |
---|---|---|---|
2 | |||
3 | h2. Requirements |
||
4 | |||
5 | To install apcupsd you will need the following: |
||
6 | 3 | Jeremias Keihsler | * a installed and supported operating system (e.g. CentOS 6.x) |
7 | * root-access |
||
8 | * a fast internet connection |
||
9 | 1 | Jeremias Keihsler | |
10 | h2. Preliminary Note |
||
11 | |||
12 | using USB connection instead of the default RS232 |
||
13 | This setup works with: |
||
14 | |||
15 | 2 | Jeremias Keihsler | |_.MODEL |_.FIRMWARE |_.SERIALNO |_.system | |
16 | 1 | Jeremias Keihsler | |Smart-UPS 1000 |COM 02.1 / UPS.05.I |AS1116113737 |H02 | |
17 | |Smart-UPS 1000 |652.19.I USB FW:11. |US1225102784 |12005 | |
||
18 | |Smart-UPS 750 |UPS 08.3 / ID=18 |AS1222222311 |11015 | |
||
19 | |||
20 | h2. Install |
||
21 | |||
22 | <pre><code class="bash"> |
||
23 | yum install apcupsd |
||
24 | </code></pre> |
||
25 | |||
26 | h2. Configure apcupsd |
||
27 | |||
28 | <pre><code class="bash"> |
||
29 | vim /etc/apcupsd/apcupsd.conf |
||
30 | </code></pre> |
||
31 | |||
32 | <pre> |
||
33 | UPSCABLE usb |
||
34 | |||
35 | UPSTYPE usb |
||
36 | DEVICE |
||
37 | |||
38 | BATTERYLEVEL 50 |
||
39 | |||
40 | MINUTES 15 |
||
41 | |||
42 | TIMEOUT 360 |
||
43 | |||
44 | KILLDELAY 5 |
||
45 | |||
46 | WAKEUP 60 |
||
47 | </pre> |
||
48 | |||
49 | 2 | Jeremias Keihsler | h2. Start apcupsd |
50 | 1 | Jeremias Keihsler | |
51 | manually start apcupsd: |
||
52 | <pre><code class="bash"> |
||
53 | /etc/init.d/apcupsd start |
||
54 | </code></pre> |
||
55 | |||
56 | automatically start the service at boot time: |
||
57 | <pre><code class="bash"> |
||
58 | /sbin/service apcupsd on |
||
59 | </code></pre> |
||
60 | |||
61 | you can check the runlevels by |
||
62 | <pre><code class="bash"> |
||
63 | /sbin/chkconfig --list apcupsd |
||
64 | </code></pre> |
||
65 | you should get an output like: |
||
66 | <pre><code class="bash"> |
||
67 | apcupsd 0:off 1:off 2:off 3:on 4:off 5:on 6:off |
||
68 | </code></pre> |
||
69 | |||
70 | h2. Usage |
||
71 | |||
72 | <pre><code class="bash"> |
||
73 | /etc/init.d/apcupsd status |
||
74 | </code></pre> |
||
75 | |||
76 | h2. Test |
||
77 | |||
78 | * connect server to "permanent" power supply |
||
79 | * connect server to UPS via USB-cable |
||
80 | * test data-reading |
||
81 | * unplug UPS from supply |
||
82 | * you should get "on battery" warning |
||
83 | * after some time server should initiate shutdown |
||
84 | * after some more time UPS should kill itself |