Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
test "90" -gt "$(df -h |grep /dev/vzfs | awk {'print $5'} | sed 's/\%//g')"
-gt
- more 90
- percentage on the disk df -h
- size information about the filling of the disk grep /dev/vzfs
- here you need to substitute your disk awk {'print $5'}
-5 column sed 's/\%//g'
- remove the percentage to compare the number. "The level of disk space went down", for example, with each write to any log.
There is no such journal. There may be errors in the log if the disk space has completely run out.
And to follow - you need to put some kind of monitoring.
Maybe the dmesg command will help. In general, all the logs in / val / log
Of course, there are logs (/val/log), but such information is not written there by default. If you need such monitoring, write a script and run it with cron.
Not suitable for everyone. but if you already use python, then you can give out any info like this:
py "(lambda t, u, f: f'Total: {t}; Used: {u} ({100*u/t:.0f}%); Free: {f} ({100*f/t:.0f}%)')(*shutil.disk_usage('/'))"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question