Get disk usage from command line?

PixelGordo

New Member
May 13, 2017
2
0
1
52
This is my first post here, so hi to everyone and thanks for ProxMox. I've been using it in my small home server since the beginning of the year and I'm really delighted with it.

I'm creating a monitoring script for the ProxMox host and I can't figure out how to get data about disk usage. When I use lvs command, I get:

Code:
root@hub1:~/scripts/system_monitor# lvs
  LV            VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve  twi-aotz-- 65.91g             10.92  5.53                           
  root          pve  -wi-ao---- 27.75g                                                   
  swap          pve  -wi-ao----  4.00g                                                   
  vm-100-disk-2 pve  Vwi-aotz--  6.00g data        63.95                                 
  vm-101-disk-1 pve  Vwi-a-tz--  8.00g data        41.99
I see the size of each partition, but for some reason, I cannot see the usage percentage for root.

Regards and thanks in advance.
 

Denny

Active Member
Jul 28, 2016
69
13
28
55
Here is a snippet that grabs mount point and percentage. Adjust as you need to.

Code:
df -h  | grep -v Used | awk '{ print $1" " $5 "\t" }'
 

PixelGordo

New Member
May 13, 2017
2
0
1
52
The problem is that "df" doesn't give any information about the logical volumes for each CT.

So I assume I have to use both, "lvs" to get information about the volumes for CTs and "df" for the root system. I'd like to have just one command that gives me all the information I need, but if it can't be done, it can't be done.

Regards and thanks for your answer.
 

wolfgang

Proxmox Staff Member
Staff member
Oct 1, 2014
6,011
400
103
Hi,

you can use pvesm status

fore more information see man pvesm
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!