Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureTo Set NLSPATH Permanently

  1. Log in to the peer node on which you want to set up NLSPATH.

  2. Open the /etc/profile file in a text editor.

  3. Add the following lines to the /etc/profile file:

    LANG=C
    export LANG
    NLSPATH=/opt/SUNWcgha/lib/locale/%L/LC_MESSAGES/%N
    export NLSPATH

  4. Save the /etc/profile file and exit the editor.

  5. Source the /etc/profile file.

Maintaining System Log Files

This section describes how to manage large system log files and how to remove log files. Use tools such as grep to search the system log file and identify messages for a specific node.

ProcedureTo Redirect System Log Messages to a Nonpeer Node

This procedure redirects system log messages from peer nodes to the system log file on a nonpeer node, preventing the need to maintain large log files on peer nodes.

  1. Log in to a peer node as superuser.

  2. In a text editor, add the name of the nonpeer node to the /etc/hosts file.

  3. In a text editor, edit the /etc/syslog.conf file as follows:

    1. Remove the line:

      local0.info;local0.notice;local0.crit;local0.warning	/var/adm/logfile

    2. Add the line:

      local0.info;local0.notice;local0.crit;local0.warning 	@nonpeer  

      nonpeer is the name of the nonpeer node, as defined in the /etc/hosts file.

      You can replace @nonpeer with @loghost if loghost is defined in /etc/hosts.

  4. Repeat Step 1 through Step 3 on each peer node.

  5. Log in to the nonpeer node to which you want to redirect the messages.

  6. Create an empty file called /var/adm/logfile:

    # touch /var/adm/logfile

  7. Open the /etc/syslog.conf file in a text editor.

  8. Specify logfile as the destination for system log messages by adding the following line to the /etc/syslog.conf file:

    local0.info;local0.notice;local0.crit;local0.warning		/var/adm/logfile

  9. Stop the syslogd daemon:

    # /etc/init.d/syslog stop

  10. Restart the syslogd daemon:

    # /etc/init.d/syslog start

ProcedureTo Remove Links to Crashed Daemons

Removing old log files might not be sufficient to free space. When a daemon crashes while writing to a log file, a link to the log file still exists after the death of the daemon. Consider the impact on a cluster before shutting down a daemon.

  1. Stop the daemon.

  2. Remove the link to the log file.

  3. Restart the daemon.

Logging NFS Operations

To log NFS operations, perform the following procedure.

ProcedureTo Log NFS Operations

  1. Log in to the master node as superuser.

  2. Open the /etc/nfs/nfslog.conf file in a text editor and add this line:

    my-tag default_dir=my-dir logformat=extended

    my-tag

    Label to identify NFS log messages

    my-dir

    Directory where log of the NFS operations is located

  3. Open the /etc/dfs/dfstab file in a text editor and add this line:

    share -o log=my-tag shared-nfs

    my-tag

    Label to identify NFS log messages

    shared-nfs

    Shared directory to which all NFS operations, such as rm and mkdir, are logged.

  4. Restart the NFS server:

    # /etc/init.d/nfs.server start

  5. Verify that the shared-nfs directory is being shared:

    # share

    An output similar to this is displayed in the console window:

    -               /share-nfs   log=my-tag   ""

  6. Verify that the nfslogd daemon is running:

    # ps -ef | grep nfslogd

    • If the nfslogd daemon is running, output similar to this is produced:

      root   606   348  0 15:03:37 pts/2    0:00 grep nfslogd
      root   592     1  0 14:51:09 ?        0:00 /usr/lib/nfs/nfslogd

    • If the daemon is not running, repeat Step 4 and Step 5.

  7. Test that NFS operations are being logged.

    1. Log in to a peer node other than the master node, as superuser.

      This node is referred to as node A.

    2. Mount the share-nfs directory:

      # mount master-node:/share-nfs /mnt 

    3. Log in to the master node as superuser.

    4. Create a file:

      # touch myfile

      # chmod 777 myfile

    5. Log in to node A and examine myfile:

      # echo TEST myfile

    6. Examine the log files on the master node:

      # cat  /share-NFS/nfslog

      You should see entries for the NFS operations that you have performed.

  8. Log in to the vice-master node as superuser.

  9. Repeat Step 2 through Step 7.

Previous Previous     Contents     Index     Next Next