Increasing the limit of file descriptors for the klnagent service

If the scope of a Linux-based distribution point includes many devices, the default limit of files that can be opened (file descriptors) may not be enough. To avoid this, you can increase the limit of file descriptors for the klnagent service.

To increase the limit of file descriptors for the klnagent service:

  1. On the Linux-based device that acts as a distribution point, open the /lib/systemd/system/klnagent64.service file, and then specify the hard and soft limits of the file descriptors in the LimitNOFILE parameter of the [Service] section:

    LimitNOFILE=<soft_resource_limit>:<hard_resource_limit>

    For example, LimitNOFILE=32768:131072. Note that the soft limit of the file descriptors must be less or equal to the hard limit.

  2. Run the following command to ensure that the parameters are specified correctly:

    systemd-analyze verify klnagent64.service

    If the parameters are specified incorrectly, this command can output one of the following errors:

    • /lib/systemd/system/klnagent64.service:11: Failed to parse resource value, ignoring: 32768:13107

      If this error occurs, the symbols in the LimitNOFILE line were specified incorrectly. You must check and correct the entered line.

    • /lib/systemd/system/klnagent64.service:11: Soft resource limit chosen higher than hard limit, ignoring: 32768:13107

      If this error occurs, the soft limit of the file descriptors you entered is more than the hard limit. You must check the entered line and ensure that the soft limit of the file descriptors is less or equal to the hard limit.

  3. Run the following command to reload the systemd process:

    systemctl daemon-reload

  4. Run the following command to restart the Network Agent service:

    systemctl restart klnagent

  5. Run the following command to ensure that the specified parameters are applied correctly:

    less /proc/<nagent_proc_id>/limits

    where the <nagent_proc_id> parameter is the identifier of the Network Agent process. You can run the following command to obtain the identifier:

    ps -ax | grep klnagent

For the Linux-based distribution point, the limit of files that can be opened is increased.

Page top