MX on Linux: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
235 bytes removed ,  17 March 2022
m
Minor rephrasing and layout improvement re release 3.15.1 change
m (Updated for MX release 3.15.1 - only affects section 9.4 re editing service file)
m (Minor rephrasing and layout improvement re release 3.15.1 change)
=====Technical users - optional edit to "[Unit]" section=====
 
The content of the "[Unit]" section of the service description file described here has evolved slightly as MX develops. The mainonly change is in references to '''network-online.target''':
*# ItThe didfile notwas appearfirst atadded allto the MX release package in Patch release 3.8.4 - b3094 (14 September 2020)
#* ItIn appearedthat asfirst version of the file <code>After=network-online.target</code> atwas somethe lateronly releasemention.
#** That means that '''after''' "systemd" has started the "cumulusmx" service, it can start the network service.
* From release 3.15.1 build 3170 (19 March 2022) it appears twice
#** Note that the terminology ''after'' does not guarantee the network online detection service will be started.
<pre>Wants=network-online.target
# From release 3.15.1 build 3170 (19 March 2022) a second mention was added, so the content became: <pre>Wants=network-online.target
After=network-online.target</pre>
#* The "wants" line tells "systemd" that the "cumulusmx" service wants the network online detection service to be started.
#** You may see a line saying <code>Wants=network-online.target</code>, that tells "systemd" that the "cumulusmx" service wants the network online detection service to be started. Note that the terminology ''wants'' means MX can still start even if the network service is not running, or if the attempt to start the network service fails
 
 
# Within the provided file you should find a '''[Unit]''' section:
 
#* As mentioned above, the content of this section depends upon which MX release you are using.
# Within the providededitor filenavigate you should find ato '''[Unit]''' section:
#* All release distributions that contain the file should have the following three lines:
#* As mentioned above, the content of this section depends upon which MX release you are using.
#*# <code>[Unit]</code>
#* All release distributions that contain the file should have the following three lines:
#*# <code>Description=CumulusMX service</code>
#*# <code>Documentation=https://cumuluswiki.org/a/Main_Page[Unit]</code>
#*# <code>Description=CumulusMX service</code>
#* What follows after that depends on which release distribution you have installed
# Technical users should use the editor to create a blank line after# <code>Documentation=https://cumuluswiki.org/a/Main_Page</code>
#** You may see a line saying <code>After=network-online.target</code>, that means that if the network online detection service has been started, and the network service is not running, then "systemd" should ensure that the network service is started after the "cumulusmx" service i.e. it requests starting a connection by LAN or Wireless to the internet after starting MX.
# Use the editor to create a blank line after <code>Documentation=https://cumuluswiki.org/a/Main_Page</code>
#** You may see a line saying <code>Wants=network-online.target</code>, that tells "systemd" that the "cumulusmx" service wants the network online detection service to be started. Note that the terminology ''wants'' means MX can still start even if the network service is not running, or if the attempt to start the network service fails
# Technical users should use the editor to create a blank line after <code>Documentation=https://cumuluswiki.org/a/Main_Page</code>
# Type into that blank line the following: <code>Requires= time-sync.target local-fs.target</code>
#* The terminology ''Requires'' tells "systemd" that the "cumulusmx" service should not be started until the services specified on that line have successfully started
#*# The '''local-fs.target''' specifies that the ''cumulusmx'' service requires the file service to have started, i.e. checks your computer can read files before it attempts to start the ''cumulusmx'' service
#*# The '''time-sync.target''' specifies that the ''cumulusmx'' service requires the computer to have synced with either a real-time clock chip, or a time found on the internet (NTP), i.e. this will ensure that Cumulus obtains the correct time from the computer to control all its actions
#*#* If you are using a weather station type that does not time-stamp the readingreadings it supplies to a Raspberry Pi, adding that target reference is important
#*#* A standard RPi does not include a real time clock chip (it can be added via connections available), therefore when the RPi boots it initially uses a dummy clock, and this sets the time to when the RPi was last running.
#*#* That means without this target being included, a newly booted-up RPi will tell Cumulus MX the time is just after when the computer was shut down, that might be very different to the true current time. It means your Cumulus MX on restarting will skip the catch-up of historic data (should your weather station settings make that available). Some measurements will then get logged against the wrong time.
5,838

edits

Navigation menu