Open martinmenge opened 8 years ago
I currently don't have access to redhat centos systems. Feel free to fix it and add a patch on development branch.
Sorry, I know this is old but I made a change to the code to detect all the disks and have them displayed. The above situation occurs when the OS is running on a VM. Below are my changes that works on physical or VM installs.
hddisk=$(lsblk | grep disk | awk '{print $1}')
df -h| grep "Filesystem\|/dev/${hddisk}*" > /tmp/diskusage
Tried this on two CentOS 6 servers. Disk Usages : "Filesystem Size Used Avail Use% Mounted on" No other data provided. I tried
df -h| grep 'Filesystem\|/dev/sda*'
on its own, same effect.I tried
df -h| grep 'Filesystem\|/dev/xvda1'
which worked. I edited the script to havedf -h| grep 'Filesystem\|/dev/xvda*'
but it was unchanged. I then tried xvda1 (no wildcard) and it worked on the one server.When I edited the scripts with the specific mount drives, I still only got the headers when I ran the script.