Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4:Update
nut.794
README.SUSE
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File README.SUSE of Package nut.794
COnfiguration and use of NUT in SuSE You have two basic ways to install nut: - nut-hal - HAL addon, which will provide handling of USB UPS devices via the standard HAL power management, allowing to reuse power management tools of desktop systems. It needs no configuration and no special setup. On the other hand, it supports only locally attached USB UPS. - nut-classic - Uses dedicated UPS daemon, which works with all types of connection, features UPS monitoring and network UPS management. It is not integrated with desktop power management and you need dedicated tool for monitoring your UPSes. And two additional packages: - nut-drivers-net - two additional drivers for network communication of UPS daemons. You will need for advanced configuration (e. g. if you want to manage shutdown of more computers sharing the same UPS). - nut-cgi provides support for monitoring UPS web pages using apache web browser. Predefined address is http://localhost/nut/index.html nut-hal Configuration If your device is an USB UPS attached locally, nut-hal needs no configuration. Otherwise you need to use nut-classic. nut-classic Configuration NUT is pre-configured to use a local or remote UPS as far as possible. But it still requires a minimal manual configuration before the first use. This document contains: - How to configure local or remote UPS (mandatory reading). - How to configure to suspend to disk (optional reading). - What to do in environment with possible service timeouts (optional reading). The default setup uses one local UPS. You have to define UPS type in file /etc/ups/ups.conf. It requires only few adoptions before you can start the service: * Configuration of a locally connected UPS: In /etc/ups/ups.conf: - Go to the [myups] section at the end of the file. - Set driver key to the driver name supporting your UPS. (see /usr/lib/ups/driver/ for possible drivers. Each driver has a man page. Many USB UPSes are usbhid-ups.) - Set port key to the device your UPS is connected to, e.g. /dev/ttyS0 for first serial port (COM1) or /dev/hiddev0 for USB HID UPS. - Adjust desc key as you want. Start the service: - "/etc/init.d/upsd start" * Configuration of a UPS connected to a remote machine: In /etc/ups/ups.conf: - Comment out or remove the [myups] section at the end of the file. In /etc/ups/upsmon.conf: - Find the uncommented MONITOR line followed by "myups@localhost" and change it to: MONITOR myups@remote_machine 1 upsslave remote_password slave Where: remote_machine is a hostname of the remote machine. remote_password is the password used for upsslave on the remote machine (you can find it in the remote file /etc/ups/upsd.users). In /etc/ups/hosts.conf: - Find the uncommented MONITOR line followed by "myups@localhost". - Change the hostname from "localhost" to the hostname of the remote machine. - Change the description as you want. In the remote /etc/ups/upsd.conf: - Add a rule for the remote clients relevant to your network or your needs. Standard local networks are: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 ACL my_network 192.168.0.0/16 ACCEPT my_network In the remote /etc/ups/upsd.users: - Find the line allowfrom for upsslave user. - Add your local machine name to the allowfrom list. In the remote SuSE firewall: - Enable nut (Network UPS Tools) service (port 3493), e. g. by "YaST2 firewall". Start the service: - "/etc/init.d/upsd start" on both local and remote machines. - If you have edited configuration of a running server, run "/etc/init.d/upsd reload" * Test the configuration using upsc or upslog: - "upsc myups@localhost" Should display information about the UPS status. - "upslog -s myups@localhost -l -" Should display UPS status log every 30 seconds. (Press Ctrl-C keys to stop upslog). Notes: - Predefined user upsmaster There are two predefined users - upsmaster and upsslave. The passwords for them are generated during the installation (see the "password" lines in /etc/ups/upsd.users). User upsmaster has privileges to shut down master machine (default for local UPS), upsslave has privileges to shut down slave machines. If you change it, or add another user, don't forget to adopt the MONITOR lines in upsmon.conf on all machines using this user and password combination to connect to the upsd. Suspend to disk If you want to configure nut to do suspend to disk instead of shutdown you should: - Verify, that suspend to disk works correctly with your desktop: powersave -U (You can lose your unsaved data, if your computer does not support suspend.) - Change SHUTDOWNCMD in /etc/ups/upsmon.conf to: SHUTDOWNCMD "/usr/bin/powersave -U" - Verify, that your UPS provides reasonable grant period to complete suspend in all situations. Environment with possible service timeouts In some environments, there is no guarantee, that the machine will correctly shut down, either because other machines providing critical services are already down or because some services (e. g. squid) are stopping too long and battery power is not sufficient. In this case, you can prefer incorrect but fast shutdown. To fix this problem, you need to do: - Copy upsd-early-powerdown script to your /etc/init.d/ directory. - Edit following lines: Replace "FIXME scripts which should not stop before powerdown" by an appropriate init script list. Replace "FIXME scripts which should stop before powerdown" by an appropriate init script list. - Start YaST Runlevel Editor and enable this meta-service in runlevels, where you want to apply early shutdown.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor