The following example demonstrates how to display disk usage for all Volumes.
A PHP file called Disk_usage_for_all_volumes.php can be found in <installdir>/apisamples. Read more in Accessing Example API Functions.
The PHP script finds all Volumes available to the User and prints the following result messages for each Volume on the screen:
- Volume ID
- Quota Type
- Soft Quota
- Hard Quota
- On Disk Size (in bytes)
- Size Of Deltas (in bytes)
- Total Delta Size (in bytes)
If the limits have been exceeded, you will receive the following messages:
- "Soft Quota has exceeded the limit"
- "Hard Quota has exceeded the limit"
The following steps can be accomplished by using this script:
- Find all Volumes.
- Display information for each Volume
Below, you can find the steps to take in the program user interface in order to perform the same actions as the script. We also provide you with screen-shots illustrating the scripts for every step.
Log in to the CDP Server user interface using your username and password.
1. Click on "Volumes" in the Main Menu to access the Volumes page.
2. The Volumes list provides information about Volumes in grid format.
- Name - Name used to identify the Volume in the system. For example, to assign a Volume to the Disk Safe, you need to select a Volume name from the drop-down menu.
- Description - Additional information describing the Volume. The Description is displayed in the Volumes list.
- Volume Path - Absolute path to the directory where the Volume is located. Example: c:\main_volume, /volume1.
- Quota Type - Quotas are set to limit the disk usage of the Volume. It can be "On Disk Size" or "Size of Deltas in Disk Safe." See a detailed description in Creating Volumes.
- Soft Quota - Value in bytes, KB, MB, GB, or TB representing the threshold at which users are informed that they are close to reaching their effective data usage limit.
- Hard Quota - Value in bytes, KB, MB, GB, or TB representing the maximum amount of resources allowed to be occupied by data.
- On Disk Size - Value in bytes showing the amount of disk space occupied by the Volume.
- Deltas - Value in bytes representing the amount of data that has changed since the last backup run.
The "Details" pane provides detailed information about the Volume selected in the list.