sadm_daily_farm_fetch.sh

Updated: 2018/11/27
O/S : Aix, Linux, MacOS

 
NAME

sadm_daily_farm_fetch.sh   -   Gather disaster recovery and performance information files from all actives clients.

 
SYNOPSIS

sadm_daily_farm_fetch.sh     [ -v -h  ]    [ -d   0-9  ]   

 
DESCRIPTION
  • Collect all systems information and performance files produced on the SADM client.
  • Make sure the server receiving directory exist.
    • Make sure local directory exist for client (${SADMIN}/www/dat/${hostname}).
  • Get the $SADMIN root directory from /etc/environment on the client.
  • Get ready for Disaster Recovery by collecting data produced on the client.
    • Synchronize (rsync) client ${SADMIN}/dat/dr to ${SADMIN}/www/dat/${hostname}/dr on the server.
  • - Collect the performance statistic that were produce by the nmon daemon.
    • Synchronize (rsync) client ${SADMIN}/dat/nmon directory to ${SADMIN}/www/dat/${hostname}/nmon on the server.

    Sample of the script log on my server, it show exactly what the script is doing.
    
        2018.11.29 05:05:13 ================================================================================
        2018.11.29 05:05:13 Starting sadm_daily_farm_fetch.sh V3.3 - SADM Lib. V2.52
        2018.11.29 05:05:13 Server Name: holmes.maison.ca - Type: LINUX
        2018.11.29 05:05:13 CENTOS 7.5.1804 Kernel 3.10.0-862.14.4.el7.x86_64
        2018.11.29 05:05:13 ==================================================
        2018.11.29 05:05:13  
        2018.11.29 05:05:13 Processing All Actives Server(s)
        2018.11.29 05:05:13  
        2018.11.29 05:05:13 ----------
        2018.11.29 05:05:13 Processing (1) centos6.maison.ca
        2018.11.29 05:05:14 Make sure local directory /sadmin/www/dat/centos6 exist
        2018.11.29 05:05:14 Getting /etc/environment from centos6
        2018.11.29 05:05:14 SADMIN is install in /sadmin on centos6.
        2018.11.29 05:05:14 Make sure local directory /sadmin/www/dat/centos6/dr exist
        2018.11.29 05:05:14 rsync -ar --delete centos6:/sadmin/dat/dr/ /sadmin/www/dat/centos6/dr/
        2018.11.29 05:05:15 Make sure local directory /sadmin/www/dat/centos6/nmon exist
        2018.11.29 05:05:15 rsync -ar --delete centos6:/sadmin/dat/nmon/ /sadmin/www/dat/centos6/nmon/
        2018.11.29 05:05:15  
        2018.11.29 05:05:15 ----------
        2018.11.29 05:06:15 Processing (22) ubuntu1604.maison.ca
        2018.11.29 05:06:16 Make sure local directory /sadmin/www/dat/ubuntu1604 exist
        2018.11.29 05:06:16 Getting /etc/environment from ubuntu1604
        2018.11.29 05:06:16 SADMIN is install in /sadmin on ubuntu1604.
        2018.11.29 05:06:16 Make sure local directory /sadmin/www/dat/ubuntu1604/dr exist
        2018.11.29 05:06:16 rsync -ar --delete ubuntu1604:/sadmin/dat/dr/ /sadmin/www/dat/ubuntu1604/dr/
        2018.11.29 05:06:16 Make sure local directory /sadmin/www/dat/ubuntu1604/nmon exist
        2018.11.29 05:06:16 rsync -ar --delete ubuntu1604:/sadmin/dat/nmon/ /sadmin/www/dat/ubuntu1604/nmon/
        2018.11.29 05:06:17  
        ....
        2018.11.29 05:06:17 ----------
        2018.11.29 05:06:17 Processing (23) yoda.maison.ca
        2018.11.29 05:06:20 [ WARNING ] Can't Ping the sporadic system yoda.maison.ca
        2018.11.29 05:06:20             Continuing with next system
        2018.11.29 05:06:20  
        2018.11.29 05:06:20 ----------
        2018.11.29 05:06:20 FINAL number of Error(s) detected is 0
        2018.11.29 05:06:20  
        2018.11.29 05:06:20 ==================================================
        2018.11.29 05:06:20 Script return code is 0
        2018.11.29 05:06:20 Script execution time is 00:01:07
        2018.11.29 05:06:20 Trim History /sadmin/dat/rch/holmes_sadm_daily_farm_fetch.rch to 125 lines
        2018.11.29 05:06:20 Requested alert only if script fail (Won't send alert)
        2018.11.29 05:06:20 Trim log /sadmin/log/holmes_sadm_daily_farm_fetch.log to 2000 lines
        2018.11.29 05:06:20 Thu Nov 29 05:06:20 EST 2018 - End of sadm_daily_farm_fetch.sh
        2018.11.29 05:06:20 ================================================================================
        

 
OPTIONS

-d
Specify debug level (0-9).
Value of 0 indicate that no debug information is to be displayed.
-h
Display this help and exit.
-v
Output version information and exit.



REQUIREMENTS
 
EXIT STATUS
[0]    An exit status of zero indicates success
[1]    Failure is indicated by a nonzero value, typically ‘1’.

 
AUTHOR
Jacques Duplessis (jacques.duplessis@sadmin.ca.).
Any suggestions or bug report can be sent at http://www.sadmin.ca/support.php

 
COPYRIGHT
Copyright © 2018 Free Software Foundation, Inc. License GPLv3+:
    - GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software, you are free to change and redistribute it.
There is NO WARRANTY to the extent permitted by law.

 
SEE ALSO
sadm_server_sunrise.sh   (This is the script that execute the Daily Farm Fetch every morning)
sadm_database_update.py   (Update the SADMIN server database with all information collected the Daily Farm Fetch)
sadm_nmon_rrd_update.sh   (Update the performance statistics Database with the data that was collected by the Daily Farm Fetch)
sadm_backupdb.sh   (Do a backup of SADMIN Database)


 
INDEX
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
REQUIREMENTS
EXIT STATUS
AUTHOR
COPYRIGHT
SEE ALSO

Copyright © 2015-2019 - www.sadmin.ca - Suggestions, Questions or Report a problem at support@sadmin.ca