Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Cumulus PC Diskspace Status Script

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Cumulus PC Diskspace Status Script

Post by Synewave »

Knowing that a lot of members use a dedicated PC for Cumulus and rarely look at the Cumulus console and view their webpages instead, I wondered whether anyone would be interested in a Javascript I wrote this morning.

It results in the percentage of diskspace free, total bytes used and diskspace size for your Cumulus PC to be displayed somewhere on your Cumulus webpages.

It relies on the fairly latest Beta versions of Cumulus utilising the external command facility in the Internet Settings to calculate the diskspace.

Have a look here http://www.synewave.co.uk/gcsweather/status.php Let me know what you think, if anyone is interested in the code, I'll package it up.
User avatar
robynfali
Posts: 1076
Joined: Sat 31 Jul 2010 10:34 pm
Weather Station: Vantage Vue
Operating System: Windows XP
Location: Anglesey, North Wales, UK
Contact:

Re: Cumulus PC Diskspace Status Script

Post by robynfali »

great idea buddy
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Cumulus PC Diskspace Status Script

Post by captzero »

Paul,

Looks good.

I'd be interested for sure.
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Cumulus PC Diskspace Status Script

Post by n9mfk »

Hi Paul,
like that page a lot
Beau
Hillbilly
Posts: 112
Joined: Tue 26 Jan 2010 8:54 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Vista Home Premium SP2
Location: Mayenne, Pays De La Loire, France
Contact:

Re: Cumulus PC Diskspace Status Script

Post by Hillbilly »

Hi Paul, yes I'd be interested please :clap: . I'd also be interested in a bit more info that I saw in a log or diags file somewhere on the forum - Windows uptime and Cumulus uptime. I had started to think about how I could display this but got no further, so if the method you have found can get that too, great :D Otherwise, I guess it would be worth requesting an enhancement to create webtags as Cumulus obviously captures that into.
Many thanks
Helen

La Locherie Weather
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Re: Cumulus PC Diskspace Status Script

Post by Synewave »

I've just added system uptime to my status page. I'm going to work on it a bit more to show 'Number of days ago'.

Not sure how I can get the Cumulus 'started time', if Steve can provide a webtag for that at sometime it would be great.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PC Diskspace Status Script

Post by steve »

Synewave wrote:Not sure how I can get the Cumulus 'started time', if Steve can provide a webtag for that at sometime it would be great.
Yes, I can do that. It would be in fixed format, though, e.g. "10 hours 53 minutes" and I'm afraid I have no idea whether it will come out in English or the local language on non-English systems.
Steve
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Re: Cumulus PC Diskspace Status Script

Post by Synewave »

I assume that would be the uptime? That would be great.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PC Diskspace Status Script

Post by steve »

I know I said I wasn't adding any more features to 1.9.1, but I need to do a build anyway shortly to fix an existing web tag bug, so I'll slip this in too as it's easy. I can do any of these, if any are useful:

function GetOsVersionString : string; // e.g. "Windows XP Service Pack 1 build 2600"
function GetOsLanguageString : string; // e.g. "English"
function GetSystemUpTime : string; // e.g. "9 hours 52 minutes"
function GetProgramUpTime : string; // e.g. "15 seconds"
function GetCpuName : string; // e.g. "Intel(R) Pentium(R) 4 CPU 2.80GHz"
function GetCpuCount : integer; // number of installed CPUs (HT-CPUs count as 2)
function GetMemoryStatus : string; // e.g. "327/511 MB (free/total)"
function GetDisplayModeString : string; // e.g. "1024x768, 32 bit"
function GetAllocatedMemory : string; // e.g. "3.52 MB"
Steve
Hillbilly
Posts: 112
Joined: Tue 26 Jan 2010 8:54 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Vista Home Premium SP2
Location: Mayenne, Pays De La Loire, France
Contact:

Re: Cumulus PC Diskspace Status Script

Post by Hillbilly »

Synewave wrote:I've just added system uptime to my status page. I'm going to work on it a bit more to show 'Number of days ago'.
Perfect, :clap: well done Paul and thanks.
steve wrote:function GetOsVersionString : string; // e.g. "Windows XP Service Pack 1 build 2600"
function GetOsLanguageString : string; // e.g. "English"
function GetSystemUpTime : string; // e.g. "9 hours 52 minutes"
function GetProgramUpTime : string; // e.g. "15 seconds"
function GetCpuName : string; // e.g. "Intel(R) Pentium(R) 4 CPU 2.80GHz"
function GetCpuCount : integer; // number of installed CPUs (HT-CPUs count as 2)
function GetMemoryStatus : string; // e.g. "327/511 MB (free/total)"
function GetDisplayModeString : string; // e.g. "1024x768, 32 bit"
function GetAllocatedMemory : string; // e.g. "3.52 MB"
Well they all seem of interest - except I don't understand GetCpuCount, what does that tell me?

Thanks Paul and Steve. For those of us with the Cumulus PC in the next room and those who are a bit further away! :lol:
Many thanks
Helen

La Locherie Weather
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PC Diskspace Status Script

Post by steve »

Hillbilly wrote:Well they all seem of interest - except I don't understand GetCpuCount, what does that tell me?
It tells you how many processors your CPU has, e.g. mine has 4 (it's a Core 2 quad).
Steve
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Re: Cumulus PC Diskspace Status Script

Post by Synewave »

steve wrote:I know I said I wasn't adding any more features to 1.9.1, but I need to do a build anyway shortly to fix an existing web tag bug, so I'll slip this in too as it's easy. I can do any of these, if any are useful:

function GetOsVersionString : string; // e.g. "Windows XP Service Pack 1 build 2600"
function GetOsLanguageString : string; // e.g. "English"
function GetSystemUpTime : string; // e.g. "9 hours 52 minutes"
function GetProgramUpTime : string; // e.g. "15 seconds"
function GetCpuName : string; // e.g. "Intel(R) Pentium(R) 4 CPU 2.80GHz"
function GetCpuCount : integer; // number of installed CPUs (HT-CPUs count as 2)
function GetMemoryStatus : string; // e.g. "327/511 MB (free/total)"
function GetDisplayModeString : string; // e.g. "1024x768, 32 bit"
function GetAllocatedMemory : string; // e.g. "3.52 MB"
Steve, I think all these would be useful. I've hit a slight problem with my diskspace method in that the command I use requires elevated privileges, and I don't really want to be messing with that. Could a tag for free diskspace be added if Cumulus already knows?
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus PC Diskspace Status Script

Post by steve »

Synewave wrote:Could a tag for free diskspace be added if Cumulus already knows?
It should be there somewhere; these are all functions provided by the exception handler, and it prints out the free disk space. I'll see if I can find it.
Steve
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Cumulus PC Diskspace Status Script

Post by mcrossley »

Paul

Are you using WMI to get the free disk space, most WMI get/read calls do not require elevated privileges?

Code: Select all

PowerShell
PS C:\Users\mcrossley> get-wmiobject win32_logicaldisk | where {$_.mediatype -eq 12} | format-table deviceid, size, freespace -auto

Code: Select all

UNTESTED VBScript
strComputer = "."

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colDisks = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk where MediaType = '12'")

For Each device in colDisks
    WScript.Echo device.DeviceId + " " + device.FreeSpace
Next
Synewave
Posts: 642
Joined: Mon 25 Jan 2010 1:55 pm
Weather Station: Watson W-8681
Operating System: Raspian
Location: Brighton, UK
Contact:

Re: Cumulus PC Diskspace Status Script

Post by Synewave »

Hi Mark,

No it's not as elaborate as that. I'm simply using the fsutil command and pipe the results into a txt file.

EDIT: just looking at WMIC now to see what I can do. But as Steve is going to add some new tags which I will use, I'll just experiment for now.
Post Reply