daily pastebin goal
34%
SHARE
TWEET

memUsage.sh

a guest Nov 23rd, 2011 1,185 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. while [ 1 ]
  3. do
  4.   total=`cat /proc/meminfo | grep MemTotal | cut -d ":" -f 2 | cut -d "k" -f 1 | tr -d " "`
  5.   free=`cat /proc/meminfo | grep MemFree | cut -d ":" -f 2 | cut -d "k" -f 1 | tr -d " "`
  6.   currentTime=`date +%s`
  7.   echo -n $currentTime
  8.   echo -n " "
  9.   echo "$total - $free" | bc
  10.   sleep 1
  11. done
  12.  
  13.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top