sadm_housekeeping_client.sh
Updated: 2018/11/20
O/S : Aix, Linux, MacOS
NAME
sadm_housekeeping_client.sh
-
Make sure all files in $SADMIN have proper owner, group and permission.
SYNOPSIS
sadm_housekeeping_client.sh
[ -v -h ]
[ -d 0-9 ]
DESCRIPTION
- This script is executed as part of the daily end of day script (sadm_client_sunset.sh)
- You can run it separately whenever you want, its part of the end of day script to centralize end of day operations.
- So it is executed once a day, when the end day script is started at 23:23 from the client crontab.
- Operation done by the client housekeeping script :
-
Verify if the SADMIN user group (SADM_GROUP) specify in SADMIN configuration file exist on system.
If not an error message is issued and script abort with an exit code of 1.
-
Verify the SADMIN user (SADM_USER) specify in SADMIN configuration file exist on system.
If not an error message is issued and script abort with an exit code of 1.
-
Directories owner, group and permissions are set to what they should be (Set to SADM_USER:SADM_GROUP).
-
If system is defined as a SADMIN client (SADM_HOST_TYPE = C) in SADMIN configuration file,
Server directories are deleted ($SADMIN/www, $SADMIN/dat/dbb, $SADMIN/dat/net).
-
SADMIN server related files are deleted from client ($SADMIN/cfg/.dbpass/alert*.*).
-
Files group and permission are set to what they should be (Set to SADM_USER:SADM_GROUP).
-
Files older than 7 days are deleted from the temporary ($SADMIN/tmp) directory.
-
Delete pid files once a day in tmp directory ($SADMIN/tmp) - This prevent script not to run again if it crash.
-
Result Code History (*.rch) files in $SADMIN/dat/rch directory that are older than the number of days defined in SADMIN configuration file (SADM_RCH_KEEPDAYS) are deleted.
-
Log files (*.log) in $SADMIN/log directory that are older than the number of days defined in SADMIN configuration file (SADM_LOG_KEEPDAYS) are deleted.
-
Performance 'nmon' data files (*.nmon) in $SADMIN/dat/nmon directory that are older than the number of days defined in SADMIN configuration file (SADM_NMON_KEEPDAYS) are deleted.
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_housekeeping_server.sh
(Make $SADMIN server files and directories have proper owner, group and permission)
sadm_client_sunset.sh
(Daily end of the day script)
INDEX
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- REQUIREMENTS
-
- EXIT STATUS
-
- AUTHOR
-
- COPYRIGHT
-
- SEE ALSO
-