Last active
April 1, 2019 02:59
-
-
Save akhdaniel/432f9fffa42f03b9f205c4b280991abe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# sesuaikan dengan lokasi folder PG masing-masing | |
PGDATA=/var/lib/postgresql/9.5/main | |
pid=`head -1 $PGDATA/postmaster.pid` | |
echo "Pid: $pid" | |
peak=`grep ^VmPeak /proc/$pid/status | awk '{ print $2 }'` | |
echo "VmPeak: $peak kB" | |
hps=`grep ^Hugepagesize /proc/meminfo | awk '{ print $2 }'` | |
echo "Hugepagesize: $hps kB" | |
hp=$((peak/hps)) | |
echo Set Huge Pages: $hp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment