Hey guys, I am writing a script to grep my local-lvm usage then output to a json file.
I am currently use "pvesm status" method:
But, as you can see that, the `pvesm` command is a bit intensive, and also takes more time (0.5 second is a lot).
I am calling this pvesm command for every few seconds, causing cpu fan much louder, which is not good.
I would like to know if there is any other solution(or command) to get a "lvm basic usage" using bash, without taking too much time to grep a result?
Thanks guys~
I am currently use "pvesm status" method:
Bash:
time pvesm status | grep "local-lvm"
local-lvm lvmthin active 158994432 119532013 39462418 75.18%
real 0m0.526s
user 0m0.311s
sys 0m0.029s
But, as you can see that, the `pvesm` command is a bit intensive, and also takes more time (0.5 second is a lot).
I am calling this pvesm command for every few seconds, causing cpu fan much louder, which is not good.
I would like to know if there is any other solution(or command) to get a "lvm basic usage" using bash, without taking too much time to grep a result?
Thanks guys~
Last edited: