]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-ac-power.xml
journald: bring order of MaxLevelXYZ= setting explanations in sync with listed names
[thirdparty/systemd.git] / man / systemd-ac-power.xml
CommitLineData
8310229a
LB
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
eea10b26 3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
8310229a
LB
4<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6<refentry id="systemd-ac-power" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>systemd-ac-power</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd-ac-power</refentrytitle>
15 <manvolnum>1</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd-ac-power</refname>
20 <refpurpose>Report whether we are connected to an external power source</refpurpose>
21 </refnamediv>
22
23 <refsynopsisdiv>
24 <cmdsynopsis>
25 <command>systemd-ac-power</command>
26 <arg choice="opt" rep="repeat">OPTIONS</arg>
27 </cmdsynopsis>
28 </refsynopsisdiv>
29
30 <refsect1>
31 <title>Description</title>
32
33 <para><command>systemd-ac-power</command> may be used to check whether the system
34 is running on AC power or not. By default it will simply return success (if we
35 can detect that we are running on AC power) or failure, with no output.
36 This can be useful for example to debug <varname>ConditionACPower=</varname> (see
37 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
38 </refsect1>
39
40 <refsect1>
41 <title>Options</title>
42
43 <para>The following options are understood:</para>
44
45 <variablelist>
46 <varlistentry>
47 <term><option>-v</option></term>
48 <term><option>--verbose</option></term>
49
ec07c3c8
AK
50 <listitem><para>Show result as text instead of just returning success or failure.</para>
51
52 <xi:include href="version-info.xml" xpointer="v253"/></listitem>
8310229a
LB
53 </varlistentry>
54
7f1520c6
LP
55 <varlistentry>
56 <term><option>--low</option></term>
57
58 <listitem><para>Instead of showing AC power state, show low battery state. In this case will return
59 zero if all batteries are currently discharging and below 5% of maximum charge. Returns non-zero
ec07c3c8
AK
60 otherwise.</para>
61
62 <xi:include href="version-info.xml" xpointer="v254"/></listitem>
7f1520c6
LP
63 </varlistentry>
64
8310229a
LB
65 <xi:include href="standard-options.xml" xpointer="help" />
66 <xi:include href="standard-options.xml" xpointer="version" />
67 </variablelist>
68 </refsect1>
69
70 <refsect1>
71 <title>Exit status</title>
72
73 <para>On success (running on AC power), 0 is returned, a non-zero failure code otherwise.</para>
74 </refsect1>
75
76 <refsect1>
77 <title>See Also</title>
78 <para>
79 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
80 </para>
81 </refsect1>
82
83</refentry>