David Deutsch: Chemical scum that dream of distant quasars

Posted in Uncategorized | Leave a comment

Rsyslog not listening TCP on port 514?

Check if rsyslog's configuration has the following lines:

$ModLoad imtcp
$InputTCPServerRun 514
$PrivDropToUser syslog
$PrivDropToGroup syslog

As the user syslog cannot listen on ports below 1024 in TCP. Rsyslog will not fail and will silently run without any drawback.

You can fix it in two different ways:

  • Change 514 for a port number above 1024 (10514 for example).
  • Don't drop privileges and run as root.

 

Posted in Uncategorized | Leave a comment

Good collection of quotes

In http://tarbox.org/, like:

 

Posted in Uncategorized | Leave a comment

Need to debug a bash script?

Add the following two lines:

set -x
export PS4='$LINENO '

And you will get the line number and the text of each executed line 🙂

Posted in Uncategorized | Leave a comment

«The machine» compilation from Person of Interest TV Series

Posted in Uncategorized | Leave a comment

Terminator and Ctrl+t in Ubuntu

For some reason I cannot understand fully there is a problem with the key <Ctrl> in Terminator. If you configure <Ctrl>+t, for example, for creating new tabs the configuration doesn't works and is not saved. The problem is described here. The temporal solution of the problem consist in editing the Terminator configuration file in:

bash$ vim ~/.config/terminator/config

And change by hand the key binding for creating new tabs to

...
   tab_position = hidden
[keybindings]
   new_tab = t
   next_tab = Right
...

The problem seems related to Terminator using the key <Primary> instead of <Ctrl>.

Posted in linux, Uncategorized | Leave a comment

Problems with GNU parallel in Ubuntu 13.04?

GNU parallel seems to not work properly in Ubuntu:

bash$ seq 10 | parallel echo {}

bash$

Where are my numbers? For fixing this «problem» (misconfiguration will be a better description) you need to comment an option that is implicit in Ubuntu. Go to:

bash$ sudo vim /etc/parallel/config

And comment the only setting there:

#--tollef

And now GNU parallel works again as expected:

bash$ seq 10 | parallel echo {}
1
2
3
4
5
6
7
8
9
10
bash$

That's all 🙂

Posted in Uncategorized | Leave a comment

Installing postgresql 9.2 in Ubuntu 13.04 (2013 August)

Ubuntu doesn't like PostgreSQL 9.2 because it breaks other packages (see explanation in stackoverflow). We need to use PostgreSQL own apt repository:

prompt$ sudo sh -c  "echo 'deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
prompt$ wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
OK
prompt$
prompt$ sudo apt-get update
prompt$ sudo apt-get install postgresql

That's all 🙂

Posted in Uncategorized | Leave a comment

Fix for the power management problem in Linux 3.10

I upgraded my Ubuntu 13.04 to the kernel 3.10 (so I can use a new USB 5Ghz WIFI card). As a consequence my computer no longer seemed to go into the «ondemand» mode and the fan was running all the time. The problem is that the Linux people has decided to relay on the intel_pstate system for power management and the old tools no longer work. You can find an explanation about the change here:

https://plus.google.com/114657443111661859546/posts

Of all the possible solutions this is the one that worked for me:

http://unix.stackexchange.com/questions/82085/scaling-issues-of-i7-3520m-with-intel-pstate-module-on-kernel-3-10-0

 

Posted in linux, Uncategorized | Leave a comment

Jenkins consuming all CPU while idle? You have the "leaping-second" problem

And the solution is simple:

$ sudo date -s "`date`"

Many people were drive crazy by this bug in Linux. For more information visit:

Posted in Uncategorized | Leave a comment