Output adding

From: Paul Kitwin <PAUKIT_at_HBSI.COM>
Date: Fri, 19 Dec 1997 11:37:48 -0800

I am trying to create a monitoring script that will keep track of actual
memory use per user.

So far I have

ps -el > /tmp/mem.tmp
MEMM=`grep USER /tmp/mem.tmp | cut -b 45-90 | grep M | cut -b 1-4`
MEMG=`grep USER /tmp/mem.tmp | cut -b 45-90 | grep G | cut -b 1-4`
rm /tmp/mem.tmp
echo $MEMM
echo $MEMG

This gives me 2 strings of numbers. What I want to do next is add these
strings of numbers to get a Mb count and a Gb count. Than multiply the
Gb to convert to Mb than add the two values to see what an individual
user is actually using for memory.

My question is, how to I add the strings of the output of $MEMM and
$MEMG?

TIA
 


Put down the mouse, and step away from the keyboard. . .
Received on Fri Dec 19 1997 - 20:38:29 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT