Tiago
Tiago

Reputation: 33

How to see disk usage of a VM instance on Google Cloud?

we have a Ubuntu 14 running on a GCE VM instance. Nagios is alarming with low space disk and I'm trying to figure what's going on.

I see this VM has 1 Boot disk, 4 additional disks, and no Local disks. How can I find which disk is out of space?

Upvotes: 3

Views: 7071

Answers (3)

Jose Paez
Jose Paez

Reputation: 847

Clicking on the instance > heading to the Monitoring tab

In that tab you will get all the info one can need about the instance in terms of CPU, memory, disk capacity and so on. One needs to first allow the operations agent and then it should be good to go 👍🏼

Upvotes: 0

Adiyya Tadikamalla
Adiyya Tadikamalla

Reputation: 977

  1. Login to https://console.cloud.google.com
  2. From top-left choose your project name
  3. On left Dashboard, click on "Compute Engin" then "VM instances" enter image description here
  4. Find your VM instance then click on “SSH” on the right side of that enter image description here
  5. In Terminal use the following commands to go top proper folder and see how much space you used
  • ls (to see list of folders )
  • cd floder-name ( to go to proper folder-name )
  • du -sh * | sort -hr | head -n10 ( to see a list how space each folder or file has used )

Note: Usually project folder will be at var/www/html location

Upvotes: 1

John Hanley
John Hanley

Reputation: 81464

SSH to your instance and execute the command df. This will show you the allocated and free space for each file system.

Upvotes: 5

Related Questions