tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Paul Kitwin <PAUKIT () HBSI ! COM>
To: tru64-unix-managers
Subject: Output adding
Date: Fri, 19 Dec 1997 19:37:48 +0000	[thread overview]
Message-ID: <96078620310570.tru64-unix-managers.marc@archive.invalid> (raw)

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. . . 

                 reply	other threads:[~1997-12-19 19:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox