Hello,
this is my first post here.
I'm currently trying to get the free RAM in %.
It is important to me to achieve this via a single shell command.
ChatGPT gave me things like
and similarly suggested, but that doesn't work.
I would like to query the value from another computer via ssh.
On Debian I use
this is my first post here.
I'm currently trying to get the free RAM in %.
It is important to me to achieve this via a single shell command.
ChatGPT gave me things like
echo "scale=2; ($(sysctl -n vm.stats.vm.v_wire_count) + $(sysctl -n vm.stats.vm.v_free_count)) / ($(sysctl -n vm.stats.vm.v_page_count)) ) * 100" | BC
and similarly suggested, but that doesn't work.
I would like to query the value from another computer via ssh.
On Debian I use
free -m | awk 'NR==2 {printf "%d\n", $3/$2*100}'