changeset 422:858e305288aa

Simple mem stat shell script.
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 14 Sep 2012 02:23:45 +0300
parents c685b3c5f40b
children c8c7935faa90
files profiles/DEBUG_/files/usr/sbin/mem.sh
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/DEBUG_/files/usr/sbin/mem.sh	Fri Sep 14 02:23:45 2012 +0300
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+out=0;
+
+for sz in `ps -axo rss=` ; do
+    out=$(( ${out} + ${sz} ));
+done
+
+echo "Memory used by userland programs: ${out}"