Page 1 of 1
Linux Support for Uptime/Memory
Posted: Tue 10 May 2016 7:35 pm
by ConligWX
Hi
I am using Saratoga Templates with CumulusMX and running it on Debian Jessie. I have noticed however the System uptime is not reported from CUtags.php. Ken from Saratoga has said the uptime is reported in Windows 10 with CumulsMX so he cannot confirm if this is a Linux issue or not.
extract from CUtags.txt:
OsVersion|Unix 3.16.0.4:|:
OsLanguage|English (United Kingdom):|:
SystemUpTime|0 days 0 hours:|:
ProgramUpTime|11 days 5 hours:|:
CpuName|n/a:|:
CpuCount|2:|:
MemoryStatus|n/a:|:
DisplayMode|n/a:|:
is this a missing feature of CumulusMX running on Linux?
Re: Linux Support for Uptime/Memory
Posted: Tue 10 May 2016 7:56 pm
by steve
<#MemoryStatus> isn't implemented in MX, but <#SystemUpTime> is. Perhaps Mono doesn't implement the required PerformanceCounter.
Re: Linux Support for Uptime/Memory
Posted: Tue 10 May 2016 7:57 pm
by steve
But note that the first call apparently returns zero anyway.
Re: Linux Support for Uptime/Memory
Posted: Fri 13 May 2016 12:28 am
by Hunter362
Toxic17 wrote:Hi
I am using Saratoga Templates with CumulusMX and running it on Debian Jessie. I have noticed however the System uptime is not reported from CUtags.php. Ken from Saratoga has said the uptime is reported in Windows 10 with CumulsMX so he cannot confirm if this is a Linux issue or not.
extract from CUtags.txt:
OsVersion|Unix 3.16.0.4:|:
OsLanguage|English (United Kingdom):|:
SystemUpTime|0 days 0 hours:|:
ProgramUpTime|11 days 5 hours:|:
CpuName|n/a:|:
CpuCount|2:|:
MemoryStatus|n/a:|:
DisplayMode|n/a:|:
is this a missing feature of CumulusMX running on Linux?
For your system uptime, try <?php echo exec('uptime -p'); ?>
Use that right in your page, not from your CUtags file.
Re: Linux Support for Uptime/Memory
Posted: Fri 13 May 2016 8:31 am
by mcrossley
Hunter362 wrote:
For your system uptime, try <?php echo exec('uptime -p'); ?>
Use that right in your page, not from your CUtags file.
Only if your web server is on the same server as your Cumulus, otherwise it gives the web server uptime?
Re: Linux Support for Uptime/Memory
Posted: Fri 13 May 2016 5:53 pm
by ConligWX
Thank, my Webserver is a QNAP. Cumulus runs on an Intel NUC / Debian jessie. i'll customise the status page to suit.
thanks
Re: Linux Support for Uptime/Memory
Posted: Tue 14 Jun 2016 2:56 am
by Werk_AG
steve wrote:<#MemoryStatus> isn't implemented in MX, but <#SystemUpTime> is. Perhaps Mono doesn't implement the required PerformanceCounter.
System uptime is not reported from CUtags.php in my RPi system too:
OsVersion|Unix 4.1.13.0:|:
OsLanguage|Portuguese (Portugal):|:
SystemUpTime|0 days 0 hours:|:
ProgramUpTime|0 days 0 hours:|:
CpuName|n/a:|:
CpuCount|1:|:
As <#SystemUpTime> is implemented in CumulusMX, could this problem be related with Mono or due to I'm using Portuguese language?
Info bellow from the CumulusMX star/stop script with -s option:
System Uptime of RasberryPi(CumulusMX) is: 1 day 22 hours 34 minutes
Re: Linux Support for Uptime/Memory
Posted: Tue 14 Jun 2016 8:29 am
by mcrossley
This is a know issue, Steve hasn't found a multi-platform solution to fetching that data yet.
Re: Linux Support for Uptime/Memory
Posted: Tue 14 Jun 2016 9:20 am
by steve
Yes, see above. In theory system uptime should be fine as it's available via .net and hence should be available on all platforms via mono. Apparently it doesn't work on all platforms and I don't know why. Hopefully everyone understands that investigating this cannot be a high priority for me.
Re: Linux Support for Uptime/Memory
Posted: Tue 14 Jun 2016 10:28 am
by philpugh
I use #ProgramUpTime successfully to display how long CumulusMX has been running - not the same as #SystemUpTime I know, but more useful to me as the main system (BananaPi/SSD) stays up as long as there is power as it runs my webserver and mail system.
Re: Linux Support for Uptime/Memory
Posted: Tue 14 Jun 2016 6:38 pm
by Werk_AG
mcrossley wrote:This is a know issue, Steve hasn't found a multi-platform solution to fetching that data yet.
Thank mcrossley. I thought that it could be related to the fact that I'm using Portuguese language, and some problem with the date format.
steve wrote:Yes, see above. In theory system uptime should be fine as it's available via .net and hence should be available on all platforms via mono. Apparently it doesn't work on all platforms and I don't know why. Hopefully everyone understands that investigating this cannot be a high priority for me.
Thank you Steve.
Of course I understand. The issue is not very important to me too.
philpugh wrote:I use #ProgramUpTime successfully to display how long CumulusMX has been running - not the same as #SystemUpTime I know, but more useful to me as the main system (BananaPi/SSD) stays up as long as there is power as it runs my webserver and mail system.
Thank you philpugh
I will try it. Having this will be enough for me.