diff --git a/src/scripts/processfinder.sh b/src/scripts/processfinder.sh index 98604df..25a0d02 100755 --- a/src/scripts/processfinder.sh +++ b/src/scripts/processfinder.sh @@ -5,6 +5,8 @@ CPU_THRESHOLD=90 # File path for output OUTPUT_FILE="/tmp/findsql.tmp" +touch $OUTPUT_FILE +chown oracle $OUTPUT_FILE # Capture the PIDs of Oracle processes consuming over the specified CPU threshold pid=($(top -b -n 1 | awk -v threshold="$CPU_THRESHOLD" '$12 ~ /^oracle/ && $9 > threshold {print $1}')) diff --git a/src/scripts/showdbparameter.sh b/src/scripts/showdbparameter.sh index 3b3feb5..ef690a6 100755 --- a/src/scripts/showdbparameter.sh +++ b/src/scripts/showdbparameter.sh @@ -4,6 +4,7 @@ OUTPUT_FILE="/tmp/database_parameters.tmp" > "$OUTPUT_FILE" # Clear the output file before starting +touch $OUTPUT_FILE chown oracle $OUTPUT_FILE # Execute the query to retrieve all database parameters