$ apt-get install sysstat $ pidstat -r $ pidstat -r -p $(pidof java)
This will show both your memory and your swap usage:
# Size options are: -k, -m, -g $ free -m
Hard
CPU and Process