My VPS Disk is Filling or Full. How Can I Find Files and Clear Space?

One great tool for finding where your disk space is being used is called WinDirStat. It will display the files to you in a "tree" view showing the largest folders/files first and also in a graphical block view where bigger blocks are bigger files. Clicking on an item in one view will highlight the item in the other view for you making it easy to identify those items in both views. For example, clicking a folder in the tree view will create a rectangle around the blocks representing the files in that folder in the block view. Please keep in mind that your OS will occupy most of the disk space in your subscription we expect ~5 GB of space will be free for storage in a new subscription which is generally more than enough for a few trading platforms depending on your logging requirements.  WinDirStat Download

Of course if your disk is already full then we will need to take special care with the VPS. Please open a ticket with our help desk and we can try to clear some temporary files and see if we can't perform the analysis for you. After freeing space it is best to reboot / restart your VPS if the disk has gotten completely full so everything can get a fresh start.

Most subscribers will likely want to delete their MT4 .log & .hst files periodically to prevent the VPS hard drive from becoming full, which can lead to serious issues. Be sure that you will not require the data in those logs before proceeding.  It is easy to configure with a scheduled script.

You can also run the commands below via a command prompt window to delete the files once.
To access the command prompt: Click Start > Run... Then type cmd and press ENTER


Create a log/hst delete batch file

Open notepad and input the following text:

If deleting .log files:
For 2003 32-bit: del /S "C:\Program Files\*.log"
For 2008/2012 64-bit: del /S "C:\Program Files (x86)\*.log"

New for MT4 with 2008/2012: del /S "C:\Users\Administrator\AppData\Roaming\MetaQuotes\*.log"
 
If deleting .hst files:
For 2003 32-bit: del /S "C:\Program Files\*.hst"
For 2008/2012 64-bit: del /S "C:\Program Files (x86)\*.hst"

Save the file to your C drive as "deletefiles.BAT"

NOTE: If you have changed your default MT4 installation directory you will need to change "C:\Program Files\" & "C:\Program Files (x86)\" to the correct installation path.

Configure the script to run on schedule - Server 2003

  • Click Start > Control Panel > Scheduled Tasks, then select add a task
  • Click "Next" then "Browse"
  • Navigate to the file you just saved, C:\deletefiles.BAT and select it
  • Under "Perform this task", select "daily" and click "next"
  • Set a time to run the batch and click next
  • In the user name field, enter "Administrator"
  • Enter your Administrator password in the password fields
  • Click "Finish"


The MT4 log files will now be deleted on your schedule. The current log file may not be deleted since it could be in use by the platform.

Configure the script to run on schedule - Server 2008

  • Click Start > Administrative Tools, then select Task Scheduler
  • Click "Create Basic Task..."
  • Enter a task name, click Next
  • Select a trigger condition
  • Select "Start a program", click Next
  • Click Browse, navigate to the batch file that was created, C:\deletefiles.BAT and select it
  • Click "Finish"

The MT4 log files will now be deleted on your schedule. The current log file may not be deleted since it could be in use by the platform.

  • 0 Users Found This Useful
這篇文章有幫助嗎?

相關文章

You Have Been Blacklisted - Contact Support

Somehow, when you forgot your password or username, then you try many attemp to login to Client...

Why and When do I need a Dedicated CPU?

When you would need the Dedicated CPU If you are running more than 10 MT4 on a single VPS If...

Why Does the MT4 Program Often Shut Down by Itself?

One of the confusion and the most common question being asked is: why does the MT4 program...

Why am I Receiving a High Usage Notification

There is no single standard that can definitely determine the maximum amount of capacity that MT4...

Why Is My VPS Inaccessible, While WINNERvps Server Status is Online?

There are several factors, among others: Operating System on your VPS hangs so the application...