dnsmasq local name resolution with NetworkManager

2015-08-27 1 min read Fedora Vurtualization

Network Manager suports starting dnsmasq which helps you have a local cache for DNS thus getting faster resolution for the DNS queries.

Dnsmasq with netowrkmanager

So, one thing that I have been thinking about is having a local name resolution for the VMs. So, I wanted something like this to work:

vm1 => 172.17.42,1

vm2 => 172.17.42,2

and so on …

To achieve this and reverse dns to work, we will add the entries in file “/etc/NetworkManager/dnsmasq.d/hostnames“. Just one more problem, adding so many entries manually? So, to help you with that, I created this small script:

Continue reading

bash – expand shell variables ( bash bug resolved )

2015-08-17 1 min read Bash

As you would have noticed in the recent versions of bash, expansion does not work properly when expanding directory names. So, for something like this

cd $varname

if you press tab, then variable name does not expand properly.

If this is something that is bothering you then you can now add the following in your bashrc and revert to older behaviour:

shopt -s direxpand

Hope this helps you.

evvsubst – substitute variables in text in shell

2015-07-09 1 min read Fedora Linux

First you need to install gettext, which by the way might be already installed, however you can install with

dnf install gettext

Details of the package:

Name        : gettext
Arch        : x86_64
Epoch       : 0
Version     : 0.19.4
Release     : 4.fc22
Size        : 4.6 M
Repo        : @System
Summary     : GNU libraries and utilities for producing multi-lingual messages
URL         : http://www.gnu.org/software/gettext/
License     : GPLv3+ and LGPLv2+
Description : The GNU gettext package provides a set of tools and documentation for
producing multi-lingual messages in programs. Tools include a set of
conventions about how programs should be written to support message
catalogs, a directory and file naming organization for the message
catalogs, a runtime library which supports the retrieval of translated
messages, and stand-alone programs for handling the translatable and
the already translated strings. Gettext provides an easy to use
library and tools for creating, using, and modifying natural language
catalogs and is a powerful and simple method for internationalizing
programs.

Usage examples:

Continue reading

Easily monitor and archive your system log reports.

2015-06-29 3 min read Fedora Linux

If you want to monitor your server logs and also like them to be emailed then just Logwatch may not be sufficient. It sends you a mail but does not archive them, so head over to epylog

Name        : epylog
Arch        : noarch
Epoch       : 0
Version     : 1.0.7
Release     : 9.fc22
Size        : 151 k
Repo        : fedora
Summary     : New logs analyzer and parser
URL         : https://fedorahosted.org/epylog/
License     : GPLv2+
Description : Epylog is a new log notifier and parser which runs periodically out of
cron, looks at your logs, processes the entries in order to present
them in a more comprehensive format, and then provides you with the
output. It is written specifically with large network clusters in mind
where a lot of machines (around 50 and upwards) log to the same
loghost using syslog or syslog-ng.

To install :

Continue reading

tlp – optimize and maximize your battery power.

2015-06-22 1 min read Fedora

So, you are having issues with battery life on linux. Then head over to tlp project.

TLP brings you the benefits of advanced power management for Linux
without the need to understand every technical detail. TLP comes
with a default configuration already optimized for battery life.
Also an optional install of the smartmontools package enables hard
disk SMART data in tlp-stat (smartctl).

Install with following command

 

dnf install tlp
#or
yum install tlp

ionice – renice you IO activity for the process.

2015-04-13 1 min read Learning

ionice is utility provided by the package util-linux. Description of util-linux:

Description : The util-linux package contains a large variety of low-level system
utilities that are necessary for a Linux system to function. Among
others, Util-linux contains the fdisk configuration tool and the login
program.

 

With the help of this utility, you can set the scheduler priority for your IO scheduling upto RealTime, but be careful that can make other process sluggish. Example use:

Continue reading
Older posts Newer posts