Révision 89898512
Fixed output of transactions script
The current output of this script is:
root@master:/etc/munin/plugins# ./pg_transactions
\ncommits.value xxxx\nrollbacks.value xxxx
By removing the first `\n` and by adding an `E` before the second `\n` the output is:
root@master:/etc/munin/plugins# ./pg_transactions
commits.value xxxx +
rollbacks.value xxxx
And lastly by adding the `--no-align` attribute you get the correct output:
root@master:/etc/munin/plugins# ./pg_transactions
commits.value xxxx
rollbacks.value xxxx
| plugins/postgresql/postgresql_transactions | ||
|---|---|---|
| 40 | 40 |
echo 'rollbacks.info Number of transaction rollbacks.' |
| 41 | 41 |
exit 0 |
| 42 | 42 |
fi |
| 43 |
psql -h ${dbserver} -U ${dbuser} -tc "SELECT '\ncommits.value '||SUM(xact_commit)::TEXT || '\nrollbacks.value '||SUM(xact_rollback)::TEXT FROM pg_stat_database;"
|
|
| 43 |
psql -h ${dbserver} -U ${dbuser} -tc "SELECT 'commits.value '||SUM(xact_commit)::TEXT||E'\nrollbacks.value '||SUM(xact_rollback)::TEXT FROM pg_stat_database;" --no-align
|
|
Formats disponibles : Unified diff