Skip to content

Instantly share code, notes, and snippets.

View harsxv's full-sized avatar
Turn cof​​​​​​fee into server uptime​

Harry Suryapambagya harsxv

Turn cof​​​​​​fee into server uptime​
View GitHub Profile
@mqu
mqu / README.md
Last active October 25, 2021 10:19
telegraf / disk usage / gitlab

Report disk usage for gitlab (omnibus installation) into influx database.

  • it will report report registry and git size in Mo.
  • data will be available at "telegraf/size/[registry,git]

provided files :

  • /etc/sudo.d/telegraf : need to run sudo du external command
  • /etc/telegraf/telegraf.d/inputs.exec-disk-usage.conf : main script managed by telegraf ; need to restart telegraf
  • /etc/telegraf/telegraf.d/scripts/exec-disk-usage is the script computing disk usage and reporting to telegraf computed size in influx format.
@nealfennimore
nealfennimore / wireguard.conf
Last active January 29, 2025 10:57
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@tcpdump-examples
tcpdump-examples / iowait-linux.md
Created March 21, 2021 11:40
How to Fix io wait issue in Linux

Linux high IOwait is a common Linux performance issue. Today we will look at what iowait means and what contributes to this problem. Hope this can give you more ideas about high IOwait issue.

What is IOwait?

IO wait is related to the CPU resource on the server.

The iowait column on top command output shows the percentage of time that the processor was waiting for I/O to complete. It indicates that the system is waiting on disk or network IO. Because the system is waiting on those resources, it can not fully utilize the CPU.

Learn more about what IOwait here.