ubuntu ram check ssh 1

ubuntu ram check ssh

free -m | grep "Mem:"

Here is what the above code is Doing:
1. We’re using the subprocess module to run the command “free -m”
2. We’re using the grep command to filter the output of the free command to only show the line that contains the word “Mem:”
3. We’re using the pipe operator to connect the output of the free command to the input of the grep command

Similar Posts