File: sanSize.sh

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (19 lines) | stat: -rwxr-xr-x 433 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#this script tells the total size of all the ckpt files on teracluster
#it takes no args and expects a file 'hosts' to contain a list of nodes

a=0
for X in 0 1 2 3 4 5 6 7  
do
  for Y in `ls -l /san/global_$X/$USER | tr -s ' ' | cut -f 5 -d ' '` 
  do
    a=`expr $a + $Y` 
  done
done
a=`echo "scale=2; $a/$[1024*1024]" | bc`
#a=`expr $a / $[ 1024 * 1024 ]`
echo "Total Size : $a MB"
#echo "$@, $a" >> ckpt_sizes
wait