Amending dayfile: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
2,650 bytes added ,  05:55, 22 August 2022
m
m (Updating for better coverage of legacy and MX differences)
 
(2 intermediate revisions by the same user not shown)
Line 232: Line 232:
= Using CreateMissing.exe editing functionality=
= Using CreateMissing.exe editing functionality=


'''You must be running MX in order to use this utility''', as some information is shared between CumulusMX.exe and CreateMissing.exe.
Basically, this utility will create a new '''dayfile.txt''', if there is already a file with that name it gets renamed, and existing fields are copied across. If there are some dates missing in an existing file it will create new lines ''if data for those missing lines can be derived'' from data already in [[Standard_log_files]]. If an individual line in an existing '''dayfile.txt''' is shorter than the number of fields expected in the current MX release, then '''CreateMissing.exe''' will calculate daily values for the missing fields based on data already in [[Standard_log_files]].


Please see [[Calculate_Missing_Values#CreateMissing.exe|CreateMissing.exe]] and/or https://github.com/cumulusmx/CreateMissing/blob/master/README.md.
'''You must have installed MX in order to use this utility''', as some information in [[Cumulus.ini]] and some [[Software#By_Mark_Crossley|.dll files]] are shared between CumulusMX.exe and CreateMissing.exe .


Information there is not repeated here.
''It is important to understand'' that when you start MX interactively, or as a service, it reads the contents of '''dayfile.txt''' into an internal array (held in random access memory - RAM).  Therefore, if you run '''CreateMissing.exe''' while ''CumulusMX.exe'' is running, any updates to the file are ''not'' seen by MX until that software is restarted.  Release 3.20.0 (beta build 3199 onwards) adds a new "Utils" menu with a new option to refresh the internal values without restarting MX.


Basically, this utility will not replace any data that is already in the daily summary log file. It will create new lines if data for those missing lines can be derived from data already in [[Standard_log_files]]. If an individual line in '''dayfile.txt''' is shorter than the number of fields expected in the current MX release, then '''CreateMissing.exe''' will calculate daily values for the missing fields based on data already in [[Standard_log_files]].
Instructions for downloading and running '''CreateMissing.exe''' can be found on [[Calculate_Missing_Values#CreateMissing.exe|another Wiki page]] and most of the information there is not repeated here.  


The developer includes brief installation and running instructions at https://github.com/cumulusmx/CreateMissing/blob/master/README.md.


= Using the Cumulus 1 editing feature =
= Using the Cumulus 1 editing feature =
Line 337: Line 338:


If you are editing dayfile.txt outside the Cumulus 1 or MX software, there is the danger of changing something that prevents Cumulus from understanding the file when it next tries to use it.  
If you are editing dayfile.txt outside the Cumulus 1 or MX software, there is the danger of changing something that prevents Cumulus from understanding the file when it next tries to use it.  
== Warning if editing outside MX ==
You need to understand the following difference between the legacy Cumulus 1 and MX. In the legacy software (and early MX releases), "dayfile.txt" is read by the software if any output reports past days.  In later MX releases, the only time the file is read is when the software is restarted, it is not read again.
From MX release 3.9.2 - b3097, Historic Charts were added to both the interface and the default web pages.  As a consequence, when you start MX in this release (or any subsequent release), the entire content of dayfile.txt is held internally (i.e. in RAM), and it is these internally held values that are used by the .json api/files that feed these [[Highcharts - Historic]] plots.  MX will append an additional array when it stores a new line in the file.  The MX in-built editor actually displays/edits the internally held data, and then writes back (including any deletions or edits) that internal array into the file.
'''Prior''' to release 3.20.0 - b3200, if you were to edit the "dayfile.txt" using an external editor without stopping MX, any change you make is not seen by internal array, and such external edits would be lost should you (in the same MX session) use the internal editor.  To propagate your external edits, you need to first stop, and then restart MX, and then the internal array will match the file.
''From release  3.20.0 - b3200,'' there is a utility provided that can copy what is held in the daily summary log file and update the internal array.  Access this utility from the '''"Utils" menu''' added to the interface at this release.


== General Editing Rules ==
== General Editing Rules ==
These rules should be followed whatever Cumulus file you edit externally.


# Take a copy of the file that can be reverted to if there is a subsequent problem, and you have messed up the file that Cumulus (1 or MX) is now trying to use.
# Take a copy of the file that can be reverted to if there is a subsequent problem, and you have messed up the file that Cumulus (1 or MX) is now trying to use.
Line 356: Line 369:


=== File specific Editing Rules ===
=== File specific Editing Rules ===
These additional (above rules still apply) rules are specific to any external editing of "dayfile.txt".


[[File:Open office (editing cumulus log files).png| right]]
[[File:Open office (editing cumulus log files).png| right]]
5,838

edits

Navigation menu