changeset 476:51d48b4d40ce

Small mem stat utility.
author Aleksandr Rybalko <ray@ddteam.net>
date Mon, 24 Sep 2012 14:36:20 +0300
parents e18ace4cda67
children 49a14435cb56 404f54d7ada7
files profiles/lua_web_ui/files/usr/sbin/mem.sh
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/usr/sbin/mem.sh	Mon Sep 24 14:36:20 2012 +0300
@@ -0,0 +1,11 @@
+#!/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