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
tcping myaksclust-myresourcegroup-c33803-9kibbvlt.hcp.eastus.azmk8s.io 443 | |
seq 0: tcp response from 20.121.80.211 [open] 75.465 ms | |
seq 1: tcp response from 20.121.80.211 [open] 75.355 ms | |
seq 2: tcp response from 20.121.80.211 [open] 75.230 ms | |
seq 3: tcp response from 20.121.80.211 [open] 79.054 ms | |
seq 4: tcp response from 20.121.80.211 [open] 75.140 ms | |
^C | |
time kubectl get pods | |
No resources found in default namespace. |
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 | |
# Ubuntu 25.04 Desktop Setup Script | |
# This script is intended to run on a freshly installed Ubuntu 25.04 server | |
# It installs the desktop environment and xRDP for remote desktop access | |
# | |
# WARNING: This script enables remote desktop access which may have security implications | |
# Make sure to use strong passwords and consider firewall rules | |
# | |
# Example usage: | |
# curl -sSL bit.ly/ubuntu2504desktop -O |
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
cat jtest.go | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
cnpg "github.com/cloudnative-pg/cloudnative-pg/api/v1" // Import the CNPG API types | |
) |
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
#### tested on r6i.16xlarge with RDS Postgres | |
pgbench -i -s 10 --foreign-keys | |
pgbench -N -M prepared -T 360 -P 5 -c 512 -j 8 | |
psql -c "create extension pageinspect" | |
psql <<EOF | |
-- this query will return one row for each SLRU page. |
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 | |
INIT_TABLE_ROWS=20000000 | |
PGBENCH_TRANSACTIONS_PER_CLIENT=100000 | |
PGBENCH_CLIENTS=10 | |
run_test() { | |
echo "$(date +%y%m%d.%H%M) STARTING TEST $1" | |
pg_stop |
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
function thread_init() | |
h = sysbench.histogram.new(1000, 1, 100) | |
end | |
function event() | |
h:update(sysbench.rand.default(1, 100)) | |
end | |
function thread_done() | |
h:print() |
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
# https://github.com/brendangregg/FlameGraph | |
# | |
# skipping directories "test" and "demos" | |
~/src/FlameGraph$ for F in $(find . -type f -a \! -path ./test\* -a \! -path ./.git\* -a \! -path ./demos\*); do echo $(egrep "(Free Software.*version|CDDL-|Apache)" $F||echo "UNKNOWN") -- $F -- $(git shortlog -s $F|awk '{$1="";print}') ; done | sort | |
# as published by the Free Software Foundation; either version 2 -- ./difffolded.pl -- Brendan Gregg | |
# as published by the Free Software Foundation; either version 2 -- ./stackcollapse-bpftrace.pl -- Jose Fernandez Peter Sanford |
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
-- Jeremy Schneider's psqlrc http://ardentperf.com | |
-- | |
-- see also https://www.citusdata.com/blog/2017/07/16/customizing-my-postgres-shell-using-psqlrc/ | |
-- | |
\set QUIET 1 | |
select case when count(*)=0 then 'select ''not-aurora'' as avers' | |
else 'select aurora_version() as avers' | |
end as aurora_version_query | |
from pg_settings where name='rds.extensions' and setting like '%aurora_stat_utils%' \gset |