source: TOOLS/PACK_IPSL/monitoring.sh @ 1978

Last change on this file since 1978 was 1978, checked in by aclsce, 9 years ago

Fixed bbugs

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3# Variables a renseigner
4# Stockage des fichiers pour monitoring de tous les users (pour l instant sur p86caub)
5export MONIT_DIR=/ccc/work/cont003/dods/public/MONIT_DIR
6export DODS_MONIT=/ccc/work/cont003/dods/public/DODS_MONIT
7
8testr=`LC_ALL=C date +"%Y%m%dT%H%M"`
9
10####### Boucle sur les USER (on doit etre connecte comme USER)
11echo "User" $USER
12
13mkdir -p $MONIT_DIR/${USER}_SIMUS
14
15# On lance le script qui donne l etat du traitement des donnees
16./showPackProgress.sh -p
17
18if [ -e ${MONIT_DIR}/monit_all_new.txt ]
19then
20    tail -1 ${MONIT_DIR}/monit_${USER}.txt >> ${MONIT_DIR}/monit_all_new.txt
21else
22    cp monit_header.txt ${MONIT_DIR}/monit_all_new.txt
23    tail -1 ${MONIT_DIR}/monit_${USER}.txt >> ${MONIT_DIR}/monit_all_new.txt
24fi
25
26####### fin boucle sur les USER
27
28datestr=`LC_ALL=C date +"%Y%m%dT%H%M"`
29cp ${MONIT_DIR}/monit_all_new.txt ${MONIT_DIR}/monit_all_${datestr}.txt
30mv ${MONIT_DIR}/monit_all_new.txt ${MONIT_DIR}/monit_all.txt
31
32#if [ -d ${MONIT_DIR}/${USER}_SIMUS ]
33#then
34#    rm -rf ${MONIT_DIR}/${USER}_SIMUS
35#fi
36#cp -rf ${USER}_SIMUS ${MONIT_DIR}/.
37
38#if [ "x$DODS_MONIT" != "x" ]
39#then
40#    rm -rf $DODS_MONIT
41#fi
42cp -prf $MONIT_DIR/* ${DODS_MONIT}/.
43chmod -R o+rX ${DODS_MONIT}
Note: See TracBrowser for help on using the repository browser.