CumulusUtils: Difference between revisions

m
 
(3 intermediate revisions by the same user not shown)
== Running CumulusUtils ==
 
CumulusUtils is - up to v6.x.y - a [https://www.mono-project.com/ ''mono''] executable. This is now deprecated and no longer supported.
 
From v7.0.0 and up it runs under .NET 8 [https://learn.microsoft.com/en-gb/dotnet/core/install/linux-scripted-manual#scripted-install ''Follow this link when on Linux''].
All environments are very different and not interchangeable. However running CumulusUtils is pretty similar on all environments and mono and dotnet (8 and 10) can co-exist on the same machine. See the CMX installation on how to install either mono or dotnet. CumulusUtils assumes the correct installation of either environment.
 
Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
''CumulusUtils'' runs on any operating system CumulusMX runs on and it '''MUST''' run in the CumulusMX directory (as ''working directory'').
Running ''CumulusUtils'' is done from the commandline in a command window (under any OS) or from a script.
 
''CumulusUtils'' takes one or more commandline parameters (in short: commands) and must be like (see NOTE 1 below; square brackets means ''optional'' so DON'T TYPE THEM):
 
''dotnet utils/bin/cumulusutils.exedll [command]'' (the ''mono.NET'' syntax - this''dotnet'' assumesis monoobligatory ison alreadythe activecommandline for UNIX. Note the '''dll''')
 
BelowFor is described for ''mono'', when using .NET, please change the command as above.UNIX: Note you will have to carry this on in scripts as well. Using the dotnet command in crontab requires using the explicit path to the dotnet command or defining the PATH environment variable in the crontab script which does not know the environment (a bit awkward).
''dotnet utils/bin/cumulusutils.dll [command]'' (the ''.NET'' syntax - ''dotnet'' is obligatory on the commandline. Note the '''dll''')
 
Below is described for ''mono'', when using .NET, please change the command as above. Note you will have to carry this on in scripts as well. Using the dotnet command in crontab requires using the explicit path to the dotnet command or defining the PATH environment variable in the crontab script which does not know the environment (a bit awkward).
 
If no commands are given the application responds with:
Please note that CumulusUtils requires live data from CumulusMX to display what you expect. To accomplish that you need to configure CMX as follows:
 
The things it is looking for are realtime.txt and realtimegauges.txt. Those are sent by CMX to the directory you configure in ''Settings=>Internet Settings=>Web/Upload Site''.
 
In ''Settings=>Internet Settings=>Interval Configuration=>Normal Interval Settings'': Tick both options and set the interval time to enable interval Upload
Running CumulusUtils results in output which represents a static view of the data in a table or graphic format for display on your website (it may even create a complete website). The fact that the output is a static view requires the output to be regenerated when new data is available. Rerunning CumulusUtils is also required when you change anything in the configuration and can't wait to see that change reflected on the site. In general: changes in data and configuration require a rerun.
 
Reruns for changes of data are typically once per day, just after rollover time. In that sense it is like running a new query.
 
There are some exceptions to the daily rule: Sysinfo and [[UserAskedData]]
05 1 * * * cd /home/CumulusMX; /usr/share/dotnet/dotnet utils/bin/cumulusutils.dll thrifty website
1-51/10 * * * * cd /home/CumulusMX; /usr/share/dotnet/dotnet utils/bin/cumulusutils.dll sysinfo UserAskedData UserReports
 
===== For mono =====
15 1 * * * cd /home/CumulusMX; utils/bin/cumulusutils.exe thrifty website
1-51/10 * * * * cd /home/CumulusMX; utils/bin/cumulusutils.exe sysinfo UserAskedData UserReport
 
==== Windows: Using the scheduler ====
===== Customisation =====
One can also customise/fine tune the task further by exporting it, default export format is XML. Then can edit in favourite text editor and reimport when done. May be useful in particular for fine tuning the repetition times of the task.
 
==== MAC: Using crontab (advised) ====
Automating the run of CumulusUtils on the MAC is typically done through [https://share.google/aimode/CMq6jMIq3FvXLT8bn ''crontab'']. The link is a Google Gemini shortcut which offers more batch options on the MAC. The advise is to use ''crontab'' to have support available. Below is the crontab on RPi of the author of CumulusUtils to be used as an '''example'''!
 
===== For monodotnet =====
1505 1 * * * cd /home/CumulusMX; /usr/share/dotnet/dotnet utils/bin/cumulusutils.exedll thrifty website
1-51/10 * * * * cd /home/CumulusMX; /usr/share/dotnet/dotnet utils/bin/cumulusutils.exedll sysinfo UserAskedData UserReportUserReports
 
== Additional remarks ==
 
#(on NOT Windows) When mono is already active (as daemon or from command line in another process) you can start any mono executable without having it prepended by the mono command. As normally (if you did not uninstall it) xsp4 is running as a daemon, mono is always available so you can run mono executables as normal linux executables. You won't notice the difference. However if you don't have the x bit set, you get access refused when trying to execute. Without the x bit set you have to prepend mono as in: ''mono utils/bin/cumulusutils.exe''. Then it executes without the x bit set because then it is an argument to the mono command.
#CumulusUtils is written in C#, HTML and javascript. All HTML and javascript is embedded in the C# code and generated on execution of ''CumulusUtils''. The cumuluscharts.txt charts library was based on the cumuluscharts.js originally distributed with ''CumulusMX'', probably the version a bit before April 2020 and has been modified since. With the appearance of the [[ChartsCompiler]] the name cumuluscharts.txt has been preserved but the technique of creating the charts has been changed.
#As CumulusUtils itself runs in the Cumulus directory, the data directory (data) is one level below. CumulusUtils currently uses - a copy of - dayfile.txt, the monthly logfiles and incidentally the alltime.ini file. It also takes information from Cumulus.ini. All output is written to the utils/ subdirectory. All logs are created in the utils/utilslog/ subdirectory. It also uses the AirLink.log and the ExtraLog files in a similar way when the user has such devices.
#CumulusUtils can output for many languages. See the specific page on [[Language in CumulusUtils|language in CumulusUtils]].
#Development of CumulusUtils started in 9<sup>th</sup> of August 2019 with an initial commit of the Top10 written in C. Development changed rapidly to C# with an initial commit of Top10 on November 19 2019 of version 0.7.0. The rest of the history can be read in the [[Release Notes|release notes]].
#Users canPlease, present themselvesyourselves on the CumulusUtils [[Map - Users of CumulusUtils|usermap]]. Although optional for modules users, the author sees it as payment for the usage of the tool, so please put yourself on the map. For website users it is automatic and obligatory. Thebut the URL needs to be filled in by yourself in the inifile. When not a complete website, please fill in the URL to the page you use CUtils for (e.g. pwsFWI).
#In case of problems there exists [[Errorlogging]].
 
'''NOTE''': comments to this series of articles is welcome. either by using the Talk feature of the Wiki for that page, directDirect edit of the article (request an account) oris switched byoff. contactingContacting the author of CumulusUtils [https://cumulus.hosiene.co.uk/memberlist.php?mode=viewprofile&u=9016 HansR] on the [https://cumulus.hosiene.co.uk/viewtopic.php?f=44 forum] or through PM.
 
[[Category:WebTools]][[Category:User Contributions]][[Category:CumulusUtils]]