Skip to content

Instantly share code, notes, and snippets.

View grieve54706's full-sized avatar
:octocat:

Grieve grieve54706

:octocat:
  • Canner
  • Taiwan
  • 01:48 (UTC +08:00)
  • LinkedIn in/grieve
View GitHub Profile

Linux watcher

Get the peak memory usage in the duration

How to install

// instal node 17
bash <(curl -sL https://gist.githubusercontent.com/grieve54706/81e7c6c69b34d92f383ea151b6f28a94/raw/e7edfb4d2ea514142ca045301e090270c3637457/upgrade-node.sh)

// reload env var

Pod watcher

K8s has metrics server to provide cpu and memory usage of pods. Default 60 seconds, can be changed using --metric-resolution flag. Official are not recommending setting values below 15s, as this is the resolution of metrics calculated by Kubelet.(ref1, ref2)

So I create this tool to watch cpu and memory and log peak usage of pods.

How to install

// instal node 17
bash &lt;(curl -sL https://gist.githubusercontent.com/grieve54706/acd9c1a411adab38c4f61f2b1497769f/raw/d42e76f3f8a3aaadf3055094df8c7dab3c688e2f/upgrade-node.sh)