Network Daemons  «Prev 

Check Status of portmapper Process using Linux

The portmapper process (also known as rpcbind) is a service that maps RPC (Remote Procedure Call) services to the network port numbers they use. To check the status of the portmapper process on a Linux system, you can use a combination of command-line utilities.
Here are a few methods to check the status of the portmapper process:
  1. Using the systemctl command (for systems with systemd):
    systemctl status rpcbind
    

    This command will display the status of the rpcbind service, which is responsible for the portmapper process. If the service is running, you will see "active (running)" in the output.
  2. Using the service command (for systems with System V init):
    service rpcbind status
    

    This command will display the status of the rpcbind service on systems using System V init. The output will indicate whether the service is running or stopped.
  3. Using the ps command:
    ps aux | grep -i rpcbind
    

    or
    ps aux | grep -i portmapper
    

    This command will display a list of processes with the keywords "rpcbind" or "portmapper" in their command lines. If the portmapper process is running, you should see it in the output.
  4. Using the netstat or ss command:
    sudo netstat -tulpen | grep -i rpcbind
    

    or
    sudo ss -tulpen | grep -i rpcbind
    

    These commands will display the network connections and listening ports related to rpcbind. If the portmapper process is running, you should see an entry for the rpcbind service listening on port 111 (typically both for TCP and UDP).
Remember that you may need to have root privileges (using sudo) to run some of these commands, depending on your system configuration. If the portmapper process is not running and you need it, you can start it using systemctl start rpcbind or service rpcbind start, depending on your system's init system.
Here are the steps you needed to follow to successfully complete this simulation:
  1. You are logged in as root. Issue the following to verify that the portmap process is running on your system:
    ps aux | grep portmap
    
  2. You have verified that portmap is running. The rpcinfo program is a diagnostic tool that allows you to issue a test RPC call to an RPC server. If the server is running, it will send back a response. The information contained within this response informs you about the ports that have been mapped by portmap. Now, issue the following command to learn about its status on your own system:
    /usr/sbin/rpcinfo -p localhost
    

    Solution: /usr/sbin/rpcinfo -p localhost
  3. You have tested your own system. Let's assume that other UNIX systems running rpc exist on your subnet.
    These systems include 192.168.19.63, 192.168.19.64. 192.168.19.93, 192.168.19.95, 192.168.19.98. Now, use rpcinfo to test the system with the IP address of 192.168.19.63.
    Remember: you have not set the PATH for this command, so remember to specify the location of the program (/usr/sbin/).
    Solution:
    /usr/sbin/rpcinfo -p 192.168.19.63
    

What is a daemon?

In multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an user. Traditionally daemon names end with the letter d: for example, syslogd is the daemon that implements the system logging facility and sshd is a daemon that services incoming SSH connections.
In a Unix environment, the parent process of a daemon is often the init process. A daemon is usually either created by a process forking a child process and then immediately exiting, thus causing init to adopt the child process, or by the init process directly launching the daemon. Furthermore, a daemon launched by forking and exiting typically must perform other operations such as disengaging the process from any controlling terminal. Such procedures are often implemented in various programs such as daemon in Unix. Systems often start daemons at boot time and these daemons serve the function of responding to network requests and hardware activity performing some task. Daemons can also configure hardware, run scheduled tasks (like cron), and perform a variety of other tasks.

Linux System Administration