Easy alternative to fdisk and partprobe when resizing partition to its maximum. Extensively used in cloud environments (i.e. cloud-init).
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
Uninterruptible process state
Looking for reason why some processes cannot be killed, you probably reach to process state called uninterruptible. Nice explanation:
ps command shows which process is in that state by pinning
D in process output list. But on which step this process really stuck ...
Journald - log rate limiting
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 ?
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 ?
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.
echo 1 > /proc/sys ...
Zerofree your filesystem
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
mount it, create remove some files etc. and you gonna make it more space efficient, that's ...read more
linux nocache idea
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
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 ...