4 minute read

Collect & process data produced by all actives clients

SYNOPSIS [-d 0-9] [-h] [-v]
$SADMIN/bin/ - v2.8
Posted 2021-05-26 - Updated 2021-06-03
Supported on Linux
Can only be run on SADMIN Server.


This script have multiple functions :
1- First, it make sure that your $SADMIN directories permissions and ownerships are inline with the one you specified in the SADMIN configuration file. This is the responsibility of the script.

2- Secondly, it collect all the latest performance data and configuration of all your actives clients. This is the responsibility of the script.

3- It then update the SADMIN database with the latest system information files just collected.
This is the responsibility of the script.

4- It is responsible to update the rrd database (Round Robin Database) that allow you to view the performance graph of your systems.
This is done by the script.

5- The next step is to scan the network subnet you selected to give you an exact picture of your IP usage and take a backup of your SADMIN database.
This step is done by the script.

6- Finally, a backup of the SADMIN database is taken by the script.

This script does a lot of things but actually all it does is to start the six scripts that will do each a different job. It has to run early in the morning, so when you wake up or arrive to work you have the latest information about your systems. You may change the execution time if you want in “/etc/cron.d/sadm_server” but it as to run early in the morning and after the “” script on the clients. The “” script is the one that generate the latest data that this script is collecting and processing.

Portion of server crontab that execute this script

# cat /etc/cron.d/sadm_server 
# Early every morning - Collect Perf data, Update & backup DB, Network scan, Housekeeping
05 05 * * * sadmin sudo ${SADMIN}/bin/ >/dev/null 2>&1

This script is responsible to run these six scripts once a day (1)

  • Make sure all the server files in “$SADMIN” have proper owner, group and permission
  • Remove files older than 7 days in “$SADMIN/tmp” directory
  • Remove pid files (once a day) in “$SADMIN/tmp” directory
  • Archive alert older than 30 days to $SADMIN/cfg/alert_archive.txt
  • Remove *.rch files in “${SADMIN}/dat/rch” older than “${SADM_RCH_KEEPDAYS}
  • Remove *.log files in “${SADMIN}/log” older than “${SADM_LOG_KEEPDAYS}
  • Remove *.nmon files in “${SADMIN}/dat/nmon” older than “${SADM_NMON_KEEPDAYS}
  • Check existence on the server of “$SADMIN_USER” and “$SADMIN_GROUP
  • Verify if “$SADMIN_USER” is not lock or the password is expired (2)

  • Sync clients disaster recovery directory “$SADMIN/dat/dr” to local “$SADMIN/www/dat/$server/dr”
  • Sync clients performance data files “$SADMIN/dat/nmon” to local “$SADMIN/www/dat/$server/nmon” (3)

  • Update the SADMIN server database with information collected the Daily Farm Fetch (4)

  • Update the performance statistics database (rrd) with the data that was just collected (5)

  • Scan the network subnet specified in sadmin.cfg and update the sadmin database (6)

  • Do a backup of all MySQL Databases

Back to the top


Thu May 27 05:05:05 EDT 2021 - V2.8 - SADM Lib. V3.70
Server Name: - Type: LINUX
CENTOS 7.9.2009 Kernel 3.10.0-1160.25.1.el7.x86_64
Running /sadmin/bin/ ...
[ SUCCESS ] Running /sadmin/bin/
Running /sadmin/bin/ ...
[ SUCCESS ] Running /sadmin/bin/
Running /sadmin/bin/ ...
[ SUCCESS ] Running /sadmin/bin/
Running /sadmin/bin/ ...
[ SUCCESS ] Running /sadmin/bin/
Running /sadmin/bin/ ...
[ SUCCESS ] Running /sadmin/bin/
Running /sadmin/bin/ ...
[ SUCCESS ] Running /sadmin/bin/

Script exit code is 0 (Success) and execution time is 00:33:21
History (/sadmin/dat/rch/holmes_sadm_server_sunrise.rch) trim to 35 lines.
Script will send an alert only when it terminate with error ($SADM_ALERT_TYPE=1).
Script succeeded, no alert will be send to 'default' alert group.
New log (/sadmin/log/holmes_sadm_server_sunrise.log) created ($SADM_LOG_APPEND='N').
End of - Thu May 27 05:38:23 EDT 2021

Back to the top


Options Description
[ -d 0-9 ] Set debug level from 0 to 9 (Default is 0)
[ -h ] Display this help and exit.
[ -v ] Output version information and exit.


  • The “$SADMIN” environment variable must be defined and contains the root directory of the SADMIN tools (normally /opt/sadmin). It should be already done, the setup script have updated the ‘/etc/profile.d/’ and the ‘/etc/environment’ files.
  • The SADMIN configuration file, is needed and loaded in memory at the beginning of every scripts. This file should already exist and contains your SADMIN configuration and preference setting.
  • For Shell script the Shell Library is used and for Python script the Python Library is used.


Exit Code Description
0 An exit status of zero indicates success.
1 Failure is indicated by a nonzero value, typically ‘1’.


Jacques Duplessis
Any suggestions or bug report can be submitted at the support page

Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
This is free software, you are free to change and redistribute it.
There is NO WARRANTY to the extent permitted by law.

SEE ALSO - Purge old log,rch,nmon files and check $SADMIN permission - Collect Hardware/Software/Performance data from actives servers - Take data collected from clients and update database - Daily performance database update - Scan network selected subnet & store info in database - Backup one or all MySQL/MariaDB databases on the system
sadmin.cfg - SADMIN main configuration file
System Information File - Documentation about the system information file - Clients end of day housekeeping and producing system information files