0

I am writing a script which checks space on UNIX servers. But I am unable to find the right command. I used the following but it gives me same percentage for all paths.

st = os.statvfs("/dev/hd3")

2

1 Answer 1

1

You give it the mount point, not the device name.

So, instead of e.g.

st = os.statvfs("/dev/hd3")

you do

st = os.statvfs("/boot")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.