source: TOOLS/PACK_IPSL/monitoring.sh @ 1899

Last change on this file since 1899 was 1899, checked in by aclsce, 10 years ago

Added what is needed to use monitoring.

  • Property svn:executable set to *
File size: 1.1 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=$CCCWORKDIR/MONIT_MIGRATION
6export DODS_MONIT=$CCCWORKDIR/../../dods/public/p86caub/MONIT_MIGRATION
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_${USER}.txt >> ${MONIT_DIR}/monit_all_new.txt
21else
22    cp monit_header.txt ${MONIT_DIR}/monit_all_new.txt
23    tail -1 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
32if [ -d ${MONIT_DIR}/${USER}_SIMUS ]
33then
34    rm -rf ${MONIT_DIR}/${USER}_SIMUS
35fi
36cp -rf ${USER}_SIMUS ${MONIT_DIR}/.
37
38if [ "x$DODS_MONIT" != "x" ]
39then
40    rm -rf $DODS_MONIT
41fi
42cp -alf $MONIT_DIR ${DODS_MONIT}
43chmod -R o+rX ${DODS_MONIT}
Note: See TracBrowser for help on using the repository browser.