Script to get # of dead channels from OCDB
[u/mrichter/AliRoot.git] / FMD / scripts / checkSizes.sh
CommitLineData
2b893216 1#!/bin/bash
2
3extra=" DPMJET \
4 TDPMjet \
5 EPEMGEN \
6 TEPEMGEN \
7 HBTP \
8 THbtp \
9 HERWIG \
10 THerwig \
11 HIJING \
12 THijing \
13 ISAJET \
14 TIsajet \
15 LHAPDF \
16 MEVSIM \
17 TMEVSIM \
18 MICROCERN \
19 PDF \
20 PYTHIA6 \
21 TPHIC"
22base=" ALIFAST \
23 ALIROOT \
24 ANALYSIS \
25 CONTAINERS \
26 CRT \
27 DISPLAY \
28 EMCAL \
29 EVE \
30 EVGEN \
31 FASTSIM \
32 FLOW \
33 FMD \
34 HBTAN \
35 HLT \
36 ITS \
37 JETAN \
38 LHC \
39 MONITOR \
40 MUON \
41 PHOS \
42 PMD \
43 PWG0 \
44 PWG2 \
45 PWG3 \
46 RALICE \
47 RAW \
8b1c76de 48 HMPID \
2b893216 49 SHUTTLE \
50 START \
51 STEER \
52 STRUCT \
53 TOF \
54 TPC \
55 TRD \
56 VZERO \
57 ZDC"
58
59cat <<EOF > exclude
60*/tgt_*/*
61*/html/*
62.#*
63*/CVS*
64*~
65*.root
66*.so
67*.o
68EOF
69
70get_size()
71{
72 s=`du -X exclude -kc $1 | tail -n 1 | awk 'BEGIN {FS=" "}{print $1}'`
73 printf "\t%-30s\t%10d kB\n" $1 $s
74 total=`echo ${total} + ${s} | bc`
75}
76
77echo "Extras:"
78total=0
79for e in $extra ; do
80 get_size $e
81done
82for i in `seq 1 56` ; do echo -n "-" ; done
83mb=`echo $total / 1024 | bc`
84printf "\n\t%-30s\t%10d kB = %10d MB\n" "Total" $total $mb
85
86echo "Base:"
87total=0
88for b in $base ; do
89 get_size $b
90done
91for i in `seq 1 56` ; do echo -n "-" ; done
92mb=`echo $total / 1024 | bc`
93printf "\n\t%-30s\t%10d kB = %10d MB\n" "Total" $total $mb
94
95
96rm -f exclude