Skip to content

Commit

Permalink
Update postgresql path to /var/opt/rh/rh-postgresql12/lib/pgsql/
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark authored and ehelms committed Oct 19, 2021
1 parent 9159c44 commit 16676c7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 17 deletions.
44 changes: 31 additions & 13 deletions check-perf-tuning
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 10 additions & 4 deletions postgres-size-report
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/*

0 comments on commit 16676c7

Please sign in to comment.