diff --git a/check-perf-tuning b/check-perf-tuning index c1b1693..3f3f00e 100755 --- a/check-perf-tuning +++ b/check-perf-tuning @@ -96,19 +96,37 @@ else echo "" fi -echo "************************* POSTGRES **************************************" -echo "Configuration : /var/lib/pgsql/data/postgresql.conf" -echo "Custom-hiera : postgresql::server::config_entries:" -echo " max_connections:" -echo " shared_buffers:" -echo " work_mem:" -echo " checkpoint_segments:" -echo " checkpoint_completion_target:" -echo "Current values:" -cat /var/lib/pgsql/data/postgresql.conf | \ - grep 'max_connections\|shared_buffers\|work_mem\|checkpoint_segments\|checkpoint_completion_target\|effective_cache_size\|autovacuum_vacuum_cost_limit\|log_min_duration_statement' | \ - grep -v '^#' -echo "" +if [ -f /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf ]; then + # Satellite 6.8+ + echo "************************* POSTGRES **************************************" + echo "Configuration : /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf" + echo "Custom-hiera : postgresql::server::config_entries:" + echo " max_connections:" + echo " shared_buffers:" + echo " work_mem:" + echo " checkpoint_segments:" + echo " checkpoint_completion_target:" + echo "Current values:" + cat /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf | \ + grep 'max_connections\|shared_buffers\|work_mem\|checkpoint_segments\|checkpoint_completion_target\|effective_cache_size\|autovacuum_vacuum_cost_limit\|log_min_duration_statement' | \ + grep -v '^#' + echo "" +else + # Satellite 6.7 and earlier + echo "************************* POSTGRES **************************************" + echo "Configuration : /var/lib/pgsql/data/postgresql.conf" + echo "Custom-hiera : postgresql::server::config_entries:" + echo " max_connections:" + echo " shared_buffers:" + echo " work_mem:" + echo " checkpoint_segments:" + echo " checkpoint_completion_target:" + echo "Current values:" + cat /var/lib/pgsql/data/postgresql.conf | \ + grep 'max_connections\|shared_buffers\|work_mem\|checkpoint_segments\|checkpoint_completion_target\|effective_cache_size\|autovacuum_vacuum_cost_limit\|log_min_duration_statement' | \ + grep -v '^#' + echo "" +fi echo "************************* JAVA ******************************************" echo "Configuration : /etc/tomcat/tomcat.conf" diff --git a/postgres-size-report b/postgres-size-report index e0dd5dd..d8a9432 100755 --- a/postgres-size-report +++ b/postgres-size-report @@ -21,6 +21,12 @@ TABLEQUERY=$(cat <<-END END ) +if [ -f /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf ]; then + PGSQL_DIR="/var/opt/rh/rh-postgresql12/lib/pgsql" +else + PGSQL_DIR="/var/lib/pgsql" +fi + # echo $TABLEQUERY cd ~postgres @@ -49,8 +55,8 @@ echo "" echo "*************** FileSystem Usage ***************" echo "" -echo "du -hs /var/lib/pgsql/*" -du -hs /var/lib/pgsql/* +echo "du -hs $PGSQL_DIR/*" +du -hs $PGSQL_DIR/* echo -echo "du -hs /var/lib/pgsql/data/*" -du -hs /var/lib/pgsql/data/* +echo "du -hs $PGSQL_DIR/data/*" +du -hs $PGSQL_DIR/data/*