Category Archives: Administration

Linux. History of system usage

There is a way to monitor your system usage and log to a file easily — with atop command. On my Ubuntu it can be installed with

It can be started as a top command — it’s output almost the same. But the most interesting feature is that it starts a daemon that logs …

Read more

Kubernetes’ cronjobs

That’s what it is — https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ Get all cronjobs in env:

Get info on exact cronjob:

Get pods with this cronjob:

Get logs of cronjob

you can add -f for live updating logs and -p for watching logs of previous pod.

Crontab time format

That’s about it: min hour day/month month day/week Execution time 30 0 1 1,6,12 * — 00:30 Hrs  on 1st of Jan, June & Dec. 0 20 * 10 1-5 –8.00 PM every weekday (Mon-Fri) only in Oct. 0 0 1,10,15 * * — midnight on 1st ,10th & 15th of month 5,10 0 10 …

Read more

docker-compose example for ceph, kafka, postgres cluster

That is how it can be done:

docker simple starter

Build and run (on linux do not forget sudo):

Login into container

Pipeline view in shell

https://serverfault.com/questions/473905/is-there-a-unix-linux-command-to-count-lines-per-second-from-stdin

grep, zgrep, less and zless regexp examples

Grep all files with mask:

Grep all zipped files with mask:

Less all files with mask:

Grep all zipped files with mask:

Tail all files with mask:

Search for occurencies in directory with grep

https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux

git squash variants

If you just want to squash all commits into one. 1. The simplest way:

https://stackoverflow.com/a/5309051 If you have a message like ‘error: failed to push some refs to’, add —force to the last command.

Check ssl certificates on a host

If it says something like gethostbyname failure then try following. It needs socat, which can be installed on macOs like this — brew install socat. Then in one terminal open

and in another terminal: