NetWorker Startup variables with nsrrc

Starting with NetWorker 8.0, NetWorker uses the /nsr/nsrrc file to define environment variables at NetWorker startup. This can also be used to make dynamic parameter changes such as TCP settings.

Sourcing of this file occurs before starting the NetWorker processes. In previous releases of NetWorker, environment variables were commonly specified in the NetWorker startup script. These startup script files were overwritten when a software upgrade or reinstall occurred. The new /nsr/nsrrc file is not removed when upgrading or reinstalling the software.

This post details instructions with an example of how to implement enviornment variables in the /nsr/nsrrc file.

Setting environment variables

  1. Create a bourne shell script file /nsr/nsrrc on the NetWorker server if it does not already exist.
  2. Add the variables in this format:
    ENV_VAR_NAME = value
    export ENV_VAR_NAME
  3. Stop and start the NetWorker server daemons in order for the environment variables to take effect.

Changing the Operating System keepalive parameters to control their values at NetWorker startup. For both Solaris and Linux, this change is immediate and no 'export' command or system reboot is required.

Solaris

  • Check the value of the tcp settings
    # ndd -get /dev/tcp tcp_time_wait_interval
    30000
    # ndd -get /dev/tcp tcp_keepalive_interval
    30000
  • Create a file /nsr/nsrrc or modify the existing file
    # vi /nsr/nsrrc
    #!/bin/sh
    ndd -set /dev/tcp tcp_time_wait_interval 100000
    ndd -set /dev/tcp tcp_keepalive_interval 100000
  • restart NetWorker
    # /etc/init.d/networker stop
    # /etc/init.d/networker start
  • check the values of the parameters again to confirm the change
    # ndd -get /dev/tcp tcp_time_wait_interval
    100000
    # ndd -get /dev/tcp tcp_keepalive_interval
    100000

Linux

  • Check the value of the tcp settings
    # sysctl -a | grep keepalive
    net.ipv4.tcp_keepalive_time = 700
    net.ipv4.tcp_keepalive_probes = 9
    net.ipv4.tcp_keepalive_intvl = 700
  • Create a file /nsr/nsrrc or modify the existing file
    # vi /nsr/nsrrc
    #!/bin/sh
    echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time
    echo 300 > /proc/sys/net/ipv4/tcp_keepalive_intvl
  • start NetWorker
    # ./networker stop
    # ./networker start
  • check the values of the parameters again to confirm the change
    # sysctl -a | grep keepalive
    net.ipv4.tcp_keepalive_time = 300
    net.ipv4.tcp_keepalive_probes = 9
    net.ipv4.tcp_keepalive_intvl = 300

An export line in the nsrrc would be needed if this was an environment variable modification for example:

#!/bin/sh
NSR_DEV_BLOCK_SIZE_MSG=YES
export NSR_DEV_BLOCK_SIZE_MSG