Does anyone know if there is a way to get the amount of free disk space using the FME Server API? I presume I could use a SystemCaller transformer and write out the information somewhere and access it that way, but wondering if there is an easier way. Just looking to get the same disk space details that are logged when a job runs (see screenshot). Thanks
Solved
Get available disk space programmatically using FME Server API?
Best answer by virtualcitymatt
You can use python to get that info easy enough:
modified from https://stackoverflow.com/questions/48929553/get-hard-disk-size-in-python
import fme
import fmeobjects
import shutil
def GetSize(object):
total, used, free = shutil.disk_usage("/")
object.setAttribute("Total",(total // (2**30)))
object.setAttribute("Used",(used // (2**30)))
object.setAttribute("Free",(free // (2**30)))
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.