Last active
January 10, 2025 04:20
-
-
Save akhdaniel/432f9fffa42f03b9f205c4b280991abe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Terima kasih Pak Daniel.
Buat temen-temen yang masih pemula di linux, enggak pakai akun root mungkin ada yang bingung file ini gimana cara pakainya? Bisa ikuti langkah berikut:
saya harus pakai sudo, karena saya tidak menggunakan akun root.