thorko.deLinux / Unix systems administrator

Latest SysadminDB entries

High CPU usage with chromium and spotify

When using fglrx driver on an acer e5-551g laptop chromium and spotify using the options --type=gpu-process which then ends up in high cpu usage.

To disable this option for chromium and spotify:

Create a file in /etc/chromium.d/disablegpu

export CHROMIUM_FLAGS="--disable-gpu"

In spotify go to preferences->User interface and disable "Enable hardware acceleration"

SaltStack - Using grains in top.sls

Targeting a minion by grains

  'G@role:zabbix and G@type:proxy':
    - match: compound
    - zabbix

More compound matches can be checked here

Using grains in state files (sls)

{% if grains['type'] == 'proxy' %}
- source: salt://files/server.conf
- user: {{ grains['zabbix_splunk_search_user'] }}
- group: zabbix
- template: jinja
{% elif grains['type'] == 'server' %}
- source: salt://files/server.conf
- user: zabbix
- group: zabbix
- template: jinja
{% endif %}

Debian - build a deb package

Install some packages required to build the package

apt-get install dh-make autotools-dev fakeroot devscripts

Download the source and extract it

tar -xzvf httpd-2.4.1.tar.gz && cd httpd-2.4.1
dh_make -n -s -e

edit debian/control file

fakeroot debian/rules clean
dch -i local 'Your Version'
cp ../httpd-2.4.1.tar.gz ./
sudo debuild -us -uc


Test webserver with telnet

(echo -e "GET / HTTP/1.0\n\n"; sleep 1;) | telnet 80

CentOS 7 virtual network interfaces

Howto setup a virtual network interface in CentOS 7

To use the old style network interface naming convention you have to append "biosdevname=0 net.ifnames=0" to your kernel line in your grub config.

Create a ifcfg-eth0:0 file under /etc/sysconfig/network-scripts


Now start your device with nmcli

nmcli dev connect eth0

To check if your virtual interface is up run "ip a" and check for eth0:0

(c) 2014 by