Monthly Archives: August 2020

networker process not starting

networker service not starting

Quick post to troubleshoot issue with networker service startup

Networker process startup issue

If you come across issue where you installed new networker agent on Linux server and service is not coming up. You will see below message –

root@kerneltalks ~# /etc/init.d/networker start
root@kerneltalks ~# /etc/init.d/networker status
There are currently no running NetWorker processes.

Troubleshooting

You can dig through logs or run a debug using below command :

root@kerneltalks ~# nsrexecd -D5

It will print lots of messages. You have go through them for possible cause of issue. I found below offending entries –

RAP critical 162 Attributes '%s' and/or '%s' of the %s resource do not resolve to the machine's hostname '%s'. To correct the error, it may be necessary to delete the %s database.

Solution

First check your /etc/hosts file is correct and having valid loopback entry.

cat /etc/hosts |grep loopback
hostname
hostname -f

After that move your /nsr directory and try to restart the service.

mv /nsr /nsr.backup
mkdir /nsr

This should resolve the issue and you should be able to see networker service is up and running

root@kerneltalks ~# /etc/init.d/networker start
root@kerneltalks ~#  /etc/init.d/networker status
+--o nsrexecd (34521)
root@kerneltalks ~#   ps -ef | grep -i nsr
root     34521  3 11:17 ?        00:00:00 /usr/sbin/nsrexecd

sar utility custom settings

A quick article to point out configurations to customize sar utility.

sar custom settings!

sar is monitoring utility on Linux which is used to monitor system resource utilization. We have covered different aspects of sar in the past. You can go through the below articles for the same.

In this article, we will walk you though for some custom settings you can configure for sar like below –

  1. How to change monitoring frequency in sar
  2. How to customize sar log rotation

How to change sar monitoring frequency?

As you are aware sar has 10 minutes default frequency. That means sar utility logs one data point of resource utilization per 10 minutes. If you want to change this frequency then you can do it by altering it in below file –

kerneltalks:~ #  cat /etc/cron.d/sysstat
# crontab for sysstat

# Activity reports every 10 minutes everyday
*/10 * * * * root [ -x /usr/lib64/sa/sa1 ] && exec /usr/lib64/sa/sa1 1 1

So you have to edit number 10 with the frequency of your choice. Let’s make it for 1 minute instead of 10 minutes.

Now, after editing the file you have to wait for that minimum time to pass which you choose as frequency and then you can verify it by using sar command.

kerneltalks:~ # sar
Linux 5.3.18-22-default (kerneltalks)      08/20/20        _x86_64_        (1 CPU)

14:16:18     LINUX RESTART      (1 CPU)

14:20:01        CPU     %user     %nice   %system   %iowait    %steal     %idle
14:21:01        all      0.02      0.00      0.02      0.00      0.00     99.97
14:22:01        all      0.02      0.00      0.03      0.00      0.02     99.93
14:23:01        all      0.00      0.00      0.00      0.00      0.00    100.00
14:24:01        all      0.02      0.00      0.02      0.00      0.00     99.97
Average:        all      0.01      0.00      0.02      0.00      0.00     99.97

You can see now that sar is collecting datapoints with frequency of 1 minute.

How to customize sar log rotation?

saar log rotation is controlled by /etc/sysstat/sysstat file. You can configure below parameters in the file.

kerneltalks:~ # cat /etc/sysstat/sysstat|grep -v ^#|grep -v ^$
HISTORY=60
COMPRESSAFTER=10
SADC_OPTIONS=" -S ALL"
SA_DIR=/var/log/sa
ZIP="xz"

File has a description for all the parameters which are self-explanatory. You can edit each parameter as per your requirement and restart sar process.

I am mentioning short description of each parameters from file here for your quick reference.

  • HISTORY How long to keep log files (in days).
  • COMPRESSAFTER Compress sa and sar files older than (in days)
  • SADC_OPTIONS Parameters for the system activity data collector
  • SA_DIR Directory where sa and sar files are saved.
  • ZIP Compression program to use. xz, gzip or bzip2