Configuring Unix-Based Server

Applies to LoadComplete 4.97, last modified on May 20, 2019

UNIX-based operating systems may publish their resource usage through the Rstat (remote statistics) interface. Performance statistics are retrieved from the kernel by the rstatd background process (daemon according to the UNIX terminology).

The rstatd daemon can already be installed and running on most UNIX operating systems. Therefore, you can check whether the rstatd daemon is already running. Use the following command:

rup host

The command should report various machine statistics, including the rstatd configuration.

If you fail to retrieve the statistics, you will need to install and configure the rstatd daemon:

  • Download the rstatd source code from the Rstatd 4 Linux Sourceforge site.

  • Extract the downloaded archive and compile the package following the instructions outlined in the install file of the extracted folder.

    The console commands will look like this:

    $ tar xvzf rstatd.tar.gz
    $ cd rpc.rstatd
    $ ./configure --prefix=/usr
    $ make
    # sudo su
    # make install
  • Add a line to the hosts.allow file within the /etc/ section to specify the subnet(s) allowed to make rstatd requests. For example:

    rpc.rstatd: 10.0.95.0/255.255.255.0 10.0.8.0/255.255.255.0

    Note: Replace the mockup subnet masks in the example above with the actual IP address of the computer that will make rstatd requests or with a netmask range of the subnet, computers from which will make requests.

  • The rstat daemon is normally invoked by another daemon - inetd (or xinetd in some Linux distributions). Using a terminal, change directories to /etc/inetd.d and create a file called rstatd having the following contents:

    # default: off
    # description: An xinetd internal service which rstatd's characters back to clients.

    service rstatd
    {
    type = RPC
    rpc_version = 2-4
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    only_from = 10.0.95.0/24
    log_on_success += USERID
    log_on_failure += USERID
    server = /usr/sbin/rpc.rstatd
    disable = no
    }

    Replace the mockup value of the only_from parameter in the example above with the actual IP address of the computer from which you want to access rstatd or with a netmask range of the subnet, computers from which you want to access rstatd.

    Make sure that the value specified by the server parameter is actually where the rpc.rstatd daemon is installed. If it is not installed to /usr/sbin, change the parameters above to reflect this configuration.

  • Restart the inetd (or xinetd) daemon:

    # /etc/rc.d/init.d/inetd restart
    Now, rstatd should be running.

See Also

Preparing Servers for Monitoring
Server Monitoring

Highlight search results