Data storage with 2nd drive

My project server is running on a VM. here is a primary partition C: that runs the windows OS and Ignition. They just added a D: drive for history storage. I can monitor disk usage on C using the Available disk space tag. Is there any way to monitor the other drive?

You might could run some sort of wmic command to get this information. I used a similar script to check the cpu load on a separate VM.

def cpuLoad():
	import subprocess
	proc = subprocess.Popen(["powershell.exe", "wmic /node:<ipaddr> cpu get loadpercentage"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
	output =
	print output	
from import File
total = f.getTotalSpace()
free = f.getFreeSpace()

where would I use that? I am pretty new to Ignition and scripting

Probably in a project script and call it where needed from there. I would recommend checking out Inductive University for free training on things like this.
Inductive University Course List - Learn Ignition Free

1 Like

Note: I have no idea how expensive that call is, but it doesn't look like results are cached at all, so you want to be careful to not run it too often. As in, minutes between runs, not seconds.

I was originally using it in a client startup script. For something like this, I'd go every six hours or so.