Premise FreeSpace

Motorola Premise

Powox

Member
Hello

Here is a script that calculates the percent of freespace in your harddrive system.
You can add an alert if the space is too small

ex : if(TotalFree<500) then ... end if

if you have little space, premise can crash !!!
you can do an automatisation to send an alert email or recalculate all hours

Set fso = CreateObject("Scripting.FileSystemObject")
Set drives = fso.Drives

Dim TotalFree,TotalSize

For Each driveObject In drives
If driveObject.DriveLetter = "C" then
TotalSize = driveObject.TotalSize / 1048576
TotalFree = driveObject.FreeSpace / 1048576
alert(round(TotalFree*100/TotalSize,2) & " % free")
End If
Next

bye bye
Jean-Michel
 
...if you have little space, premise can crash !!!
I guess that statement is true for all Windows services and applications that require disk space during execution.

In fact, Premise loads its entire schema into RAM. It needs disk space primarily for the periodic backups it performs (i.e. writes a snapshot of its schema to the hard-disk).

Thanks for the script!
 
Hello

Here is a script that calculates the percent of freespace in your harddrive system.
You can add an alert if the space is too small

ex : if(TotalFree<500) then ... end if

if you have little space, premise can crash !!!
you can do an automatisation to send an alert email or recalculate all hours

Set fso = CreateObject("Scripting.FileSystemObject")
Set drives = fso.Drives

Dim TotalFree,TotalSize

For Each driveObject In drives
If driveObject.DriveLetter = "C" then
TotalSize = driveObject.TotalSize / 1048576
TotalFree = driveObject.FreeSpace / 1048576
alert(round(TotalFree*100/TotalSize,2) & " % free")
End If
Next

bye bye
Jean-Michel


I don't know much about Premise but I am curious why use a for loop when you are only doing a calculation IF the driveletter = "C"?
 
Hi!

myyaz33 : I think that it's possible to do an "eval", yes, but the script can check other drivers (with little modification). If you have a drive "D", "E", it can check these drives too and send an alert.
But it's true, make a boucle for one occurance is a heresy


123 : ex:
if drive C not freespace and if premise must write a file xdo (each new alert or error script rewrite the schema file on the server), the file can not be created and the schema premise is erased and you have lost everything (I already had this probleme because I create files by the scripts at each change light state or pear state or audio/video commutation)

Jean-Michel
 
Thanks Jean-Michel for bringing this up. Although I'm not short on space, I'd much rather know about this sort of thing before it erases all of my work! :D
 
Back
Top