Chapter 9. Maintaining the File Alteration Monitor

The File Alteration Monitor (fam) is a daemon that monitors files and directories. Application writers can include certain function calls in their applications to let fam know that they want to be informed of changes to whichever files and/or directories they specify. WorkSpace and Mailbox are two applications that use fam; WorkSpace uses it to keep the directory views up to date, and Mailbox uses it to know when to indicate the arrival of new mail.

Troubleshooting fam

The fam daemon runs only when applications using it are running; it exits after all programs using it have stopped.

Sometimes, when attempting to start up an application which uses fam, an error message is displayed:

Cannot connect with File Alteration Monitor (fam)

There are several reasons why this message appears. Below are some of the common ways to troubleshoot the problem.

Basic fam Troubleshooting

If you see this message on your screen:

Can't connect to fam 

Perform these steps:

  1. Check to see if fam is running with the command:

    ps -ef | grep fam 
    

  2. If fam is not running, verify the following things:

    • Verify that /usr/etc/fam exists and is executable with the following command:

      ls -l /usr/etc/fam 
      

      If the file is not found, you must reinstall the software package eoe1.sw.unix. If it is found, the permissions should be:

      -rwxr-xr-x 1 root sys 156484 Jan 24 18:34 /usr/etc/fam
      

      The date and size may vary.

    • Verify that fam is listed in the /etc/inetd.conf file. The fam daemon is invoked when the system starts up the network. Even if the system is not connected using the network to other systems, the network software must be started. A line similar to the following should be found in /etc/inetd.conf:

      sgi_fam/1 stream rpc/tcp wait root ?/usr/etc/fam famd -t 6
      

    • Verify that inetd is running with the command:

      ps -ef | grep inetd 
      

      You should see a response similar to:

      root   214     1  0   Oct 24 ?       0:01 /usr/etc/inetd 
      

      If the message

      portmapper failure 
      

      is displayed, it is also a sign that the network is not active. Start the network according to the steps outlined in the IRIX Admin: Networking and Mail guide.

    • Verify that fam is registered with portmapper with the command:

      rpcinfo -p | grep fam 
      

      You should see output similar to the following:

      391002    1   tcp   1033  sgi_fam
      

      If you are using a foreign NIS master system, see the section titled “If You Are Using a Foreign NIS Master”.

  3. If fam is running, turn on debugging mode by by adding a -d flag to the entry in /etc/inetd.conf. The finished line should be similar to the following:

    sgi_fam/1 stream rpc/tcp wait root ?/usr/etc/fam famd -t 6 -d 
    

    Reboot your system for the debugging to take effect. The debugging information is written in the file /var/adm/SYSLOG. This can be conveniently viewed with the sysmon tool, described in “Viewing Your System Log With sysmon”.

If You Are Using a Foreign NIS Master

If you have the optional NIS (YP) software installed at your site, and you are using another manufacturer's system as your NIS master, with no rpc entries for sgi_toolkitbus and sgi_fam, this section provides the information to correct the error message.

Depending on the operating system (the Sun 3.x or the Sun 4.0) on the Sun NIS (YP) server, one of the two following solutions applies.

  • Sun 3.x

    If the Sun Workstation is running version 3.x of Sun/OS, then two entries need to be added to the /etc/rpc database on the Sun NIS server machine. They are sgi_toolkitbus 391001 and sgi_fam 391002

    On the NIS server, enter the command:

    cd /usr/etc/yp; make rpc 
    

    It may take as much as an hour before the NIS server pushes this information to its clients.

  • Sun 4.0

    If the Sun Workstation is running version 4.0 of Sun/OS or later, then two entries need to be added to the /etc/rpc database on the Sun NIS server machine. They are sgi_toolkitbus 391001 and sgi_fam 391002.

    On the NIS server, type:

    cd /var/yp; make rpc 
    

    It may take as much as an hour before the NIS server pushes this information to its clients.


    Note: If the NIS server machine is neither an SGI or Sun, the same rpc entries must be added, but the syntax may be different.