view profiles/lua_web_ui/files/usr/sbin/mem.sh @ 476:51d48b4d40ce

Small mem stat utility.
author Aleksandr Rybalko <ray@ddteam.net>
date Mon, 24 Sep 2012 14:36:20 +0300
parents
children
line wrap: on
line source
#!/bin/sh

out=0;

for sz in `ps -axo rss=` ; do
    out=$(( ${out} + ${sz} ));
done

echo "Memory used by userland programs: ${out}K"

sysctl vm.vmtotal