Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Enhanced AutoFS Administrator's Guide: HP-UX 11i v1 > Chapter 4 Troubleshooting AutoFS

AutoFS Tracing

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Two levels of AutoFS tracing are available:

Detailed (level 3)

Includes traces of all AutoFS requests and replies, mount attempts, timeouts, and unmount attempts. You can start level 3 tracing while AutoFS is running.

Basic (level 1)

Includes traces of all AutoFS requests and replies. You must restart AutoFS to start level 1 tracing.

Starting AutoFS Detailed Tracing

To start detailed (level 3) tracing, perform the following steps:

  1. Log on as root to the NFS client.

  2. Issue the following commands:

    ps -ef | grep automoutd
    kill -SIGUSR2 PID

    where PID is the process ID returned by the ps command.

Level 3 tracing is appended to the /var/adm/automount.log file.

NOTE: The command, kill -SIGUSR2 PID, works if tracing is not already on.

Stopping AutoFS Detailed Tracing

To stop detailed tracing, issue the same commands (that start level 3 tracing) to send the SIGUSR2 signal to automountd. The SIGUSR2 signal is a toggle that turns tracing on or off depending on its current state.

If you have basic (level 1) tracing turned on when you send the SIGUSR2 signal to automountd, the SIGUSR2 signal turns tracing off.

Starting AutoFS Basic Tracing

To start basic (level 1) tracing, perform the following steps:

  1. Log on as root to the NFS client.

  2. Add -T to the AUTOMOUNTD_OPTIONS variable in the /etc/rc.config.d/nfsconf file, as in the following example:

    AUTOMOUNTD_OPTIONS=”-T” 

    This change puts AutoFS basic tracing messages into the /var/adm/automount.log file.

  3. To get a list of all the automounted directories on the client, issue the following command:

    for FS in $(grep autofs /etc/mnttab | awk ‘{print $2}’)
    do 
    grep ‘nfs’ /etc/mnttab | awk ‘{print $2}’ | grep ^${FS}
    done
  4. For every automounted directory listed by the grep command, issue the following command to determine whether the directory is currently in use:

    /usr/sbin/fuser -cu local_mount_point

    This command lists the process IDs and user names of all the users using the mounted directory.

  5. Warn the users to cd out of the directory, and kill the processes that are using the directory, or wait until the processes terminate. You can issue the following command to kill all the processes using the mounted directory:

    /usr/sbin/fuser -ck local_mount_point
  6. To kill AutoFS, issue the following command:

    /sbin/init.d/nfs.client stop 
    WARNING! Do not kill the automountd daemon with the kill command because it does not die gracefully. Moreover, it does not unmount AutoFS mount points before it dies. Use the nfs.client stop script to make sure automountd dies cleanly.
  7. To start AutoFS with tracing enabled, issue the following command:

    /abin/init.d/nfs.client start 

Stopping AutoFS Basic Tracing

To stop basic tracing, kill AutoFS and restart it (as described in the preceding section) by removing -T from the AUTOMOUNTD_OPTIONS variable.

AutoFS Tracing Output

The most interesting events to users are the tracing output when mounting and unmounting of file systems occur.

Mount Event Tracing Output

The general format of a mount event trace is as follows:MOUNT REQUEST: <time stamp>

    <mount information> <other tracing> ... <other tracing>

MOUNT REPLY: <status>=mount status

The <mount information> trace has the following format:

name=<key>[<subdirectory>] <map>= map name <opts>=mount options <path>=mount path <other tracing>

where:

<key> = the key value from the map

<subdirectory> = subdirectory (may be blank)

<map> = name of the map

<opts> = mount options

<path> = mount path

<other tracing> = other trace information

The mount status in the mount reply contains 0 if the mount is successful; it has a non-zero value when the mount is not successful.

The following is an example of a typical mount trace:

May 13 18:45:09 t5        MOUNT REQUEST:   Tue May 13 18:45:09 2003
May 13 18:45:09 t5        name=nfs127[/tmp] map=auto.indirect opts= path=/n2ktmp_8264/nfs127/tmp direct=1
May 13 18:45:09 t5        PUSH /etc/auto.indirect
May 13 18:45:09 t5        POP /etc/auto.indirect
May 13 18:45:09 t5        mapline:           hpnfs127:/         /tmp hpnfs127:/tmp
May 13 18:45:09 t5        do_mount1:
May 13 18:45:09 t5        (nfs,nfs)     /n2ktmp_8264/nfs127/tmp hpnfs127:/tmp   penalty=0
May 13 18:45:09 t5        nfsmount: input: hpnfs127[other]
May 13 18:45:09 t5        nfsmount: standard mount on /n2ktmp_8264/nfs127/tmp :
May 13 18:45:09 t5        hpnfs127:/tmp
May 13 18:45:09 t5        nfsmount: v3=1[0],v2=0[0] => v3.
May 13 18:45:09 t5        nfsmount: Get mount version: request vers=3 min=3
May 13 18:45:09 t5        nfsmount: mount version=3
May 13 18:45:09 t5        Port numbers are 937, 937
May 13 18:45:09 t5        Port match
May 13 18:45:09 t5        mount hpnfs127:/tmp /n2ktmp_8264/nfs127/tmp()
May 13 18:45:09 t5        nfs_args: hpnfs127, , 0x2004060, 0, 0, 0, 0, 0, 0, 0, 0,
May 13 18:45:09 t5        args_temp: hpnfs127, , 0x3004060, 0, 0, 0, 0, 0, 0, 0, 0, hpnfs127:/tmp
May 13 18:45:09 t5        mount hpnfs127:/tmp dev=44000004 rdev=0 OK
May 13 18:45:09 t5        MOUNT REPLY: status=0, AUTOFS_DONE

Unmount Event Tracing Output

The general format of an unmount event trace is as follows:

UNMOUNT REQUEST: <time stamp>

   <other tracing>

         ...

<other tracing>

UNMOUNT REPLY: <status>=unmount status

The unmount status in the unmount reply contains 0 if the unmount is successful; it has a non-zero value when the unmount is not successful.

The following is an example of a typical unmount trace event:

May 13 18:46:27 t1      UNMOUNT REQUEST: Tue May 13 18:46:27 2003
May 13 18:46:27 t1      dev=44000004 rdev=0 direct
May 13 18:46:27 t1      ping: hpnfs127 request vers=3 min=2
May 13 18:46:27 t1      pingnfs OK: nfs version=3
May 13 18:46:27 t1      nfsunmount: umount /n2ktmp_8264/nfs127/tmp
May 13 18:46:27 t1      Port numbers are 937, 937
May 13 18:46:27 t1      Port match
May 13 18:46:27 t1      nfsunmount: umount /n2ktmp_8264/nfs127/tmp OK
May 13 18:46:27 t1      unmount /n2ktmp_8264/nfs127/tmp OK
May 13 18:46:27 t1      UNMOUNT REPLY: status=0
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.