Step 1: User creation :
Step 2: Adding the required authorization:
Step 3: Saving the password of HANACleaner1 in hana db user store in master node
Step 4: Create a folder and place the hanacleaner.py that we have downloaded from the github
Step5: Create configuration files: *.sh and *.cfg like shown below
A.CREATING *.sh files
==========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/rtedumpcleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/rtedumpcleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/alertscleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/alertscleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/logsegmentcleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/logsegmentcleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/objectlockcleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/objectlockcleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/objectlockcleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/objectlockcleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/ObjectHistoryTableCleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/ObjectHistoryTableCleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/diskfragmentation.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/diskfragmentation.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/eventscleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/eventscleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/Generalfilcleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/Generalfilcleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/backupcleaner.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/backupcleaner.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>> more /usr/sap/<SID>/HDB<nn>/HANACleaner/Generalfilcleaner1.sh
source $HOME/.bashrc
python /usr/sap/<SID>/HDB<nn>/HANACleaner/hanacleaner.py -ff /usr/sap/<SID>/HDB<nn>/HANACleaner/Generalfilcleaner1.cfg -op /usr/sap/<SID>/HDB<nn>/HANACleaner/log
=================================================
B.Creating all the *.cfg files that we referred above
This is where we actually specify the arguments that we have decided and it can vary from landscape to landscape.
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more alertscleaner.cfg
#HANA Alert cleaner
#minimum number retained days of the alerts=ar,output alerts=ao,output deleted alerts=ad
-ar 15
-ao true
-ad true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more columncompression.cfg
#Table compression re-optimization of column store tables can be automated
#cc-Max allowed raw main records,-ce Max allowed estimated size,cr-Max allowed rows,-cs #(mb)-Max allowed size,-cd Min allowed distinct count,-cq-Max allowed UDIV quota,-cu Max #allowed UDIVs
-cc 20000000
-ce 1
-cr 20000000
-cs 1000
-cd 10
-cq 30
-cu 20000000
-cb 200000
-cp true
-cm true
-co true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more diskfragmentation.cfg
#Disk fragmantation -fl fragmentation limit%,-fo output fragmentation
-fl 20
-fo true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more eventscleaner.cfg
#Event Cleaner,-eh minimum retained days for handled events days,-eu-minimum retained #days for unhandled events days
-eh 5
-eu 30
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more Generalfilcleaner.cfg
#General file cleaner eg:hanacleaner logs;retention days beyond which files can be cleaned #5days,gd-directories,-gw-filename parts
-gr 5
-gd /usr/sap/<SID>/HDB<nn>/HANACleaner/log
-gw hanacleanerlog
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more inihistorycleaner.cfg
#ini file cleaner -ir inifile content history retention in days
-ir 366
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more logsegmentcleaner.cfg
#Log Segment Cleaner -lr-maximum number of free log segments per
#service
-lr 1
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more objectcleaner.cfg
#Unknown object lock entries cleanup -kr min retained unknown object lock days
-kr 1
=========================
#object histor cleanup -om object history table max size in mb,-oo-output cleaned memory #from object table
-om 1
-oo true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more ObjectHistoryTableCleaner.cfg
#Object history cleanup -om object history table max size in mb,-oo-output cleaned memory #from object table
-om 50
-oo true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more objectlockcleaner.cfg
#object lock cleaner for UNNNOWN -kr-min retained unknown object lock days
-kr 1
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more rtedumpcleaner.cfg
#dump cleaner with 15 days of retention period
-dr 15
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more tracecleaner.cfg
#Trace files delete min retain for 30 days,output trace file, output the deleted trace file entry
-tc 30
-tf 30
-to true
-td true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more auditcleaner.cfg
#audit cleaner -ur retention time [days] of the audit log table
-ur 200
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more backupcleaner.cfg
#backup catalog cleanup older than 40 days and print the deleted entries
-be -1
-bd 40
-bb false
-bo false
-br false
#backuplog compress -zb backup logs compression size limit,-zp-zip path,-zl keep zip files
#-zb 1000
#-zp /usr/sap/<SID>/HDB<nn>
#-zl true
=========================
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner> more Generalfilcleaner1.cfg
#General file cleaner eg:hanacleaner logs -gr-etention days for
#any general file,-gw-filename parts
-gr 8
-gd /usr/sap/<SID>/HDB<nn>/<server_name>/trace,/usr/sap/<SID>/HDB<nn>/servernode1/trace,/usr/sap/<SID>/HDB<nn>/servernode2/trace,/usr/sap/<SID>/HDB<nn>/node3/trace,/usr/sap/<SID>/HDB<nn>/node4/trace,/usr/sap/<SID>/HDB<nn>/node5/trace,/usr/sap/<SID>/HDB<nn>/node6/trace,/usr/sap/<SID>/HDB<nn>/node7/trace,/usr/sap/<SID>/HDB<nn>/node8/trace
-gw indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz,indexserver_alert*.gz
sidadm@<server_name>:/usr/sap/<SID>/HDB<nn>/HANACleaner>
=========================
Step 6: Create crontab entries (time table depends on your needs)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |