Training - Menu formation
Différence entre versions
De MappingDoc
(→KN training plan) |
(→Command line and scripts) |
||
Ligne 26 : | Ligne 26 : | ||
==Usual operational tasks== | ==Usual operational tasks== | ||
==Command line and scripts== | ==Command line and scripts== | ||
+ | ===Regular basis script example=== | ||
+ | #Script de purge de log réalisé | ||
+ | #!/bin/bash | ||
+ | |||
+ | echo "Set des paramètres d'environnement nécessaires aux traitements" | ||
+ | |||
+ | echo "Set environment" | ||
+ | export MAPPING_PATH=/apps/mapping/conf/mapping.conf | ||
+ | |||
+ | echo "Création des variables d'environnements pour le chemin des binaires Mapping" | ||
+ | PATH_BIN="/apps/mapping/bin" | ||
+ | |||
+ | echo "Création des autres variables d'environnement" | ||
+ | TIMEDATE=`date "+%Y_%m_%d_%H_%M_%S"` | ||
+ | |||
+ | echo "Ma variablePATH_BIN : $PATH_BIN" | ||
+ | echo "MAPPING_PATH : $MAPPING_PATH" | ||
+ | |||
+ | echo "Création des variables d'environnements initialisées avec le mapping.conf nécessaire à l'éxécution du script" | ||
+ | PATH_LOG_BACKUP=`$PATH_BIN/map_004 PATH_LOG_BACKUP` | ||
+ | PATH_BASE_MAPPING=`$PATH_BIN/map_004 PATH_BASE_MAPPING` | ||
+ | |||
+ | echo "Ma variable PATH_LOG_BACKUP : $PATH_LOG_BACKUP" | ||
+ | echo "Ma variable PATH_BASE_MAPPING : $PATH_BASE_MAPPING" | ||
+ | echo "Ma timedate : $TIMEDATE" | ||
+ | |||
+ | echo "-------------------------- Archivage et compression des fichiers de logs ---------------------------------------------" | ||
+ | |||
+ | echo "Archivage des logs du répertoire /apps/mapping/spool/logs vers le répertoire de backup" | ||
+ | $PATH_BIN/map_cron -cleanlog -folder:$PATH_BASE_MAPPING/mapping_temp/log_temp | ||
+ | |||
+ | echo "Archivage des fichiers logs du répertoire de logs Mapping et de Log Custom Mapping" | ||
+ | tar -cvf $PATH_BASE_MAPPING/mapping_temp/log_temp/Archive_M-Connect_$TIMEDATE.tar $PATH_BASE_MAPPING/spool/mapping_log_custom | ||
+ | tar -cvf $PATH_BASE_MAPPING/log_archive/log_Archive_$TIMEDATE.tar $PATH_BASE_MAPPING/mapping_temp/log_temp | ||
+ | |||
+ | echo "Compression du répertoire log_archive" | ||
+ | gzip $PATH_BASE_MAPPING/log_archive/log_Archive_$TIMEDATE.tar | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | echo "--------------------- Suppression du contenu des répertoires de logs et des fichiers temporaires --------------------------" | ||
+ | |||
+ | |||
+ | echo "Suppression du contenu du répertoire de log de M-Connect" | ||
+ | rm -f $PATH_BASE_MAPPING/spool/mapping_log_custom/* | ||
+ | |||
+ | echo "Suppression du contenu du répertoire de log temporaire" | ||
+ | rm -f $PATH_BASE_MAPPING/mapping_temp/log_temp/* | ||
+ | |||
+ | |||
+ | echo "Suppression des spools sauvegardés" | ||
+ | $PATH_BIN/map_cron -cleanspool -state:saved | ||
+ | |||
+ | echo "Suppression des fichiers .id , .pid , historique , context_menu du répertoire /apps/mapping/temp de MAPPING" | ||
+ | $PATH_BIN/map_cron -cleanid | ||
+ | |||
+ | |||
+ | echo "Suppression des fichiers temporaires de plus 2 jours du répertoire /apps/mapping/temp de MAPPING" | ||
+ | |||
+ | find $PATH_BASE_MAPPING/temp -name "*cri.tmp" -mtime +2 -exec rm -f {} \; | ||
+ | find $PATH_BASE_MAPPING/temp -name "*ttf.tmp" -mtime +2 -exec rm -f {} \; | ||
+ | find $PATH_BASE_MAPPING/temp -name "compress_*" -mtime +2 -exec rm -f {} \; | ||
+ | find $PATH_BASE_MAPPING/temp -name "*.[0-9]" -mtime +2 -exec rm -f {} \; | ||
+ | find $PATH_BASE_MAPPING/temp -name "*.[0-9][0-9]" -mtime +2 -exec rm -f {} \; | ||
+ | find $PATH_BASE_MAPPING/temp -name "xps_*" -mtime +2 -exec rm -f {} \; | ||
+ | |||
+ | echo "Suppression du contenu de plus de 30 jours du répertoire d'archivage /apps/mapping/log_archive" | ||
+ | find $PATH_BASE_MAPPING/log_archive -name "*" -mtime +30 -exec rm -f {} \; | ||
+ | |||
==Supervision and monitoring== | ==Supervision and monitoring== | ||
==Unix and Linux specificities== | ==Unix and Linux specificities== | ||
==Multi-environment management== | ==Multi-environment management== |
Version du 24 octobre 2019 à 09:15
Sommaire
OPALE
ONYX
KN training plan
Process automation - Onyx server workflows - Base
- Mapping Onyx Installation on Linux
- Mapping Onyx update on Linux
- Main Mapping configuration file : mapping.conf (A traduire)
- Get a first hand on the workflows : Copy of a incoming file in the FS
- Sending the file to Mapping via map_lp
- creating an entry point
- Creating and executing a simple workflow
- analyzing the results
- Different way to send data to Mapping
Administration
Usual operational tasks
Command line and scripts
Regular basis script example
#Script de purge de log réalisé #!/bin/bash
echo "Set des paramètres d'environnement nécessaires aux traitements"
echo "Set environment" export MAPPING_PATH=/apps/mapping/conf/mapping.conf
echo "Création des variables d'environnements pour le chemin des binaires Mapping" PATH_BIN="/apps/mapping/bin"
echo "Création des autres variables d'environnement" TIMEDATE=`date "+%Y_%m_%d_%H_%M_%S"`
echo "Ma variablePATH_BIN : $PATH_BIN" echo "MAPPING_PATH : $MAPPING_PATH"
echo "Création des variables d'environnements initialisées avec le mapping.conf nécessaire à l'éxécution du script" PATH_LOG_BACKUP=`$PATH_BIN/map_004 PATH_LOG_BACKUP` PATH_BASE_MAPPING=`$PATH_BIN/map_004 PATH_BASE_MAPPING`
echo "Ma variable PATH_LOG_BACKUP : $PATH_LOG_BACKUP" echo "Ma variable PATH_BASE_MAPPING : $PATH_BASE_MAPPING" echo "Ma timedate : $TIMEDATE"
echo "-------------------------- Archivage et compression des fichiers de logs ---------------------------------------------"
echo "Archivage des logs du répertoire /apps/mapping/spool/logs vers le répertoire de backup" $PATH_BIN/map_cron -cleanlog -folder:$PATH_BASE_MAPPING/mapping_temp/log_temp
echo "Archivage des fichiers logs du répertoire de logs Mapping et de Log Custom Mapping" tar -cvf $PATH_BASE_MAPPING/mapping_temp/log_temp/Archive_M-Connect_$TIMEDATE.tar $PATH_BASE_MAPPING/spool/mapping_log_custom tar -cvf $PATH_BASE_MAPPING/log_archive/log_Archive_$TIMEDATE.tar $PATH_BASE_MAPPING/mapping_temp/log_temp
echo "Compression du répertoire log_archive" gzip $PATH_BASE_MAPPING/log_archive/log_Archive_$TIMEDATE.tar
echo "--------------------- Suppression du contenu des répertoires de logs et des fichiers temporaires --------------------------"
echo "Suppression du contenu du répertoire de log de M-Connect" rm -f $PATH_BASE_MAPPING/spool/mapping_log_custom/*
echo "Suppression du contenu du répertoire de log temporaire" rm -f $PATH_BASE_MAPPING/mapping_temp/log_temp/*
echo "Suppression des spools sauvegardés" $PATH_BIN/map_cron -cleanspool -state:saved
echo "Suppression des fichiers .id , .pid , historique , context_menu du répertoire /apps/mapping/temp de MAPPING" $PATH_BIN/map_cron -cleanid
echo "Suppression des fichiers temporaires de plus 2 jours du répertoire /apps/mapping/temp de MAPPING"
find $PATH_BASE_MAPPING/temp -name "*cri.tmp" -mtime +2 -exec rm -f {} \; find $PATH_BASE_MAPPING/temp -name "*ttf.tmp" -mtime +2 -exec rm -f {} \; find $PATH_BASE_MAPPING/temp -name "compress_*" -mtime +2 -exec rm -f {} \; find $PATH_BASE_MAPPING/temp -name "*.[0-9]" -mtime +2 -exec rm -f {} \; find $PATH_BASE_MAPPING/temp -name "*.[0-9][0-9]" -mtime +2 -exec rm -f {} \; find $PATH_BASE_MAPPING/temp -name "xps_*" -mtime +2 -exec rm -f {} \;
echo "Suppression du contenu de plus de 30 jours du répertoire d'archivage /apps/mapping/log_archive" find $PATH_BASE_MAPPING/log_archive -name "*" -mtime +30 -exec rm -f {} \;