RPM: Bulding Python package for Redis

To build RPM package for Python library is really easy task if developer has kindly included setup.py file in it. Let’s build RPM for redis-py package by Andy Mccurdy. First of all we need archive with last version of redis-py. Unpack it. Change name of package to ‘python-redis’ since default value is ‘redis’ (and that is…
Read more

AWK: getting last column value

If you need to get value of last column in awk you can use built-in variable NF which means the number of fields in record. Or next, if you need next to the last field. And so on.

DRBD split-brain solution in primary/primary setup

Recently one of our customers DRBD cluster has detected split-brain: This is  primary/primary cluster. And to fix this issue we had to perform manual procedures since we don’t use automatic recovery feature. According to the DRDB official documentation the solution is next. The problem is drbdadm doesn’t have  ‘–discard-my-data’  option and exits with error: The…
Read more

RPM: last installed packages

1. To get list of last installed RPM packages you can simply use next command: 2. To get list of packages installed sorted by size use: Didn’t find the answer to your question? Ask it our administrators to reply we will publish on website.

Bash: sort IP addresses

It’s very easy sorting IP-list. For example you have file ‘ip-list’. To sort IP’s redirect file contents to following sort command. Also collect only unique IP’s in yours list. Didn’t find the answer to your question? Ask it our administrators to reply we will publish on website.

How to Install CentOS or Fedora Remotely

The recently posted article describes how to remotely reinstall Debian Linux. In this post I’d like to share a quick and easy way to remotely install CentOS or Fedora. Anaconda installer can considerably simplify the procedure of installing or updating the operating system on a remote server.

Getting idle processes PID from Perl

There is a nice lib for Perl for working with processes in Linux. And it could be used to get PIDs of processes that have been working more than some amount of time. Now you can use simple wrapper to kill them gracefully. Didn’t find the answer to your question? Ask it our administrators to…
Read more