ia_addr insert Archives - F1-CONSULT https://www.f1-consult.com/tag/ia_addr-insert/ Our Network For Your Network Tue, 27 Apr 2021 08:09:22 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.5 https://www.f1-consult.com/wp-content/uploads/2018/01/cropped-F1-CONSULT-favicon-32x32.png ia_addr insert Archives - F1-CONSULT https://www.f1-consult.com/tag/ia_addr-insert/ 32 32 Debian – How do you select the fastest mirror from the command line? https://www.f1-consult.com/linux/debian/how-to-netselect/ Fri, 31 Aug 2018 12:02:50 +0000 https://www.f1-consult.com/?p=3902 I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn’t seem to be a simple way to do it from from the command line? [crayon-6b04376554b0c771670972/] Automated Process [crayon-6b04376554b17178762837/] If you want a […]

The post Debian – How do you select the fastest mirror from the command line? appeared first on F1-CONSULT.

]]>
I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn’t seem to be a simple way to do it from from the command line?

sudo netselect -v -s10 -t20 `wget -q -O- https://launchpad.net/ubuntu/+archivemirrors | grep -P -B8 "statusUP|statusSIX" | grep -o -P "(f|ht)tp://[^\"]*"`

Automated Process

sudo apt install netselect-apt
netselect-apt -n

If you want a utility to do this you could implement such a utility as a simple bash script like the following.

#!/bin/bash
if [ -z "$1" ]
then
    echo Usage:  sudo $0 http://mirrors.ubuntu.com/mirrors.txt
    echo OR consider one of...
    for mirror in `wget http://mirrors.ubuntu.com/mirrors.txt -O - 2> /dev/null`
    do 
        (
            host=`echo $mirror |sed s,.*//,,|sed s,/.*,,`
            echo -e `ping $host -c1 | grep time=|sed s,.*time=,,`:'  \t\t'$mirror
        ) &
        done
    wait
    exit 1
fi

OLD_SOURCE=`cat /etc/apt/sources.list | grep ^deb\ | head -n1 | cut -d\  -f2`

[ -e  /etc/apt/sources.list.orig ] || cp /etc/apt/sources.list /etc/apt/sources.list.orig

cp /etc/apt/sources.list /etc/apt/sources.list.tmp
sed "s,$OLD_SOURCE,$1," < /etc/apt/sources.list.tmp > /etc/apt/sources.list

 Read More

The post Debian – How do you select the fastest mirror from the command line? appeared first on F1-CONSULT.

]]>
Debian – How to disable snmpd ia_addr insert messages? https://www.f1-consult.com/linux/debian/how-to-snmpd_ia_addr/ Sat, 14 Jul 2018 01:08:20 +0000 https://www.f1-consult.com/?p=3869 You have Debian and Ubuntu servers which runs snmpd service and are getting following message every 30 seconds within /var/log/syslog [crayon-6b04376554f5b362484124/] This problem is related with the log level start options of snmpd service [crayon-6b04376554f64758198764/] With the above configuration, snmpd service sends all the logs including LOG_DEBUG to syslog. You need to change minimum loglevel parameter as […]

The post Debian – How to disable snmpd ia_addr insert messages? appeared first on F1-CONSULT.

]]>
You have Debian and Ubuntu servers which runs snmpd service and are getting following message every 30 seconds within /var/log/syslog

error on subcontainer 'ia_addr' insert (-1)

This problem is related with the log level start options of snmpd service

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'

With the above configuration, snmpd service sends all the logs including LOG_DEBUG to syslog. You need to change minimum loglevel parameter as LOG_INFO to fix this problem.

sudo sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd

If you want to change loglevel as LOG_ERROR and above, you can use -LS3d

 

After systemd migration starting from Debian 9 Stretch, you need to change /lib/systemd/system/snmpd.service file, not /etc/default/snmpd file:

sudo sed -i "s|-Lsd|-LS6d|" /lib/systemd/system/snmpd.service
sudo systemctl daemon-reload
sudo service snmpd restart

 

The post Debian – How to disable snmpd ia_addr insert messages? appeared first on F1-CONSULT.

]]>