Config-Model-Systemd
view release on metacpan or search on metacpan
lib/Config/Model/models/Systemd/Common/Kill.pl view on Meta::CPAN
C<none>.
If set to C<control-group>, all remaining processes in the control group of this
unit will be killed on unit stop (for services: after the stop command is executed, as configured
with C<ExecStop>). If set to C<mixed>, the
C<SIGTERM> signal (see below) is sent to the main process while the subsequent
C<SIGKILL> signal (see below) is sent to all remaining processes of the unit\'s
control group. If set to C<process>, only the main process itself is killed (not
recommended!). If set to C<none>, no process is killed (strongly recommended
against!). In this case, only the stop command will be executed on unit stop, but no process will be
killed otherwise. Processes remaining alive after stop are left in their control group and the
control group continues to exist after stop unless empty.
Note that it is not recommended to set C<KillMode> to
C<process> or even C<none>, as this allows processes to escape
the service manager\'s lifecycle and resource management, and to remain running even while their
service is considered stopped and is assumed to not consume any resources.
Processes will first be terminated via C<SIGTERM> (unless the signal to send
is changed via C<KillSignal> or C<RestartKillSignal>). Optionally,
this is immediately followed by a C<SIGHUP> (if enabled with
lib/Config/Model/models/Systemd/Section/Service.pl view on Meta::CPAN
'type' => 'leaf',
'value_type' => 'uniline'
},
'WatchdogSec',
{
'description' => 'Configures the watchdog timeout for a service.
The watchdog is activated when the start-up is completed. The
service must call
L<sd_notify(3)>
regularly with C<WATCHDOG=1> (i.e. the
"keep-alive ping"). If the time between two such calls is
larger than the configured time, then the service is placed in
a failed state and it will be terminated with
C<SIGABRT> (or the signal specified by
C<WatchdogSignal>). By setting
C<Restart> to C<on-failure>,
C<on-watchdog>, C<on-abnormal> or
C<always>, the service will be automatically
restarted. The time configured here will be passed to the
executed service process in the
C<WATCHDOG_USEC> environment variable. This
allows daemons to automatically enable the keep-alive pinging
logic if watchdog support is enabled for the service. If this
option is used, C<NotifyAccess> (see below)
should be set to open access to the notification socket
provided by systemd. If C<NotifyAccess> is
not set, it will be implicitly set to C<main>.
Defaults to 0, which disables this feature. The service can
check whether the service manager expects watchdog keep-alive
notifications. See
L<sd_watchdog_enabled(3)>
for details.
L<sd_event_set_watchdog(3)>
may be used to enable automatic watchdog notification support.
',
'type' => 'leaf',
'value_type' => 'uniline'
},
'Restart',
lib/Config/Model/models/Systemd/Section/Service.pl view on Meta::CPAN
'on-failure',
'on-success',
'on-watchdog'
],
'description' => 'Configures whether the service shall be restarted when the service process exits,
is killed, or a timeout is reached. The service process may be the main service process, but it may
also be one of the processes specified with C<ExecStartPre>,
C<ExecStartPost>, C<ExecStop>, C<ExecStopPost>,
or C<ExecReload>. When the death of the process is a result of systemd operation
(e.g. service stop or restart), the service will not be restarted. Timeouts include missing the watchdog
"keep-alive ping" deadline and a service start, reload, and stop operation timeouts.
Takes one of C<no>, C<on-success>, C<on-failure>,
C<on-abnormal>, C<on-watchdog>, C<on-abort>, or
C<always>. If set to C<no> (the default), the service will not be restarted.
If set to C<on-success>, it will be restarted only when the service process exits cleanly.
In this context, a clean exit means any of the following:
exit code of 0;for types other than C<Type=oneshot>, one of the signals
C<SIGHUP>, C<SIGINT>,
C<SIGTERM>, or C<SIGPIPE>;
exit statuses and signals specified in
lib/Config/Model/models/Systemd/Section/Service.pod view on Meta::CPAN
C<none>.
If set to C<control-group>, all remaining processes in the control group of this
unit will be killed on unit stop (for services: after the stop command is executed, as configured
with C<ExecStop>). If set to C<mixed>, the
C<SIGTERM> signal (see below) is sent to the main process while the subsequent
C<SIGKILL> signal (see below) is sent to all remaining processes of the unit's
control group. If set to C<process>, only the main process itself is killed (not
recommended!). If set to C<none>, no process is killed (strongly recommended
against!). In this case, only the stop command will be executed on unit stop, but no process will be
killed otherwise. Processes remaining alive after stop are left in their control group and the
control group continues to exist after stop unless empty.
Note that it is not recommended to set C<KillMode> to
C<process> or even C<none>, as this allows processes to escape
the service manager's lifecycle and resource management, and to remain running even while their
service is considered stopped and is assumed to not consume any resources.
Processes will first be terminated via C<SIGTERM> (unless the signal to send
is changed via C<KillSignal> or C<RestartKillSignal>). Optionally,
this is immediately followed by a C<SIGHUP> (if enabled with
lib/Config/Model/models/Systemd/Section/Service.pod view on Meta::CPAN
unspecified, then this feature will be disabled.
I< Optional. Type uniline. >
=head2 WatchdogSec
Configures the watchdog timeout for a service.
The watchdog is activated when the start-up is completed. The
service must call
L<sd_notify(3)>
regularly with C<WATCHDOG=1> (i.e. the
"keep-alive ping"). If the time between two such calls is
larger than the configured time, then the service is placed in
a failed state and it will be terminated with
C<SIGABRT> (or the signal specified by
C<WatchdogSignal>). By setting
C<Restart> to C<on-failure>,
C<on-watchdog>, C<on-abnormal> or
C<always>, the service will be automatically
restarted. The time configured here will be passed to the
executed service process in the
C<WATCHDOG_USEC> environment variable. This
allows daemons to automatically enable the keep-alive pinging
logic if watchdog support is enabled for the service. If this
option is used, C<NotifyAccess> (see below)
should be set to open access to the notification socket
provided by systemd. If C<NotifyAccess> is
not set, it will be implicitly set to C<main>.
Defaults to 0, which disables this feature. The service can
check whether the service manager expects watchdog keep-alive
notifications. See
L<sd_watchdog_enabled(3)>
for details.
L<sd_event_set_watchdog(3)>
may be used to enable automatic watchdog notification support.
I< Optional. Type uniline. >
=head2 Restart
Configures whether the service shall be restarted when the service process exits,
is killed, or a timeout is reached. The service process may be the main service process, but it may
also be one of the processes specified with C<ExecStartPre>,
C<ExecStartPost>, C<ExecStop>, C<ExecStopPost>,
or C<ExecReload>. When the death of the process is a result of systemd operation
(e.g. service stop or restart), the service will not be restarted. Timeouts include missing the watchdog
"keep-alive ping" deadline and a service start, reload, and stop operation timeouts.
Takes one of C<no>, C<on-success>, C<on-failure>,
C<on-abnormal>, C<on-watchdog>, C<on-abort>, or
C<always>. If set to C<no> (the default), the service will not be restarted.
If set to C<on-success>, it will be restarted only when the service process exits cleanly.
In this context, a clean exit means any of the following:
exit code of 0;for types other than C<Type=oneshot>, one of the signals
C<SIGHUP>, C<SIGINT>,
C<SIGTERM>, or C<SIGPIPE>;
exit statuses and signals specified in
lib/Config/Model/models/Systemd/Section/Socket.pl view on Meta::CPAN
{
'description' => 'The maximum number of connections for a service per source IP address (in case of
IPv4/IPv6), per source CID (in case of C<AF_VSOCK>), or source UID (in case of
C<AF_UNIX>). This is very similar to the C<MaxConnections>
directive above. Defaults to 0, i.e. disabled.',
'type' => 'leaf',
'value_type' => 'uniline'
},
'KeepAlive',
{
'description' => 'Takes a boolean argument. If true, the TCP/IP stack will send a keep alive message
after 2h (depending on the configuration of
C</proc/sys/net/ipv4/tcp_keepalive_time>) for all TCP streams accepted on this
socket. This controls the C<SO_KEEPALIVE> socket option (see L<socket(7)> and
the L<TCP Keepalive
HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.) Defaults to C<false>.',
'type' => 'leaf',
'upstream_default' => 'no',
'value_type' => 'boolean',
'write_as' => [
'no',
'yes'
]
},
'KeepAliveTimeSec',
{
'description' => 'Takes time (in seconds) as argument. The connection needs to remain
idle before TCP starts sending keepalive probes. This controls the TCP_KEEPIDLE
socket option (see
L<socket(7)>
and the L<TCP
Keepalive HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.)
Default value is 7200 seconds (2 hours).',
'type' => 'leaf',
'upstream_default' => '7200',
'value_type' => 'integer'
},
'KeepAliveIntervalSec',
{
'description' => 'Takes time (in seconds) as argument between individual keepalive probes, if the
socket option C<SO_KEEPALIVE> has been set on this socket. This controls the
C<TCP_KEEPINTVL> socket option (see L<socket(7)> and
the L<TCP Keepalive
HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.) Default value is 75 seconds.',
'type' => 'leaf',
'upstream_default' => '75',
'value_type' => 'integer'
},
'KeepAliveProbes',
{
'description' => 'Takes an integer as argument. It is the number of
unacknowledged probes to send before considering the
connection dead and notifying the application layer. This
controls the TCP_KEEPCNT socket option (see
L<socket(7)>
and the L<TCP
Keepalive HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.) Default value is
9.',
'type' => 'leaf',
'upstream_default' => '9',
'value_type' => 'integer'
},
'NoDelay',
{
'description' => 'Takes a boolean argument. TCP Nagle\'s
algorithm works by combining a number of small outgoing
messages, and sending them all at once. This controls the
lib/Config/Model/models/Systemd/Section/Socket.pod view on Meta::CPAN
=head2 MaxConnectionsPerSource
The maximum number of connections for a service per source IP address (in case of
IPv4/IPv6), per source CID (in case of C<AF_VSOCK>), or source UID (in case of
C<AF_UNIX>). This is very similar to the C<MaxConnections>
directive above. Defaults to 0, i.e. disabled. I< Optional. Type uniline. >
=head2 KeepAlive
Takes a boolean argument. If true, the TCP/IP stack will send a keep alive message
after 2h (depending on the configuration of
C</proc/sys/net/ipv4/tcp_keepalive_time>) for all TCP streams accepted on this
socket. This controls the C<SO_KEEPALIVE> socket option (see L<socket(7)> and
the L<TCP Keepalive
HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.) Defaults to C<false>. I< Optional. Type boolean. >
=over 4
=item upstream_default value :
no
=back
=head2 KeepAliveTimeSec
Takes time (in seconds) as argument. The connection needs to remain
idle before TCP starts sending keepalive probes. This controls the TCP_KEEPIDLE
socket option (see
L<socket(7)>
and the L<TCP
Keepalive HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.)
Default value is 7200 seconds (2 hours). I< Optional. Type integer. >
=over 4
=item upstream_default value :
7200
=back
=head2 KeepAliveIntervalSec
Takes time (in seconds) as argument between individual keepalive probes, if the
socket option C<SO_KEEPALIVE> has been set on this socket. This controls the
C<TCP_KEEPINTVL> socket option (see L<socket(7)> and
the L<TCP Keepalive
HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.) Default value is 75 seconds. I< Optional. Type integer. >
=over 4
=item upstream_default value :
75
=back
=head2 KeepAliveProbes
Takes an integer as argument. It is the number of
unacknowledged probes to send before considering the
connection dead and notifying the application layer. This
controls the TCP_KEEPCNT socket option (see
L<socket(7)>
and the L<TCP
Keepalive HOWTO|http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for details.) Default value is
9. I< Optional. Type integer. >
=over 4
=item upstream_default value :
9
=back
( run in 1.905 second using v1.01-cache-2.11-cpan-39bf76dae61 )