Training - Menu formation

Différence entre versions

De MappingDoc
(Regular basis script example)
(Usual operational tasks)
Ligne 25 : Ligne 25 :
 
==Administration==
 
==Administration==
 
==Usual operational tasks==
 
==Usual operational tasks==
 +
 
==Command line and scripts==
 
==Command line and scripts==
 
===Regular basis script example===
 
===Regular basis script example===

Version du 24 octobre 2019 à 09:36

OPALE

ONYX

KN training plan

Process automation - Onyx server workflows - Base

  • Different way to send data to Mapping

Administration

Usual operational tasks

Command line and scripts

Regular basis script example

#Purge script example
#!/bin/bash
   echo "------------- Initialization of the parameters necessary for the execution of the script ---------------------"
      echo "Set environment"
         export MAPPING_PATH=/apps/mapping/conf/mapping.conf
      echo "Variable creation containing the path of the Mapping binaries"
         PATH_BIN="/apps/mapping/bin"
      echo "Creation of the other variables used in the script"
         TIMEDATE=`date "+%Y_%m_%d_%H_%M_%S"`
     echo "My variable PATH_BIN :  $PATH_BIN"
     echo "MAPPING_PATH : $MAPPING_PATH"
     echo "Variable creation and population set with the content of the mapping.conf file used by the script"
         PATH_LOG_BACKUP=`$PATH_BIN/map_004 PATH_LOG_BACKUP`
         PATH_BASE_MAPPING=`$PATH_BIN/map_004 PATH_BASE_MAPPING`
     echo "My variable PATH_LOG_BACKUP : $PATH_LOG_BACKUP"
     echo "My variable PATH_BASE_MAPPING : $PATH_BASE_MAPPING"
     echo "My timedate : $TIMEDATE"
  echo "-------------------------- Compression and archiving of the log files/folders ---------------------------------------------"
     echo "Archiivng of the log folder /apps/mapping/spool/logs in to the log backup folder"
         $PATH_BIN/map_cron -cleanlog -folder:$PATH_BASE_MAPPING/mapping_temp/log_temp
     echo "Packaging of the content of the mapping log folder and mapping Log Custom folder"
         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 of the archive log folder"
         gzip $PATH_BASE_MAPPING/log_archive/log_Archive_$TIMEDATE.tar
  echo "--------------------- Clean of the log folder and mapping log custom folder --------------------------"
     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 "clean of the saved spool files"
         $PATH_BIN/map_cron -cleanspool -state:saved
     echo "Clean of .id , .pid , historique , context_menu files of the mapping /apps/mapping/temp folder"
         $PATH_BIN/map_cron -cleanid
     echo "Clean of the temporally files older than 2 days of the /apps/mapping/temp folder"
         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

Unix and Linux specificities

Multi-environment management