Something
public text v1 · immutable#!/bin/bash
bean=`cat /proc/user_beancounters`
guar=`echo "$bean" | grep vmguar | awk '{ print $4;}'`
priv=`echo "$bean" | grep privvm | awk '{ print $2;}'`
let totl=guar/256
let used=priv/256
let free=totl-used
let per=used*100/totl
echo "VPS Memory:"
echo " total: $totl mb used: $used mb ($per%) free: $free mb"