postgres=# select * from pg_stat_archiver;
$ sudo -u postgres psql -c " select * from pg_stat_archiver;"
$ sudo -u postgres psql -c " select last_archived_time, stats_reset from pg_stat_archiver;" \
| mutt -s "archived_time" root
echo "---------------------------------------------------------------------------------------" >> sysinfo.txt
echo "sudo -u postgres psql -c \"select last_archived_time, stats_reset from pg_stat_archiver;\""\
>> sysinfo.txt
echo "-------------------------------+-------------------------------" >> sysinfo.txt
sudo -u postgres psql -c "select last_archived_time, stats_reset from pg_stat_archiver;" \
>> sysinfo.txt
echo "---------------------------------------------------------------------------------------" >> sysinfo.txt
$ sudo -u postgres psql -c " select * from pg_stat_archiver;"
$ sudo -u postgres psql -c " select last_archived_time, stats_reset from pg_stat_archiver;" \
| mutt -s "archived_time" root
echo "---------------------------------------------------------------------------------------" >> sysinfo.txt
echo "sudo -u postgres psql -c \"select last_archived_time, stats_reset from pg_stat_archiver;\""\
>> sysinfo.txt
echo "-------------------------------+-------------------------------" >> sysinfo.txt
sudo -u postgres psql -c "select last_archived_time, stats_reset from pg_stat_archiver;" \
>> sysinfo.txt
echo "---------------------------------------------------------------------------------------" >> sysinfo.txt
Комментариев нет:
Отправить комментарий