Ignition
This chapter describes the configuration of the service ignition,
which controls the ignition powerdown timer in OSDx.
The ignition powerdown timer monitors the ignition signal on vehicle-mounted devices. When the ignition is turned off, the device performs an orderly shutdown after a configurable delay. If the ignition is turned back on before the delay expires, the shutdown is cancelled and the device continues operating normally.
The countdown is persisted across reboots: if the operator (or any other software) reboots the equipment while ignition is off, on the next boot the daemon resumes from the previously accumulated elapsed time. The hardware keeps the equipment powered during the reboot up to its own safety limit.
After a shutdown triggered by this service, the next boot reports
Ignition loss as the reboot reason in show version.
This feature is currently available on the H5-Auto platform.
Configuration
To enable the ignition powerdown timer, use the
service ignition command:
set service ignition
Delay
This command configures the time (in minutes) the device remains on before performing an orderly shutdown once ignition is turned off.
The syntax to set the value for
service ignition delay <u32> in OSDx is:
set service ignition delay <value>
Where <value> is an integer in the range:
0— immediate shutdown on ignition loss (default if not set)
1to1440— minutes the device stays on after ignition is turned off
For example, this command will set a delay of five minutes:
set service ignition delay 5
Tip
During the delay period, if ignition is turned back on, the shutdown will be cancelled and the device will operate normally. This prevents unnecessary reboots caused by brief ignition interruptions.
Log level
This command sets the logging level of the ignition monitor daemon (messages are written to the system journal). By default, it is set to notice level.
The syntax to change the logging level for
service ignition log-level <txt> in OSDx is:
set service ignition log-level <level>
Where <level> is one of:
emerg — emergency messages
alert — urgent messages
crit — critical messages
err — error messages
warning — warning messages
notice — messages that require further investigation
info — information messages
debug — debugging messages
For example, this command will change the logging level to info:
set service ignition log-level info
SNMP management
Important
To better understand how to configure the Simple Network Management Protocol (SNMP) service, see SNMP documentation.
For the OSDx device to be able to send traps, you will first need to create an SNMP community or user
and establish the ignition service as a target.
After the SNMP service is configured, the sending of traps must be enabled by executing the following command in OSDx:
set service ignition enable-snmp-trap
When enabled, the device sends SNMP traps for the following ignition events:
loss — ignition off detected, shutdown countdown started
restored — ignition turned back on during the delay, shutdown cancelled
poweroff — delay expired, device is about to power off
Each trap carries the following variable bindings:
ignitionHostname— hostname of the equipment
ignitionState— one ofloss,restoredorpoweroff
ignitionDelay— configured powerdown delay, in seconds
ignitionElapsed— seconds the ignition has been OFF at trap time (0onloss, actual elapsed onrestored, equal toignitionDelayor close to it onpoweroff)
Operational commands
Show ignition state
The service ignition show command reports the live state of the
ignition monitor service: current ignition signal, configured delay, time
elapsed with ignition OFF, time remaining before shutdown, and whether a
shutdown is already in progress.
admin@osdx$ service ignition show
Ignition state : off
Configured delay : 5m 0s
Elapsed since OFF : 1m 23s
Remaining to shutdown : 3m 37s
Safety power-hold : 255s
Examples
To apply the default settings of the ignition service:
delete service ignition
In this case, the expected behaviour is that, when the ignition is turned off, the device shuts down immediately.
To enable the ignition service with a five-minute delay:
set service ignition delay 5
In this case, the expected behaviour is that, when the ignition is turned off, the device waits five minutes before shutting down. If the ignition is turned back on within those five minutes, the shutdown is cancelled.
To enable the ignition service with the following settings:
Delay of five minutes.
Logging level set to info messages.
SNMP traps enabled (SNMP service previously configured).
set service ignition delay 5
set service ignition log-level info
set service ignition enable-snmp-trap
In this case, the expected behaviour is that, when the ignition is turned off, the
service emits info-level entries indicating that ignition loss has been detected and sends
an SNMP trap (loss). The device then waits five minutes. If the ignition is restored
within that time, the shutdown is cancelled, a log message is written, and a second SNMP
trap is sent (restored). If the ignition is not restored, a final SNMP trap is sent
(poweroff) and the device performs an orderly shutdown.