Growpart

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).

https://www.systutorials.com/docs/linux/man/1-growpart/


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:

https://www.w3.org/TR/server-timing/

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

 1
 2
 3
 4
 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:

https://stackoverflow.com/questions/223644/what-is-an-uninterruptable-process

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

Journald - log rate limiting

Tue 03 November 2015 by admin

It seems to be an easy task, make available logging from haproxy to syslog. Configuration on haproxy side was pretty easy, log file start growing, but from time to time there were some pauses. Rsyslog was the first victim, I dig into limiting configuration area, but default limits doesn't ...

read more

How domains are being resolved ?

Thu 23 October 2014 by admin

Not so far ago I was doing some cleanup work with static entries in /etc/hosts. I was wondering how many of these static entries are being actively used. To figure out I started digging, but without much luck. Tools like strace, ltrace doesnt give me a clear look which ...

read more

How safely change ip address on remote host ?

Sun 05 October 2014 by admin

Routine task change ip address on remote host without cut off. There are a lot of possibilites i.e. from reboot with new ip address to some fancy stuff with cron job. But there is a one method to make it clear and elegant.

Simply set:

echo 1 > /proc/sys ...
read more

Zerofree your filesystem

Sat 28 September 2013 by admin

Lets assume that you have file image:

dd if=/dev/zero of=file.1 bs=4k count=128

on top of it you create filesystem ext3/ext4

mkfs.ext4 /root/file.1

mount it, create remove some files etc. and you gonna make it more space efficient, that's ...

read more

linux nocache idea

Sun 09 June 2013 by admin

Each time when you read file it's content is put into cache:

# grep -w "Cached" /proc/meminfo
Cached:           255220 kB
# cat sample.file >/dev/null
# grep -w "Cached" /proc/meminfo
Cached:           357628 kB

of course it happens when there is enough free memory. But imagine situation when you read ...

read more

hidepid capabilities of procfs

Wed 01 May 2013 by admin

RHEL 5.9 introduces new feature which allow to hide some sensitive information about process activity to non-root users.  Release notes about new RHEL version doesn't tell us too much:

Restricting Access to /proc/<PID>/
The hidepid= and gid= mount options have been added to procfs to allow
restricting ...
read more