Last change
on this file since 6342 was
2413,
checked in by labetoulle, 9 years ago
|
Move all scripts to the same dir to use common configuration files
|
-
Property svn:executable set to
*
|
File size:
1.7 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # |
---|
3 | #--------------------------------------------- |
---|
4 | while [ $# -ne 0 ] |
---|
5 | do |
---|
6 | case $1 in |
---|
7 | *) |
---|
8 | break ;; |
---|
9 | esac |
---|
10 | done |
---|
11 | |
---|
12 | #. /etc/profile |
---|
13 | |
---|
14 | # cron pour garder trace de la compta et des volumes de fichiers crees |
---|
15 | # a executer chaque matin a 6h00 |
---|
16 | |
---|
17 | # 1- sauvegarde des fichiers au fur et a mesure dans WORK |
---|
18 | cp /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_LOGIN /ccc/work/cont003/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_LOGIN_$(date +%F) |
---|
19 | cp /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_ALL /ccc/work/cont003/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_ALL$(date +%F) |
---|
20 | cp /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_STORE /ccc/work/cont003/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_STORE$(date +%F) |
---|
21 | |
---|
22 | # 2- on garde la trace de chaque login, date en tete, en remplacant le fichier a chaque fois : OUT_CONSO_LOGIN |
---|
23 | ccc_myproject|sed -e'1,/gencmip6/d' |sed -e'/Total/,$d'|grep -v Login|grep -v '^$/' | awk '{print system("echo -n $(date +%F)") " " $1 " " $2 }' > /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_LOGIN |
---|
24 | |
---|
25 | # 3- on garde le total, date en tete en accumulant dans le fichier OUT_CONSO_ALL |
---|
26 | echo $(date +%F) $( ccc_myproject|sed -e'1,/gencmip6/d' |grep Total |head -1 | awk '{print $2}' ) >> /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_ALL |
---|
27 | |
---|
28 | # 4- volume cree sur STORE |
---|
29 | # par login qui a consomme, en remplacant le fichier a chaque fois : OUT_CONSO_STORE |
---|
30 | # |
---|
31 | for i in $(ccc_myproject|sed -e'1,/gencmip6/d' |sed -e'/Total/,$d'|grep -v Login|grep -v '^$/' | grep -v 0.0 | awk '{print $1 }' ) ; |
---|
32 | do |
---|
33 | # cd $ STOREDIR et decompte des fichiers |
---|
34 | echo -n $i " " ; du -sbh $(ccc_home -A -u $i)/IGCM_OUT/IPSLCM6 |
---|
35 | done >/ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_STORE |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.