Analyzing Java Applications on the Fly with Arthas

Arthas created by Alibaba is a tool that allows developers to connect to running Java applications without stopping them or suspending threads for debugging the application from the console. It offers features like monitoring invocation statistics, searching for classes and methods in the classloaders, view method invocation details (like parameters), show the stack trace of a method invocation, monitor system metrics and others. In the following examples I’m going to demonstrate some of these features applied to a running web application. ...

October 31, 2018 · 8 min · 1525 words · Micha Kops

Kubernetes Snippets

Rerun existing completed Job kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first! Replace an existing Job with itself kubectl get job JOBNAME -o yaml | kubectl replace --force -f - Sometimes there are errors importing the job template due to auto-generated labels or selectors .. a quick and dirty hack is to filter them out using jq ...

March 1, 2010 · 10 min · 1924 words · Micha Kops

Linux Snippets

These are not only linux snippets but also bash snippets and snippets using tools that run under Linux, *nix or sometimes even MacOSX, I should reorder this article someday ;) Settings for more reliable bash scripts set -euo pipefail this gives us …​ -e: exit script if a single command fails -u: exit script if an unset variable is used -o pipefail: return value of a pipeline is the status of the last command to exit with a non-zero status, or zero if no command exited with a non-zero status ...

March 1, 2010 · 15 min · 3006 words · Micha Kops