Comments (2)
cpu:
HOSTS=(db2 db3 db1)
CPU_INFO=""
function get_cpu_info() {
local res="["
local not_first=false
for host in ${HOSTS[@]}; do
if [[ "$not_first" = true ]]; then
res="${res}, "
else
not_first=true
fi
local cpu_info="$(ssh "$host" "lscpu" | sed 's/"/\\"/g')"
res="${res}{\"$host\": \"${cpu_info}\"}"
done
res="${res}]"
CPU_INFO=$(jq -n "$res")
}
get_cpu_info \
&& echo "$CPU_INFO"
from postgres-checkup.
❗️ see also https://github.com/postgres-ai/nancy/blob/master/nancy_run.sh#L800
System:
uname -a
RAM:
cat /proc/meminfo
(with attention to: MemTotal
, Buffers
, Cached
, SwapTotal
, HugePages_Total
)
Disks:
df -T
, with attention to the partition where $PGDATA is located -- use df -T /path/to/PGDATA
(Ubuntu example: df -T df -T /var/lib/postgresql/9.6/main/
, CentOS: df -T /var/lib/pgsql/9.6/data
)
Virtualization:
hostnamectl status
(see https://serverfault.com/questions/595471/how-to-find-out-the-virtualization-type-of-an-linux-vps)
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.