Answer the question
In order to leave comments, you need to log in
How to write the number of free RAM to a variable?
RAM values can be checked by typing the free -m command, but this displays a lot of unnecessary information, how can I make sure that the value of the free RAM is displayed, so that it would be normal to write it to a variable? or is there a special method for python?
Answer the question
In order to leave comments, you need to log in
It is possible through bash, it is possible on a python.free -m | sed -n 2p | awk '{print $4}'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question