Search Our Database
How to check the hard disk space and RAM allocated to your Cloud server
Introduction
Monitoring the available hard disk space and memory (RAM) on a cloud server is crucial for maintaining performance and ensuring that the server has enough resources to handle applications and workloads efficiently. Cloud servers can dynamically allocate resources, but it is essential for system administrators to regularly check available disk space and memory to prevent performance issues, system crashes, or resource exhaustion.
This guide outlines the steps required to check the hard disk space and memory allocated to your cloud server via SSH, using simple Linux commands. These commands provide detailed information about the server’s storage capacity and memory usage, helping you keep track of your server’s resource consumption.
Prerequisites
- Access to the cloud server via SSH.
- Root or administrative privileges.
- Basic familiarity with Linux command-line operations.
Step-by-step Guide
Step 1: Check Hard Disk Space
To view the available hard disk space on your server, use the df command with the -h flag, which displays the disk space in a human-readable format. Run the following command in your server’s SSH terminal:
df -h
The output will resemble the following example:
Filesystem Size Used Avail Use% Mounted on /dev/vda1 20G 7.1G 13G 36% /
In this example:
- Total Disk Space: 20GB is the total size of the disk.
- Used Disk Space: 7.1GB of disk space is currently in use.
- Available Disk Space: 13GB of disk space remains available.
- Usage Percentage: 36% of the total disk space is in use.
Step 2: Check Memory Usage
To view the memory (RAM) usage, use the free command with the -m flag, which displays the memory usage in megabytes. Run the following command in the SSH terminal:
free -m
The output will resemble the following example:
total used free shared buff/cache available Mem: 14877 1634 2552 770 10689 12069
In this example:
- Total Memory: 14,877MB (approximately 14.5GB) of memory is allocated to the server.
- Used Memory: 1,634MB is currently being used by active processes.
- Free Memory: 2,552MB is currently available for use.
- Buff/Cache: 10,689MB is being used by buffers and cache.
- Available Memory: 12,069MB is available for new processes and applications after considering buffers and cache.
Conclusion
By using the df -h and free -m commands, you can easily monitor the hard disk space and memory allocated to your cloud server. Regular monitoring helps ensure that your server has adequate resources for optimal performance and avoids potential issues caused by resource exhaustion.
Should you have any inquiries about the guidelines, please feel free to open a ticket through your portal account or contact us at support@ipserverone.com. We’ll be happy to assist you further.
Article posted on 20 April 2020 by Louis