Kubectl - writing your own plugin

Sat 28 March 2020 by admin

Kubectl is an entrypoint for maintaing k8s clusters, you can find a lot useful switches to extract data. For example to get all containers images, just use:

$ kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{range .spec.containers}}{{printf \"%s\n\" .image}}{{end}}{{end}}"

Lots of switches ...

read more


Sun 17 June 2018 by admin

Easy alternative to fdisk and partprobe when resizing partition to its maximum. Extensively used in cloud environments (i.e. cloud-init).


read more

Sysdig Tracers

Sun 03 June 2018 by admin

Tracers is nice extension to one of my favourite tool sysdig to troubleshooting problems. Using damn simple approach of writing tags to /dev/null, give an idea about your app's health. More performing than popular statsd to measure duration, because of low overhead ca. 1 microsecond per tracer. Moreover ...

read more

HTTP Server-Timing

Sun 20 May 2018 by admin

One of the easiest way to visualize your app internal performance metrics on demand is too use pretty new standard described in:


combined it with for example Chrome Developers Tools from version 65. More practically with Python Flask app:

 5 ...
read more

Uninterruptible process state

Sun 13 May 2018 by admin

Looking for reason why some processes cannot be killed, you probably reach to process state called uninterruptible. Nice explanation:


Linux ps command shows which process is in that state by pinning D in process output list. But on which step this process really stuck ...

read more

Bash script template

Thu 20 April 2017 by admin

Writing bash scripts is a daily basis for sysops/devops teams. Some parts of each written script stay the same like being verbose for easy debugging, so it's good to have some templates. One of them helps us to deal with logs, which are written to log file and ...

read more

Videos Worth Sharing

Fri 09 December 2016 by admin

Videos is one of the easiest way to develop my skills. On the web there is a lot of news collectors, but I couldn't find a comprehensive list of videos in selected areas. So why not start a list of videos worth sharing...


read more

Doing Ops with human principles

Sat 25 June 2016 by admin

Really good manifest of human centric Ops:


read more

Misc Tips

Sat 25 June 2016 by admin

Tips from different categories:

  • how to get mount point from current working directory
# while true; do findmnt . && break; cd ../;  done
  • get all exit codes from pipeline
# true | false |true
# echo ${PIPESTATUS[*]}
1 0 1
  • get list of packages to upgrade
# apt-show-versions -u
  • get reverse package dependencies (installed)
# apt-cache rdepends --installed ...
read more

Command buffering control

Thu 31 December 2015 by admin

Debugging output from hping3 using grep via pipes doesn't show any result. It's because hping3 output is buffered, to make things working as you expect use tool called stdbuf from coreutils package in ubuntu and:

# stdbuf -oL hping3 -S -p 80 blog.witalis.net | grep <lookfor>

it means ...

read more