MX on Linux: Difference between revisions

235 bytes removed ,  03:57, 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)
Line 676: Line 676:
=====Technical users - optional edit to "[Unit]" section=====
=====Technical users - optional edit to "[Unit]" section=====


The content of the "[Unit]" section of the service description file described here has evolved as MX develops.  The main change is in references to '''network-online.target''':
The content of the "[Unit]" section of the service description file described here has evolved slightly as MX develops.  The only change is in references to '''network-online.target''':
* It did not appear at all in Patch release 3.8.4 - b3094  (14 September 2020)
# The file was first added to the MX release package in Patch release 3.8.4 - b3094  (14 September 2020)
* It appeared as <code>After=network-online.target</code> at some later release.
#* In that first version of the file <code>After=network-online.target</code> was the only mention.
* From release 3.15.1 build 3170 (19 March 2022) it appears twice
#** That means that '''after''' "systemd" has started the "cumulusmx" service, it can start the network service.  
<pre>Wants=network-online.target
#** Note that the terminology ''after'' does not guarantee the network online detection service will be started.
# 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>
After=network-online.target</pre>
#* The "wants" line 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.
 
#* All release distributions that contain the file should have the following three lines:
# Within the editor navigate to '''[Unit]''' section
#*# <code>[Unit]</code>
# As mentioned above, the content of this section depends upon which MX release you are using.
#*# <code>Description=CumulusMX service</code>
# All release distributions that contain the file should have the following three lines:
#*# <code>Documentation=https://cumuluswiki.org/a/Main_Page</code>
## <code>[Unit]</code>
#* What follows after that depends on which release distribution you have installed
## <code>Description=CumulusMX service</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.
## <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
# Use the editor to create a blank line after <code>Documentation=https://cumuluswiki.org/a/Main_Page</code>
# 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>
# 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 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 '''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
#*# 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 reading it supplies to a Raspberry Pi, adding that target reference is important
#*#* If you are using a weather station type that does not time-stamp the readings 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.
#*#* 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.
#*#* 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