![]() |
|||
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
| ||||||||||||||||||||||||||
|
LANG=C export LANG NLSPATH=/opt/SUNWcgha/lib/locale/%L/LC_MESSAGES/%N export NLSPATH |
Save the /etc/profile file and exit the editor.
Source the /etc/profile file.
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.
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.
Log in to a peer node as superuser.
In a text editor, add the name of the nonpeer node to the /etc/hosts file.
In a text editor, edit the /etc/syslog.conf file as follows:
Remove the line:
local0.info;local0.notice;local0.crit;local0.warning /var/adm/logfile |
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.
Log in to the nonpeer node to which you want to redirect the messages.
Create an empty file called /var/adm/logfile:
# touch /var/adm/logfile |
Open the /etc/syslog.conf file in a text editor.
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 |
Stop the syslogd daemon:
# /etc/init.d/syslog stop |
Restart the syslogd daemon:
# /etc/init.d/syslog start |
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.
To log NFS operations, perform the following procedure.
Log in to the master node as superuser.
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 |
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. |
Restart the NFS server:
# /etc/init.d/nfs.server start |
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 "" |
Verify that the nfslogd daemon is running:
# ps -ef | grep nfslogd |
Test that NFS operations are being logged.
Log in to a peer node other than the master node, as superuser.
This node is referred to as node A.
Mount the share-nfs directory:
# mount master-node:/share-nfs /mnt |
Log in to the master node as superuser.
Create a file:
# touch myfile |
# chmod 777 myfile |
Log in to node A and examine myfile:
# echo TEST myfile |
Examine the log files on the master node:
# cat /share-NFS/nfslog |
You should see entries for the NFS operations that you have performed.
Log in to the vice-master node as superuser.
![]() ![]() |