nut/docs/man/upsdrvctl.txt

114 lines
3.2 KiB
Text
Raw Normal View History

2022-06-29 10:37:36 +00:00
UPSDRVCTL(8)
2011-01-26 09:35:08 +00:00
============
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
NAME
----
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
upsdrvctl - UPS driver controller
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
SYNOPSIS
--------
2022-06-29 10:37:36 +00:00
2011-01-26 09:35:08 +00:00
*upsdrvctl* -h
*upsdrvctl* ['OPTIONS'] {start | stop | shutdown} ['ups']
DESCRIPTION
-----------
*upsdrvctl* provides a uniform interface for controlling your UPS drivers.
2010-03-25 23:20:59 +00:00
You should use upsdrvctl instead of direct calls to the drivers
whenever possible.
When used properly, upsdrvctl lets you maintain identical startup
scripts across multiple systems with different UPS configurations.
2022-06-29 10:37:36 +00:00
Note: For operating systems with service management frameworks, such as
Solaris SMF or Linux systemd, the *upsdrvsvcctl* may be a better choice.
2011-01-26 09:35:08 +00:00
OPTIONS
-------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*-h*::
Display the help text.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*-r* 'directory'::
If starting a driver, this value will direct it to *chroot*(2) into
'directory'. This can be useful when securing systems.
2010-03-25 23:20:59 +00:00
This may be set in the ups.conf with "chroot" in the global section.
2011-01-26 09:35:08 +00:00
*-t*::
2010-03-25 23:20:59 +00:00
Enable testing mode. This also enables debug mode. Testing mode makes
upsdrvctl display the actions it would execute without actually doing them.
Use this to test out your configuration without actually doing anything
to your UPS drivers. This may be helpful when defining the 'sdorder'
2011-01-26 09:35:08 +00:00
directive in your linkman:ups.conf[5].
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*-u* 'username'::
If starting a driver, this value will direct it to *setuid*(2) to
the user id associated with 'username'.
2010-03-25 23:20:59 +00:00
If the driver is started as root without specifying this value, it will
use the username that was compiled into the binary. This defaults to
"nobody", and is far from ideal.
This may be set in ups.conf with "user" in the global section.
2011-01-26 09:35:08 +00:00
*-D*::
2010-03-25 23:20:59 +00:00
Raise the debug level. Use this multiple times for additional details.
2022-06-29 10:37:36 +00:00
*-d*::
Pass the selected debug level from `upsdrvctl` to launched drivers.
2011-01-26 09:35:08 +00:00
COMMANDS
--------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
upsdrvctl supports three commands - start, stop and shutdown. They take
an optional argument which is a UPS name from linkman:ups.conf[5].
2010-03-25 23:20:59 +00:00
Without that argument, they operate on every UPS that is currently
configured.
2011-01-26 09:35:08 +00:00
*start*::
2014-04-22 18:39:47 +00:00
Start the UPS driver(s). In case of failure, further attempts may be executed
by using the 'maxretry' and 'retrydelay' options - see linkman:ups.conf[5].
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
*stop*::
2010-03-25 23:20:59 +00:00
Stop the UPS driver(s).
2011-01-26 09:35:08 +00:00
*shutdown*::
2010-03-25 23:20:59 +00:00
Command the UPS driver(s) to run their shutdown sequence. Drivers are
2011-01-26 09:35:08 +00:00
stopped according to their sdorder value - see linkman:ups.conf[5].
2010-03-25 23:20:59 +00:00
WARNING: this will probably power off your computers, so don't
play around with this option. Only use it when your systems are prepared
to lose power.
2022-06-29 10:37:36 +00:00
NOTE: refer to linkman:ups.conf[5] for using the *nowait* parameter.
2011-01-26 09:35:08 +00:00
ENVIRONMENT VARIABLES
---------------------
*NUT_CONFPATH* is the path name of the directory that contains
`upsd.conf` and other configuration files. If this variable is not set,
*upsdrvctl* the driver use a built-in default, which is often
`/usr/local/ups/etc`.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
DIAGNOSTICS
-----------
2010-03-25 23:20:59 +00:00
upsdrvctl will return a nonzero exit code if it encounters an error
while performing the desired operation. This will also happen if a
2011-01-26 09:35:08 +00:00
driver takes longer than the 'maxstartdelay' period to enter the
2010-03-25 23:20:59 +00:00
background.
2011-01-26 09:35:08 +00:00
SEE ALSO
--------
2022-06-29 10:37:36 +00:00
linkman:upsdrvsvcctl[8], linkman:nutupsdrv[8], linkman:upsd[8], linkman:ups.conf[5]
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Internet resources:
~~~~~~~~~~~~~~~~~~~
2022-06-29 10:37:36 +00:00
2010-03-25 23:20:59 +00:00
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/