# Data storage with 2nd drive

**URL:** <https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516>\
**Category:** Ignition\
**Created:** [March 23, 2023, 6:00pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516 "2023-03-23T18:00:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Higgins1](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@Nathan\_Higgins1](https://forum.inductiveautomation.com/u/Nathan_Higgins1)\
**Post date:** [March 23, 2023, 6:00pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/1 "2023-03-23T18:00:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 23, 2023, 6:53pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/2 "2023-03-23T18:53:40Z")

</div>

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.

```auto
def cpuLoad():
	import subprocess
	proc = subprocess.Popen(["powershell.exe", "wmic /node:<ipaddr> cpu get loadpercentage"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
	output = proc.stdout.read()
	print output	
cpuLoad()

```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 23, 2023, 7:00pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/3 "2023-03-23T19:00:18Z")

</div>

```python
from java.io import File
f=File("D:\\")
total = f.getTotalSpace()
free = f.getFreeSpace()

```

---

<div class="post-metadata">

**Author:** ![Nathan\_Higgins1](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@Nathan\_Higgins1](https://forum.inductiveautomation.com/u/Nathan_Higgins1)\
**Post date:** [March 23, 2023, 7:12pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/4 "2023-03-23T19:12:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 23, 2023, 7:24pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/5 "2023-03-23T19:24:27Z")

</div>

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](https://inductiveuniversity.com/courses/ignition/scripting-in-ignition/8.1)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 23, 2023, 10:20pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/6 "2023-03-23T22:20:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 23, 2023, 10:27pm UTC](https://forum.inductiveautomation.com/t/data-storage-with-2nd-drive/71516/7 "2023-03-23T22:27:49Z")

</div>

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