Comments (7)
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s1 234Gi 79Gi 151Gi 35% 946464 9223372036853829343 0% /```
from postgres-checkup.
show data_directory
from postgres-checkup.
psql -c 'show data_directory'
and then:
df -h %data_dir_from_psql%
from postgres-checkup.
PGDATA:
PGDATA="$(psql -tAX -U postgres -c 'show data_directory')"
df -T "${PGDATA}"
Важно использовать опции у psql -t
, -A
, -X
(хотя мы их, по идее, должны глобально использовать.
Насчет опции -h - не уверен, что нам надо ее тут задействовать, т.к., думаю, лучше взять количество байт в машиночитаемом виде, а дальше уже выводить в человекопонятном, когда надо (конвертируя в шаблоне, например). /cc @Nastradamus
Дальше – как мы обсуждали, стоит забрать данные также и о всех разделах (просто df -T
).
Также имеет смысл отдельно забрать данные по этим разделам, где сидят эти директории/файлы (важно, если оно вынесено на отдельные диски):
log_directory:
PGLOGDIR="$(psql -tAX -U postgres -c 'show log_directory')"
df -T "${PGLOGDIR}"
stats_temp_directory:
PGSTATSTMPDIR="$(psql -tAX -U postgres -c 'show stats_temp_directory')"
df -T "${PGSTATSTMPDIR}"
WAL directory:
version 10+:
df -T "${PGDATA}"/pg_wal
9.6 and older:
df -T "${PGDATA}"/pg_xlog
from postgres-checkup.
@NikolayS мы хотим использовать в будущем враппер, который будет определять как опрашивать хост: "через локальный psql" или через "ssh + psql". Поэтому, лучше разделить вызов этих комманд.
from postgres-checkup.
@Nastradamus да, согласен, давайте делать отдельно вызыв psql
и отдельно df
.
from postgres-checkup.
обновил инструкции #19 (comment)
- добавил WAL dir
- разделил psql & df
from postgres-checkup.
Related Issues (20)
- Glue all .md reports together
- Universal md report template for a cases when template not exists
- F001 F002 md reports
- Ability to add fake masters HOT 1
- Timeout for ssh and psql commands
- MD reports correct md format HOT 2
- F001_heap_bloat.sh won't work for 'postgres' database HOT 1
- Don't collect non-psql data if remote ssh is failed
- Fix bugs in dependency version comparison HOT 1
- Full support of PGPASSWORD env. value
- D007 Linux tools for troubleshooting HOT 1
- Extend check list based on previous experience HOT 1
- Fix bash 4 unbound variable in `bash -c`, fix UNIX socket with psql and localhost
- Проверять, не перезаписаны ли настройки HOT 1
- Rework H002 view
- Argument parser bug if variable contains a space
- A004: multiple databases support
- Installation/Usage problems HOT 2
- is this mirror stale? HOT 1
- Documentation volumes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres-checkup.