/[PAMELA software]/productionkit/deamons/src/dskspcdeamon.sh
ViewVC logotype

Annotation of /productionkit/deamons/src/dskspcdeamon.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Thu Nov 30 14:09:20 2006 UTC (18 years ago) by mocchiut
Branch point for: productionkit, MAIN
File MIME type: application/x-sh
Initial revision

1 mocchiut 1.1 #!/bin/bash
2    
3     source /gpfs/wizard/flight/production/installed/set_pam_env.sh > /dev/null 2>&1;
4    
5     if [ "$PAM_BIN" == "" ]; then exit; fi
6    
7     export PRODDIR=/gpfs/wizard/flight/production/
8    
9     export WRKDIR=$PRODDIR/deamons/wrkdir/
10    
11     export MAIL=Emiliano.Mocchiutti@ts.infn.it
12    
13     #export CCMAIL=Emiliano.Mocchiutti@ts.infn.it
14     export CCMAIL=boezio@ts.infn.it
15    
16     echo "3601" > $WRKDIR/dskspc.step
17    
18     TIME=`tail -1 $WRKDIR/dskspc.step`;
19    
20     while [ $TIME -gt 0 ]; do
21    
22     C=0;
23    
24     for word in `/bin/df /gpfs/wizard/`; do
25    
26     let C=$C+1;
27    
28     if [ $C -eq 11 ]; then
29    
30     GB=`echo $word`;
31    
32     fi;
33    
34     done;
35    
36     #echo $GB
37    
38     if [ "$GB" -lt 5000000 ]; then
39    
40     DF=`df `
41    
42     echo "DEAMONS STOPPED: $DF" | mail -s "WARNING: NO SPACE LEFT IN /gpfs/wizard/" -c $CCMAIL $MAIL
43    
44     for file in `ls $WRKDIR/*.step`; do
45    
46     echo "-1" > $file;
47     # echo $file
48    
49     done;
50    
51     #else
52    
53     # echo "a lot of space"
54    
55     fi;
56    
57     #exit
58    
59     sleep $TIME;
60    
61     TIME=`tail -1 $WRKDIR/dskspc.step`;
62    
63     done;

  ViewVC Help
Powered by ViewVC 1.1.23