Some nice fonts in Fedora for coding

2016-12-26 1 min read Uncategorized

Here is link to fedoramagazine article on this:

6 great monospaced fonts for code and terminal in Fedora

And what the article does not mention is how to install these from terminal. You can use the following command to install them all

sudo dnf install levien-inconsolata-fonts.noarch \
adobe-source-code-pro-fonts.noarch mozilla-fira-fonts-common.noarch \
 mozilla-fira-sans-fonts.noarch google-droid-sans-fonts.noarch \
 google-droid-sans-mono-fonts.noarch nethack-bitmap-fonts.noarch \ 
nethack-bitmap-fonts-core.noarch

 

sysreporter on Fedora – basic system report in email

2016-07-18 1 min read Fedora

From the packages github page:

 

{#user-content-sysreporter.anchor}SysReporter

SysReporter (System Reporter) is a bash script that runs and aggregates a set of reports about its host system. The report can then be emailed to the system administrator on a daily, hourly, minutely basis.

and from dnf info

Name        : sysreporter
Arch        : noarch
Epoch       : 0
Version     : 3.0.4
Release     : 1.fc24
Size        : 17 k
Repo        : @System
From repo   : updates
Summary     : Basic system reporter with emailing
URL         : https://github.com/onesimus-systems/sysreporter
License     : MIT
Description : Basic system reporter with emailing

Continue reading

Python script to manage virtual machines with python API for libvirt.

2016-07-04 4 min read Vurtualization

Most of times I use virt-manager to manage VMs but sometimes, I have to manage VMs on other hosts over ssh when connected over VPN or while I am working remotely. GUI like virt-manager thus becomes slow, and hence I like to use cli commands and nothing is better than virsh. But here is simple script that I use sometimes to manage the VMs with CLI based menu. Hope you find it useful.

Continue reading

firewalld – enable logging

2016-05-16 1 min read Fedora

firewalld by default does not allow packets that are dropped. In some cases, you need to find out if some packet is being dropped or not. For doing so you may want to enable logging of dropped packets with the following command:

sudo firewall-cmd  --set-log-denied=all

This will enable logging all the packets and help you figure out if firewalld is dropping the packet.

speed up journalctl

2016-04-25 1 min read Fedora

Sometime back I noticed that whenever I run my favourite command, viz.

journalctl -xn -f -l

it was taking more time than usual. So, I thought to dig more into it and finally found that the following command:

sudo journalctl --disk-usage

showed that journalctl was using some huge space in tune of about 4GB. So, the solution was simple, vaccum the journal entries and the command to do so is :

sudo journalctl --vacuum-size 90M

Checking journalctl size after that confirms the size is reduced and after that indeed the above journal command takes no time 🙂

Continue reading

Disk usage by file type

2015-11-30 1 min read Fedora Learning

Trying to find the total usage for each of the file types by extension, then here is a quick bash function for you :

disk_usage_type () 
{ 
    find . -name '*'$1 -ls | awk '
    BEGIN{
        a[0]="Bytes";
        a[1]="KB";
        a[2]="MB";
        a[3]="GB";
    }
    {sum+=$7; files++;}
    END{
    print "Total sum is ::\t" sum;
    print "Total files  ::\t" files;
        while (sum > 1024) {
            sum=sum/1024;
            count++;
            };
        print sum" "a[count];
    }'
}

Just define the function in one of your bash startup files. After that to use the function pass in the extension for which you would like to find the total size. Output should be something like below:

Continue reading

Network Manager post-up script (dispatcher script)

2015-09-07 1 min read Fedora

Network manager is supposed to be much better than network, how so?

it supports dnsmasq for one…

Dnsmasq with netowrkmanager

Local name resolution

Also Network Manager supports dispatcher scripts. How can that help? For one, I used to send interface up emails. To do so, all I had to do was put the following script in “/etc/NetworkManager/dispatcher.d”

#!/bin/sh

cd /etc/sysconfig/network-scripts
. ./network-functions

[ -f ../network ] && . ../network

# Notify programs that have requested notification
IF=$1
STATUS=$2

cat
Older posts Newer posts