Skip to main content
Welcome guest. | Register | Login | Post

Check Disk Space on Windows Servers From Linux

No replies
supermike's picture
Offline
Joined: 2006-02-17

I stumbled backwards accidentally and discovered a feature where I can track disk space on Windows servers from Linux.

Just put a share on each drive you want to monitor on each windows server.

Then, install smbfs on your Linux system if you don't have that already.

Then, mount each of these shares using a syntax like:

mount -t smbfs -o 'username=MIKE,password=MYPASS,workgroup=MYDOMAIN,rw' //WINSRV1/SHARE1 /mnt/winsrv1share1

Now, do this:

df -h | grep -i "//WINSRV1/SHARE1" | cut -d " " -f 8

...and you get the used disk space

df -h | grep -i "//WINSRV1/SHARE1" | cut -d