200250512

This commit is contained in:
dgsoft 2025-05-12 21:59:33 +02:00
parent 0b0b5a56be
commit a610cd5b5f
5 changed files with 66 additions and 0 deletions

2
Raspberry/cpu.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
top -b -n2 -d1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}' | tail -n1

3
Raspberry/gpu.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
/opt/vc/bin/vcgencmd measure_temp | sed -e "s/temp=//" -e "s/'C//g"

31
oracle/adr_purge.sh Normal file
View File

@ -0,0 +1,31 @@
#!/bin/bash
export NLS_LANG=GERMAN_GERMANY.AL32UTF8
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/12c/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_OWNR=oracle
export ORACLE_SID=orcl
export ORACLE_HOME_LISTNER=/u01/app/oracle/12c/dbhome_1
# Purge ADR contents (adr_purge.sh)
echo "INFO: adrci purge started at `date`"
adrci exec="show homes"|grep -v : | while read file_line
do
echo "INFO: adrci purging diagnostic destination " $file_line
echo "INFO: purging ALERT older than 30 days"
adrci exec="set homepath $file_line;purge -age 4320 -type ALERT"
echo "INFO: purging INCIDENT older than 30 days"
adrci exec="set homepath $file_line;purge -age 4320 -type INCIDENT"
echo "INFO: purging TRACE older than 30 days"
adrci exec="set homepath $file_line;purge -age 4320 -type TRACE"
echo "INFO: purging CDUMP older than 30 days"
adrci exec="set homepath $file_line;purge -age 4320 -type CDUMP"
echo "INFO: purging HM older than 30 days"
adrci exec="set homepath $file_line;purge -age 4320 -type HM"
echo ""
echo ""
done
echo
echo "INFO: adrci purge finished at `date`"

21
oracle/backup.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
export NLS_LANG=GERMAN_GERMANY.AL32UTF8
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/12c/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_OWNR=oracle
export ORACLE_SID=orcl
export ORACLE_HOME_LISTNER=/u01/app/oracle/12c/dbhome_1
rman target / <<EOF
shutdown immediate;
startup mount;
backup spfile;
backup database;
alter database open;
delete noprompt obsolete;
quit;
EOF

9
oracle/housekeeping.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
find /u01/app/oracle/admin/orcl/adump/ -name '*.aud' -mtime +11 -exec rm -f {} \;
echo "0" > $ORACLE_BASE/diag/tnslsnr/server/listener/trace/listener.log
echo "OK"