<?xml version="1.0" encoding="UTF-8"?>
<!-- **************************************************************************
.... For copyright and licensing terms, see the file named COPYING.
.... **************************************************************************
.-->
<?xml-stylesheet href="docbook-xml.css" type="text/css"?>

<refentry id="chkservice">

<refmeta xmlns:xi="http://www.w3.org/2001/XInclude">
<refentrytitle>chkservice</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">administrator commands</refmiscinfo>
<refmiscinfo class="source">nosh</refmiscinfo>
<xi:include href="version.xml" />
</refmeta>

<refnamediv>
<refname>chkservice</refname>
<refpurpose>display the status of<!-- and control--> service bundles</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>chkservice</command>
<arg choice='opt'>--user</arg>
<arg choice='opt'>--cursor-keypad-application-mode</arg>
<arg choice='opt'>--calculator-keypad-application-mode</arg>
<arg choice='opt'>--no-alternate-screen-buffer</arg>
<arg choice='opt'>--inversescreen <replaceable>boolean</replaceable></arg>
<arg choice='opt'>--tui-level <replaceable>level</replaceable></arg>
<arg rep='repeat'><replaceable>names</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsection><title>Description</title>

<para>
<command>chkservice</command> displays a full-screen TUI that lists the statuses of service bundles<!-- and allows the user to start/stop/reset/enable/disable them-->.
</para>

<para>
It operates in one of two modes, controlled by the <arg choice="req">--user</arg> command line option:
</para>

<itemizedlist>
<listitem>
<para>
In "system" mode it operates on system-wide state and services.
It potentially communicates with a Service Manager process, such as <citerefentry><refentrytitle>service-manager</refentrytitle><manvolnum>1</manvolnum></citerefentry> via a local domain socket at <filename>/run/service-manager/control</filename> and via the control/status API of the individual services.
</para>
</listitem>
<listitem>
<para>
In "user" mode it operates on per-user state and services.
It potentially communicates with a Service Manager process, such as <citerefentry><refentrytitle>service-manager</refentrytitle><manvolnum>1</manvolnum></citerefentry> via a local domain socket at <filename>/run/user/<replaceable>$USER</replaceable>/service-manager/control</filename> and via the control/status API of the individual services.
</para>
</listitem>
</itemizedlist>

<para>
The <arg choice='plain'>--cursor-keypad-application-mode</arg> and <arg choice='plain'>--calculator-keypad-application-mode</arg> command-line options instruct <command>chkservice</command> to switch, respectively, the cursor keypad and the calculator keypad of the realizing terminal into their "application" modes.
Otherwise it switches them into their "normal" modes.
"application" mode is generally not useful to <command>chkservice</command>, since it makes cursor and calculator keys indistinguishable from accelerator keys.
The <arg choice='plain'>--no-alternate-screen-buffer</arg> command-line option instructs <command>chkservice</command> to not switch to the alternative screen buffer.
This has two uses.
First, it allows one to retain visibility of displayed information after the program has exited (although <citerefentry><refentrytitle>setterm</refentrytitle><manvolnum>1</manvolnum></citerefentry> provides access to the alternative screen buffer).
Second, it works around problems with some (yet more!) broken terminal emulators that attempt to be and fail at being like XTerm, which forcibly change cursor and editing keys into application mode when the alternative screen buffer is active.
The <arg choice='plain'>--inversescreen</arg> command-line option instructs <command>chkservice</command> to switch the DECSCNM ("light"/"dark" screen mode) private mode on or off.
The <arg choice='plain'>--tui-level</arg> command-line option constrains the use of MouseText or Unicode block graphics and line drawing characters in TUI widgets; currently none.
</para>

</refsection>

<refsection><title>Example</title>

<variablelist>
<varlistentry>
<term><command>chkservice</command> <filename>/run/service-bundles/*/*</filename> <filename>/etc/service-bundles/*/*</filename> <filename>/var/local/service-bundles/*/*</filename> <filename>/var/service-bundles/*/*</filename> </term>
<listitem><para>
Show all of the system services in some conventional places.
</para></listitem>
</varlistentry>
</variablelist>

</refsection>

<refsection><title>Author</title>
<para><author><personname><firstname>Jonathan</firstname> <surname>de Boyne Pollard</surname></personname></author></para>
</refsection>

</refentry>
