Text preview for : unixadmin Pages(300-400)[1].pdf part of muk muki unix/linux
Back to : unixadmin Pages(300-400)[ | Home
Learning Check
A-PDF Split DEMO
9 16
A-PDF Split DEMO
Installing Patches
Module 10
Introduction
Use the dupatch utility to install and remove patches on systems running Tru64 UNIX. The dupatch utility enables the Tru64 UNIX system administrator to add, track and remove patches from the operating system. It is included with the HP Tru64 UNIX and TruCluster Server patch kits, but is not included as part of the operating system installation. This training provides information about using the dupatch utility. For information about individual patches, see the Patch Summary and Release Notes document for the kit you are installing.
Objectives
Upon successful completion of this module, you should be able to: Describe dupatch concepts Use the dupatch utility to install and remove patches
Resources
For more information on the topics in this module, see the following: Patch Summary and Release Notes document for the patch kit you are working with Tru64 UNIX Installation Guide Tru64 UNIX System Administration TruCluster Software Installation TruCluster Software Products Cluster Administration Any release-specific installation documentation
10 1
A-PDF Split DEMO Introducing
Patches
A patch is a collection of files containing fixes to problems. When possible, patches are merged together into one patch if they have intersecting files or codependencies. A patch may correct one or more problems.
Tru64 UNIX and TruCluster Server Patch Kits
The Tru64 UNIX and TruCluster Server patch kits contain official corrections for critical problems affecting those software products. These kits, distributed as needed, provide interim maintenance that prevents the occurrence of known problems. Patch kits are released for specific operating system versions. Be sure to acquire and install the correct kit for the operating system version you are using. Patch kits are not intended to provide general maintenance and new functions; applying them to your system does not prevent the need to upgrade to new versions of Tru64 UNIX and TruCluster releases. Do not use patch kits with the Tru64 UNIX setld utility, which installs the basic operating system subsets and the patch kits. All of the operating system subsets begin with OSF, while patch kits begin with T64 followed by the version, kit type, kit number, a dash, then the date.
T64V51AS0001-20001114.tar <-- V5.1 Aggregate Selective (AS) PK1
Obtaining Patch Kits
You can obtain a CD-ROM with all the patch kits for the supported versions of Tru64 and TruCluster Server or obtain patch kits over the Internet.
Patch Kits on CD-ROM
The Tru64 UNIX Patch CD-ROM contains all of the latest patch kits for supported versions of Tru64 UNIX and TruCluster Server. The patch kits on the CD-ROM are provided in an expanded form (rather than a tar file) so that they can be installed directly from the disk. The following table contains contact information regarding how to order a Patch CDROM in the United States and other countries:
Table 10-1 Ordering CD-ROM Patch Kits
In North America
Telephone Numbers Order Number 1-800-344-4825 1-800-ATCOMPAQ QA-MT4AW-H8
In Other Countries
Contact local HP office or authorized reseller for pricing and availability Contact local HP office or authorized reseller
Internet Patch Kits
The HP Services Web page provides patch kit directories for the operating system version specific to the patch kit. These directories are available for downloading over the internet. The URL is:
URL http://www.support.compaq.com/patches
10 2
A-PDF Split DEMO Patches distributed over the Internet are provided either in a tar file that you must unpack on your system, or on an NFS mountable file system. The tar file for each operating system version will contain patch kits for that version of the operating system and patch kits for the applicable TruCluster Software Products.
For example, the Tru64 UNIX V5.1 and TruCluster V5.1 patch tar file contain the Tru64 UNIX V5.1 and TruCluster V5.1 patch kits. You should verify that the tar file is not corrupt by doing a checksum on the file and checking it against the value in the release notes. When you obtain a patch kit from the Internet, the kit is provided in a single tar file which you must expand to install. You will notice that each kit has a .CHKSUM and a .README file. You can validate the file transfer using the cksum command as follows:
# cksum DUV51EAS0004-200000307.tar
Patch Kit Contents
Each patch kit contains the following components: Documentation Patch management utility (dupatch) Patch subsets
Documentation
The Patch Summary and Release Notes contain summaries and full descriptions of the problems that the patches correct, as well as information you may need to know about specific patches. The Patch Installation Guide contains installation information and is common to all patch kits. Both of these manuals are provided in PDF and HTML formats. The PDF version is easy to view and print using the Adobe Acrobat Reader. It is provided on the Documentation CD-ROM that ships with Tru64 UNIX V4.0E and higher, and is also available at the Adobe Web site (http://www.adobe.com/). The HTML version can be viewed with your Internet browser.
Patch Management Utility (dupatch)
The dupatch utility installs, removes, and manages patches for Tru64 UNIX and TruCluster Server software. This utility is installed and remains on the system through the successful installation of a patch kit.
Patch Subsets
Patch subsets for Tru64 UNIX and TruCluster software products contain the contents of a patch. Each patch is packaged in its own setld subset. The subsets are managed by dupatch. Each patch kit contains all of the product version-specific patches available at the time of manufacture. You can selectively install and remove each patch.
10 3
A-PDF Split DEMO Although selective patch installation capabilities exist, HP recommends that you install all patches in each kit for Tru64 UNIX and TruCluster Server to prevent the occurrence of known and corrected software problems.
The patch kit user should check the Patch Kit and Checksum Information in DUV51FAS001-20000609-KitContent.txt to validate that the ftp of the patch kit worked correctly by entering:
# cksum DUV51FAS001-20000609.tar
The result of the cksum command should be equal to that stated in the DUV40FAS00119990609-KitContent.txt file:
2849535654 80322560 DUV51FAS001-20000609.tar
Packaging
Tru64 UNIX and TruCluster Server patches are provided in two different package types, Aggregate Selection Installation patch kits and Singular patch kits.
Aggegrate Selective Installation Patch Kits
An aggregate selective installation patch kit contains all of the product version-specific patches available for distribution at the time of its manufacture. You can selectively install and remove each patch using dupatch, which is included in the kit. The naming of an aggregate patch kit includes the operating system release, such as DUV51 for the HP Tru64 UNIX V5.1 release, followed by the number of the aggregate patch kit, followed by a hyphen with the date in year, month, and day that the patch was issued.
duv51as0002-20001116.tar
Singular Patch Kits
The primary content of a singular patch kit is one patch. To ensure proper installation and system consistency, any dependent patches are included in the kit. Therefore a singular patch kit may include one or several patches, depending upon the interdependencies. A singular patch kit is named for the patch that it is intended for; it will not have the same format as the aggregate patch kit because it is intended for one patch usage only. The single patch will have the name of the patch followed by the release it is for, HP Tru64 UNIX V5.1 for example. The single patch will contain a readme to explain the patch and what requirements may be needed for it to be installed correctly.
kern_mod_51.tar
These patches can be downloaded by ftp from:
ftp://ftp1.service.digital.com/public/v5.1
10 4
A-PDF Split DEMOdupatch Using
This section provides information and exercises for preinstallation preparation, installation, and removing patches with dupatch. Use the exercises at the end of this module to check your understanding.
Preinstallation Steps for dupatch
1. Prepare to install patches by first downloading the correct patch kit tar file for the operating system version you are installing patches on. 2. Back up your system root directory (/) as well as the /usr and /var file systems and make sure there is enough disk space for the installation of the patch kit and its contents. 3. Validate the CHECKSUMs of the patch kit against the correct values from the patch kit source to make sure they have not changed. 4. Read the Patch Summary and Release Notes contained with the patch kit for space information. 5. The expanded patch kit will create a /patch_kit directory on your system with the documentation files, the dupatch utility files, and the patches. It is important to run the dupatch utility in the patch_kit directory for it to properly load and update the patch information. 6. Before running the dupatch utility, you must be logged in as root. It is advisable to have the system in single-user mode to protect the installation of the patches from possible corruption and have the patch_kit directory mounted on the system. Here is the command to run dupatch once the patch kit is expanded:
# /mntpoint/patch_kit/dupatch
7. The dupatch utility provides both an interactive and command line interface that supplies further information on the options to use when preparing to install a patch kit. In the interactive menu, select h for help information, and in command line interface mode type dupatch -help. 8. In the interactive menu of dupatch, choose Patch Installation and Preinstallation Check Only at the menu prompt for dupatch to do the preinstallation check of the system before installing new patches.
10 5
A-PDF Split DEMO Installing
Patches
Requirements
To install and remove Tru64 UNIX operating system and TruCluster patch kits, you must have root access to the system. Minimally, a system reboot is required to complete the patch installation and bring the system to a consistent running environment. Certain file types, such as libraries, are not moved into place until you reboot the system. Depending upon the patches installed, a kernel rebuild and a system reboot may be required to enable the newly installed patches.
Shutting Down the System
Before performing a patch installation, follow this procedure: 1. Shut down the system to single-user mode.
# /usr/sbin/shutdown -h +5 "Applying 5.1 and TCR Patches" Note Newer patch kits do not require installation from single-user mode. It is still recommended, but not required.
2. Alternatively, if the system is halted, reboot to single-user mode from the console prompt, using a command such as:
>>>boot -fl s
3. After the system is in single-user mode, mount the file system that contains the /usr and /var directories. Use the bcheckrc command to check and mount all the UFS and AdvFS file systems, then issue the update command and activate your swap partition with swapon:
# /sbin/bcheckrc # /sbin/update # /sbin/swapon -a
Non-Interactive Installation
The dupatch utility provides a command line interface that allows dupatch to be called by other programs. You can use the command line to invoke all functions except for baselining. The functions have the same operation and definition as the menu-driven interface. The following example shows the use of the dupatch command and several of its options to install Tru64 UNIX 5.1 Patch 8.01:
# /usr/sbin/dupatch -install -kit /var/b115/patch_kit -name Mary -note\"install patch" -product TRU64_UNIX_V5.1 -patch 08.01
The following example shows the use of the dupatch command and several of its options to remove Tru64 UNIX 5.1 Patch 8.01:
# /usr/sbin/dupatch -delete -name Mary -note "delete patch" product \TRU64_UNIX_V5.1 -patch 08.01
10 6
A-PDF Split DEMO Interactive Installation
Here is an example of an interactive mode installation: 1. Change directory to the patch kit directory and run the dupatch utility. (This step assumes that the patch kit is available to your system, and that the new patch tools have been loaded). Enter 1 at the Enter your choice prompt to invoke the patch installation session:
# dupatch Tru64 UNIX Patch Utility (Rev. 27-04) ========================== - This dupatch session is logged in /var/adm/patch/ log/session.log Main Menu: ------------------1) 2) 3) 4) 5) h) q) Patch Installation Patch Deletion Patch documentation Patch Tracking Patch Baseline Analysis/Adjustment Help on Command Line Interface Quit
Enter your choice: 1
2. The program responds with the Patch Installation Menu. Enter 1 at the "Enter your choice" prompt to do a Pre-Installation Check Only:
Tru64 UNIX Patch Utility (Rev. 27-04) ========================== - This dupatch session is logged in /var/adm/patch/ log/session.log Patch Installation Menu: ----------------------1) Pre-Installation Check ONLY 2) Check & Install in single-user mode w/ network services 3) Check & Install in Multi-User mode b) Back to Main Menu q) Quit Enter your choice: 1
3. When prompted, enter the location of the patch distribution.
Enter path to the top of the patch distribution, or enter "q" to get back to the menu: /mnt/PatchKit/kit2
4. The program lists the patch kits provided in the patch distribution that apply to your system. HP recommends that you install all of these kits.
The products listed below are optional: There may be more optional products than can be presented on a single screen. If this is the case, you can choose products screen by screen or all at once on the last screen. All of the choices you make will be collected for your confirmation before any products are installed.
10 7
A-PDF Split DEMO 1) Patches for Tru64 UNIX V5.1
2) Patches for TruCluster Available Server Software_V5.1 Or you may choose one of the following options: 3) ALL of the above 4) CANCEL selections and redisplay menus 5) EXIT without installing any products Enter you choices or press RETURN to redisplay menus. Choices (for example, 1 2 4-6): 3 Patches for Tru64 UNIX V5.1 Patches for TruCluster Available Server Software_V5.1 Is this correct? (y/n): y
5. You have the option to make patches reversible so you can revert the system to its state prior to the installation of a patch. Press Return or type y to the following question to make the patches reversible.
Do you want the patches to be reversible? [y]: [Return]
By default, backup copies of the installed patches are saved in /var/adm/patch/backup. If you have limited space in /var, you may want to make the backup directory the mount point for a separate disk partition, an NFS mounted directory, or a symbolic link to another file system. If you answer no to this question, the existing system files will not be saved and the installed patches will not be reversible. HP recommends that you install patches so they are reversible. The program describes your backup setup and asks you if you want to proceed: 6. Answer yes when asked if you want to perform the preinstallation check with this setup:
Do you want to proceed with the preinstallation check with this setup? [y] [Return]
7. You are asked to select the patches for which the preinstallation check will be performed. It is recommended that you select all. 8. The program displays the list of the patches you selected and asks you to verify the selection. If you answer no, you are given the opportunity to make a new selection. 9. The program lists any patches that fail the prerequisite and applicability checks, and asks how you want to proceed. You are presented with the following choices:
Select the action you'd like to take: 1) proceed with the patches that passed the check 2) select patches again 3) go back to the previous menu
If the patches are prevented from being installed because of missing or unknown system files, set the system patch baseline. If patches are prevented from being installed because dependent patches were not selected, choose the "select patches again" item and add the required patches that are missing.
10 8
A-PDF Split DEMO and Enabling Patches Installing
Patch installation is performed through dupatch. The -l of the setld command is disabled for patch subsets. Before beginning the installation, make sure that you have: Met the installation prerequisites. Made the patch distribution available to your system. Loaded any new patch tools. Performed the patch preinstallation check. The following sections provide step-by-step instructions for installing and enabling patches.
Choosing Single-User or Multiuser Mode
You can install patches from either single-user or multiuser modes.
Installing Patches from Single-User Mode
To continue installing patches in single-user mode, enter 2, "Check & Install patches in Single_User Mode" at the "Enter your choice" prompt when the patch installation menu is displayed.
Patch Installation Menu: ======================= 1) Pre-Installation Check ONLY 2) Check & Install patches in Single_User Mode 3) Check and Install in Multi-User mode b) Back to Main Menu q) Quit Enter your choice: 2
10 9
A-PDF Split DEMO Patches from Multiuser Mode Installing
To install patches in multi-user mode, enter 3 at the "Enter your choice" prompt when the patch installation menu is displayed.
Patch Installation Menu: ======================= 1) Pre-Installation Check ONLY 2) Check & Install in single-user mode w/network services 3) Check and Install in Multi-User mode b) Back to Main Menu q) Quit Enter your choice: 3 *** Installation Warning *** You have chosen to install patches onto this system while it is running in Multi-User mode. Some patches may directly affect core operating system operations. To insure the proper operation of all applications, it is strongly suggested that you install these patches while the system is in single-user mode. If this cannot be done, install these patches when the system is as lightly loaded as possible (i.e. not running production environments, no users logged on, etc.). Do you wish to continue? (y/n) [y}:
10 10
A-PDF Split DEMO Common
Installation Steps
The following steps provide instructions for continuing the installation of HP Tru64 UNIX and TruCluster patches after you have selected either single-user or multiuser mode. 1. You have the option to make patches reversible so you can return the system to its state prior to the installation of a patch. Enter y or press Return to make the patches reversible.
Do you want the patches to be reversible? [y]:
By default, backup copies of the installed patches are saved in /var/adm/patch/backup.If you have limited space in /var you may want to make the backup directory the mount point for a separate disk partition, an NFS mounted directory, or a symbolic link to another file system. If you answer no to this question, the existing system files will not be saved and the installed patches will not be reversible. HP recommends that you install patches so they are reversible. 2. The program describes your backup setup and asks you if you want to proceed: Do you want to proceed with the installation with this setup? [y]: 3. You are asked to record your name as the person installing the patches and to add any comments you would like stored for future reference.
Your name: Mike Stone
Enter any notes about this operation that you would like stored for future reference. To end your input, enter a period (.) and press Return.
: Removing patches 6.00, 12.00 and 22.00 until the : firmware can be updated to the proper revision. : . [Return}
4. The program lists the patches available for installation on your system. This list may be different from system to system because dupatch does not display available patches that are already installed on your system. You can selectively choose patches for installation, install all patches, cancel selections and redisplay menus, or exit without installing any patches.
Enter your choices or press RETURN to display the next screen. Choices (for example, 1 2 4-6) : . . 130) Patch 0381.00 - Motif Toolkit Correction 131) Patch 0384.00 - Various X11 Server Corrections Or you may choose one of the following options: 134) ALL of the above 133) CANCEL selections and redisplay menus 134) EXIT without installing any patches
10 11
A-PDF Split DEMO
Selecting CANCEL cancels your patch selections and returns to the patch list and selection menus so you can reselect patches for installation. Selecting EXIT returns you to the dupatch installation menus. 5. The preinstallation check is performed to verify that the patches will install. If the preinstallation check is successful dupatch proceeds with the installation. If the preinstallation check fails, dupatch lists the specific patches that fail and asks how you want to proceed:
Select the action you'd like to take: 1) proceed with the patches that passed the check 2) select patches again 3) go back to the previous menu
If you choose to proceed with patches that passed the preinstallation check, dupatch will start installing those patches and provide informational messages on the screen. The whole dupatch session is logged to ensure you can view any messages that may scroll off the screen. 6. Review the dupatch session log, /var/adm/patch/log/session.log,to ensure that the installation was successful. Note any special patch instructions, informational messages, and error messages. 7. Assuming patch installation was successful, rebuild the kernel (vmunix), save the existing kernel, move the new kernel into place, and reboot the system. For more information, see Tru64 UNIX System Administration. In general the following steps are necessary: a. Configure a new vmunix.
# doconfig -c HOSTNAME
b. Save the existing vmunix.
# cp /vmunix /usr/vmunix.prekit11-
c. Install the newly built kernel (vmunix).
# cp /usr/sys/HOSTNAME/vmunix /vmunix
d. Reboot the system.
# /usr/sbin/shutdown -r +5 "Rebooting with newly installed patches"
Rebuilding the Kernel
The dupatch utility determines whether the installation or removal of patches requires that the kernel be rebuilt and the system rebooted. This action is then performed automatically or manually, depending upon the method you used to install the patches: When using the command line, the kernel is built automatically with the doconfig utility, using the -a option. It also uses the -c option of the -cfgfile command line option if it was used. When using the menu-based interface, the kernel build occurs as if doconfig was entered from the command line. The dupatch utility asks if your system has a custom configuration file and if you want to change it.
10 12
A-PDF Split DEMO and Removing Patches in Single-User Mode Installing
When performing a patch installation or removal in single-user mode from the command line, the system automatically reboots after the command line operation is completed. When performing a patch installation or removal in single-user mode using the menubased interface, dupatch asks if you want to reboot the system after the patch installation or removal is completed: If you answer yes, the system reboots immediately. If you answer no, dupatch returns to the appropriate menu, either installation or removal, depending on the operation.
Installing and Removing Patches in Multiuser Mode
When installing patches in multiuser mode from the command line, you are given a message informing you that a reboot is necessary to complete the patch installation. However, the system does not reboot itself. When installing patches in multiuser mode using the menu-based interface, dupatch gives you three options if a reboot is necessary: Reboot now Schedule a reboot for a later time Do nothing
10 13
A-PDF Split DEMO Removing Patches
To remove patches from your system you use the Patch Deletion option of the dupatch Main Menu. The system must be in single-user mode to remove patches. Note that the -d option to the setld command is disabled for patch subsets. The following steps show how to remove patches:
Note The Patch Deletion menu lists every setld-based patch on your system, regardless of which patch kit installed them. Therefore, if you select the "ALL of the above" menu item, it will remove all setld-based patches from your system. For example, if you chose the "ALL of the above" menu item when installing Patch Kit-0003 and then decided to remove those patches, you would have to specify the patch ID of all Patch Kit-0003 patches in the Delete Patch menu. If, instead, you selected the "ALL of the above" menu item, then all setld-based patches that were installed on your system would be removed, not just those from Patch Kit-0003.
1. Shut down the system to single-user mode.
# /usr/sbin/shutdown +5 "Removing Patches"
2. After the system shuts down to single-user mode, mount the file system that contains the /usr and /var directories. Use the bcheckrc command to check and mount all the UFS and AdvFS file systems. Then issue the update command and activate your swap partition with swapon:
# /sbin/bcheckrc # /sbin/update # /sbin/swapon -a
3. If you need access to the network, use the following command to start the network:
# /usr/sbin/rcinet start
Informational messages will appear on the screen. 4. Run dupatch, Select 2 for patch removal:
# dupatch Tru64 UNIX Patch Utility ======================== (This dupatch session is logged in /var/adm/patch/log/session.log) Main Menu: ========= 1) Patch Installation 2) Patch Deletion 3) Patch Documentation 4) Patch Tracking 5) Patch Baseline Analysis/Adjustment h) Help on Command Line Interface q) Quit
10 14
A-PDF Split DEMO
Enter your choice: 2
5. You are asked to record your name as the person removing the patches and to add any comments you would like stored for future reference.
Your name: Mike Stone
Enter any notes about this operation that you would like stored for future reference. To end your input, enter a period (.) and press Return.
: : Removing patches 6.00, 12.00, and 22.00 until the firmware can be updated to the proper revision. : . [Return]
6. Select and verify the patches to remove through the patch selection menus. Once the patch selection is done, dupatch removes the selected patches and provides informational messages on the screen. The dupatch session is logged to /var/adm/patch/log/session.log.
Note When removing patches after incremental installations, you may see Special Instructions from previously installed patches that have since been superseded. You should ignore these instructions, and instead, follow any Special Instructions relating to the most current patch.
7. Review the session log to ensure the removal was successful. Note any special patch instructions, informational messages, and error messages. 8. If there are no error messages, follow the instructions for disabling the patches that are listed in the session log. Depending on the removed patches, you may need to rebuild the kernel or reboot the system.
10 15
A-PDF Split DEMO Learning
Check
1. A patch is a collection of __________ containing ____________ to problems. When possible, patches are merged together into _________________ if they have intersecting files or codependencies. A patch may correct one or more problems. 2. The Tru64 UNIX and TruCluster Server patch kits contain ________________ for critical problems affecting those software products. These kits, distributed as needed provide ________________________________ that prevents the occurrence of known critical problems. 3. Patch kits are released for ___________________ operating system _________________. Be sure to acquire and install the correct kit for the operating system version you are using. 4. Patch kits are not to be used with the ____________ utility of the Tru64 UNIX operating system which installs the basic operating system subsets and patch kits. 5. The ____________ utility installs, removes, and manages patches for Tru64 UNIX and TruCluster Server software. This utility is installed and remains on the system through the successful installation of a patch kit. 6. To install and remove Tru64 UNIX operating system and TruCluster patch kits you must have ____________________________to the system and you must bring down the system to __________________________ to ensure computing environment integrity. Although you can perform patch selection and preinstallation checking in multiuser mode, the actual installation must be done in single-user mode. 7. To remove patches from your system you use the ________________________ option of the ______________ Main Menu. The system must be in ______________________ mode to remove patches.
10 16
A-PDF Split DEMO
Performing Backups
Module 11
Introduction
User files are stored on disks that are shared by multiple users on the system. Although the protection users establish for their files is normally sufficient to guard against accidental deletion, these files are still vulnerable to the activities of the superuser and the operating system. It is the system manager's job to back up users' files to guard against data loss caused by events such as: Human error System crashes Hardware failure
Objectives
To prevent important data loss on the system, you should be able to: Back up file systems using the vdump utility Restore files and file systems using vrestore
Resources
For more information on the topics in this module, see the following: Tru64 UNIX Installation Guide Tru64 UNIX System Administration, Chapter 10 Tru64 UNIX Reference Pages Tru64 UNIX AdvFS Administration
11 1
Backing Up File Systems with vdump
A-PDF Split DEMO
Backing Up File Systems with vdump
Overview
Table 11-1 lists some archiving tools that can be used on a Tru64 UNIX system.
Table 11-1 Archiving Tools
Tool
NetWorker Single Server NetWorker
Function
Archives file systems or files to a tape or a file in the local system; includes a graphical user interface (GUI) Archives file systems or files from multiple systems in a network; includes a GUI. This is a separately licensed product Archives Advanced File System (AdvFS) or UFS file systems, or files changed after a certain date, to a tape or a file in the local system Archives UNIX File System (UFS) file systems, or files changed after a certain date, to a tape or a file in the local system Archives UFS and AdvFS file systems, or files changed after a certain date, to a tape or a file on the remote system Users can run it; archives files to a tape or a file in the local system
vdump/vrestore dump/restore rvdump/rvrestor e tar/pax/cpio
The vdump and rvdump commands are the backup facility for the AdvFS file system. However, the commands are file-system independent, and you can use them to back up other file systems, such as UFS and NFS. The vdump command backs up files and any associated extended attributes from a single, mounted fileset or clone fileset to a local storage device. A related command, rvdump, backs up files and any associated extended attributes from a single mounted fileset or clone fileset to a remote storage device. The Advanced File System (AdvFS) file system provides the ability to clone a domain (with the optional AdvFS Utilities) and keep the system running during a backup. One of the disadvantages of the UFS file system is that you must prevent access to a UFS file system while it is being backed up. To ensure a completely accurate backup of a UFS file system, you may need to take a disk off line or shut the system down to singleuser mode.
11 2
Performing Backups
A-PDF Split DEMO
Using the vdump Command
Use the vdump command to back up all files in the specified fileset that are new or changed since the last level vdump that was performed, and produce a saveset on the storage device.The date is determined by comparing the specified backup level to previous backup levels recorded in the /etc/vdumpdates file. The vdump command creates a list of fixed-size blocks, called a saveset, as it copies all files that are new or have changed after a certain date to the default storage device or the device that you specify. The first block of the saveset contains the block size, the mount point, and other saveset attributes. The vdump command then makes two passes through the directory hierarchy of the file system being backed up. In the first pass, it saves the directories and the file names to the second area of the saveset. In the second pass, it writes the file data to the third area of the saveset. The default storage device for the vdump command is /dev/tape/tape0_d1. You can place multiple savesets on one tape with the vdump command. If a saveset requires more than one tape to complete, you will be prompted to mount another.
Using vdump Command Options
The format for the vdump command is:
vdump options mount_point
The following table lists some common options to the vdump command.
Table 11-2 vdump Command Options
Key
-b -C -D -f -F -h -N -P -q -T -u -U -V -w -x
Function
Specifies the number of 1024-byte blocks per record in the saveset. Compresses the data as it is backed up, which minimizes the saveset size. Performs a level 0 backup on the specified subdirectory. Specifies the destination of the saveset. Specifies the number of in-memory buffers to use. Displays usage help for the command. Does not rewind the storage device when it is a tape. Produces backward-compatible savesets that can be read by earlier versions of the vrestore command. Displays only error messages. Specifies the starting number for the first tape. Updates the /etc/vdumpdates file with a timestamp entry from the beginning of the backup. Does not unload the storage device when it is a tape. Displays the current version of the command. Displays the filesets that have not been backed up within 1 week. Specifies an "exclusive or" (XOR) operation each time the blocks specified by num_blocks are written to the saveset.
11 3
Backing Up File Systems with vdump
A-PDF Split DEMO
Table 11-2 vdump Command Options (Continued)
Key
0-9 fileset
Function
Specifies a dump level from 0 to 9. Specifies the full pathname of a mounted AdvFS fileset to be backed up.
Types of Backups
One of the key options for the vdump command specifies a dump level. Dump levels help the system keep track of backups. There are two types of dumps: Full Copies the entire file system (level 0) May be time consuming May require many tapes or much disk space Incremental Copies changed portions of the file system Takes less time to accomplish Requires less media to record
Dump Levels
A series of dump levels allows you to avoid performing full backups frequently. As a system manager, you must determine a dump strategy. You must decide how often to perform level 0 dumps and incremental dumps. The system keeps track of file system dumps and dump levels in a file called /etc/vdumpdates. The value 0 for this option causes the entire fileset to be backed up to the storage device. The default backup level is 9. Table 11-3 lists dump level strategies used by some system managers.
Table 11-3 Dump Level Strategy
Dump Frequency
Monthly Weekly Daily
Dump Level
Level 0 Level 1 Use levels 2 -- 9
Level 0 dump (or full backup) is performed once a month. Level 1 dumps are performed once a week. These dumps record almost as much information as a level 0 dump. Because they are time consuming, they are usually performed on weekends when there is typically little system activity. Daily dumps use incremental backup levels 1 through 9. The vdump command backs up all changes since the previous lower-level number. Because it is not practical to save daily dumps for more than two weeks, you should urge users to record private copies of their important files by using the tar command.
11 4
Performing Backups
A-PDF Split DEMO
All files that were modified since the last date stored in /etc/vdumpdates for the same file system at lesser levels are dumped. So a dump level 2 backs up all files changed since the previous level 1 or 0 dump.
Backup Preparation
The following conditions should be in effect before backups are started: The recording medium is present on the system and loaded. There is little or no activity on the system (suggest single-user mode). There is no activity on the file system being backed up. File systems being backed up do not need to be mounted. The system manager is logged in as superuser (usually at the console). The superuser's current directory is not located in the file system being backed up (except when backing up the root file system).
Conditions for Intervention
The backup procedure ignores fewer than 32 read errors on a file system and informs you when your intervention is required, based on the following conditions: End of dump Tape write error Tape open error More than 32 disk read errors End of tape
Full Backup Procedure Offline
To ensure a completely accurate backup of a UFS file system, you may need to take a disk off line or shut the system down to single-user mode. (See System Administration, Chapter 9, for more details.) When the previous backup preparation conditions have been satisfied, you can begin recording backups offline by following these steps: 1. Use the shutdown(8) command to shut down the system from multiuser mode to single user-mode; shutdown does the following: Logs the reason for shutdown in /usr/adm/binary.errlog and /etc/nologin and notifies current users of the impending shutdown. Disables logins 5 minutes before shutdown time, or immediately if shutdown time is within 5 minutes. Shuts down the system at the time specified and brings the system to single-user mode; all current users are logged out. Displays the superuser prompt (#) on the system console to notify you that the console is now dedicated to system management tasks.
11 5
Backing Up File Systems with vdump
A-PDF Split DEMO
Disables all other terminals and leaves all file systems mounted. 2. Unmount all file systems, or at least the file systems to be backed up, using the umount(8) command; umount -a unmounts the file systems named in the file system table /etc/fstab. 3. Verify that all the file systems are unmounted using the mount command. 4. If you are backing up an AdvFS file system, use the verify command to check the integrity of the file system. If you are backing up a UFS file system, check the integrity of the file system by using the fsck(8) command. For example, fsck /dev/disk/dsk0g checks the device dsk0g for errors. The file system must not contain errors. If the file system is bad, bad data will be recorded and the backups will be useless. 5. Use the vdump command to back up the file system. The vdump command records the information on the disk or tape medium and reports what activity is taking place. It also estimates the number of blocks to write, the number of tapes required, the time required for completion, and the time required for tape change. Table 11-3 lists the command formats used in the file system backup procedure.
Table 11-4 Command Formats for File System Backup Procedure
Step
1
Action
Use the shutdown command.
Command Format Examples
Shutdown time message Where time is a number of minutes, a time of day, or the word now, and message is the reason for shutting down, which is written to the file /usr/adm/shutdownlog and to users' terminals. To shut down the system in 30 minutes for backups:
# shutdown +30 "System down in 30 for backups."
2 3 4 5 Unmount all file systems named in /etc/fstab. Verify that all the systems are unmounted. Use fsck to check file system integrity. Perform the backup procedure.
# umount -a # mount # fsck/dev/disk/dsk0g
To back up the file system /usr to /dev/tape/tape0_d0 and update the /etc/vdumpdates file:
# vdump-0u /usr
11 6
Performing Backups
A-PDF Split DEMO
Backing Up an AdvFS Fileset Online
You can back up an AdvFS fileset without shutting down the system or unmounting the file system. If the files in your system are changing during the time you want to perform your backup, you can create a clone and then back up from the clone. The Advanced File System (AdvFS) fileset provides the ability to clone a domain (with the optional AdvFS Utilities) and keep the system running during a backup. The following example backs up the pssm fileset on line by creating the pssm_clone fileset and backing it up to the default device. The file domain in this example is domain1. The default storage device is /dev/tape/tape0_d1. Once the backup is complete, delete the clone.
Example 11-1 Backing Up a Clone # # # # # # clonefset domain1 pssm pssm_clone mkdir /pssm_clone mount -t advfs domain1#pssm_clone /pssm_clone vdump -0 -u -C /pssm_clone umount /pssm_clone rmfset domain1#pssm_clone
To perform a full level 0 backup of a local fileset to a local device, enter a command similar to the following:
# vdump -0 -u -f /dev/tape/tape1_d6 /fs1
In this example, -0 specifies that all files in the fileset /fs1 will be backed up to /dev/tape/tape1_d6; -u specifies vdump to update the /etc/vdumpdates after a successful backup of the fileset. When the backup saveset device is the character - (dash), the vdump command writes to standard output. Thus, the vdump and vrestore commands can be used in a pipeline expression to copy filesets. The following is a typical command:
# vdump -0f - /usr | vrestore -xf - -D /mnt
Hints for Performing Backups
To use backups effectively, note that: Backups are most effective when done on a regular schedule. Backups can be scheduled by entries in /var/spool/cron/crontab for a time when the system is inactive. The best time for doing backups is when there are no users on the file system; or, make a clone of the filesets and back them up. Store dump tapes away from the machine area so that they are not used for other purposes. Write-disable tapes immediately after the backup finishes so that the data on the tape is not accidently overwritten. Label all dump tapes with the contents, date recorded, and the system on which they were recorded. If your system contains different types of tape drives, label each tape with the drive number and the tape density (BPI) with which it was recorded.
11 7
Backing Up File Systems with vdump
A-PDF Split DEMO
Record all backup activity in the system log book.
Backing Up File Systems to a Remote Device
The rvdump command backs up files from a single, mounted fileset or a clone fileset to a remote storage device. You must be able to execute the rsh command on the remote node to which you are dumping. The rvdump command has the same options as the vdump command, but you must specify the node name for the device that you are backing your files to.
Using the rvdump Command
The format for the rvdump command is:
rvdump -f machine:device [key [argument...] file_system]
The rvdump(8) reference page describes all of the options to the rvdump command. The rvdump command has the same options as the vdump command, but you must specify the node name for the device that you are backing your files to. To back up the /usr/users file system from sys001 onto sys002 with the attached backup device /dev/tape/tape0_d0, enter the following command from sys001:
# rvdump -0uf sys002:/dev/tape/tape0_d0 /usr/users
11 8
Performing Backups
A-PDF Split DEMO
Restoring File Systems
Overview
The vrestore command allows you to select specific files and directories to be restored. It can restore data from a file, a pipe, magnetic tapes, or disks. Before you restore files, you can check if the saveset you are accessing contains the information you want to recover. You can list the names and sizes of all files in the saveset by running the vrestore command using the -t option. The restore operation will not be performed. You can also display the files and directories saved by running the vrestore command with the -i option. This interactive option allows you to select individual files or directories to restore from a list.
Restoring File Systems with vrestore
The vrestore command allows you to extract information from your backup tape to the system. The vrestore command can only read tapes or disks backed up with the vdump command. Use the same version of the vdump and vrestore utilities. If your version of the vrestore utility is unable to read the format of your saveset, you will get an error message. You do not have to be the root user to use the vrestore command, but you must have write access to the directory to which you want to restore the files. The vrestore command: Copies data backed up by vdump. Restores complete file systems or individual files from backups. The default archive device is /dev/tape/tape0_d1.
vrestore Command Options
The format for the vrestore command is:
vrestore options
The options parameter indicates the flags and arguments that you use to specify the characteristics of the tape device and special vrestore options. Refer to the vrestore(8) reference page for more information about these options. Table 11-5 lists and describes the vrestore options:
Table 11-5 The vrestore Command Options
Option Function
Specifies the destination path of where to restore the files. Specifies the name of the storage device that contains the saveset to be restored. Displays usage help for the command. Permits interactive restoration of files read from a saveset.
-D -f -h -i
11 9
Restoring File Systems
A-PDF Split DEMO
Table 11-5 The vrestore Command Options (Continued)
Option Function
Lists the entire saveset structure. Does not preserve the owner, group, or modes of each file from the device. Specifies the action to take when a file already exists. Prints only error messages; does not print information messages. Lists the names and size (in bytes) of all files contained in a saveset. Writes the name of each file read from storage device to the standard output device. Displays the current version for the command. Extracts a specific file or files from the saveset.
-l -m -o -q -t -v -V -x
Restoring the root File System
A failure of the disk containing your AdvFS root file domain requires that you recreate your root file domain and then restore the root file domain contents from your backup media. The following example assumes that you are booting from the CD-ROM device DKA500, which is the installation Stand Alone System (SAS). The tape drive is /dev/tape/tape0. The root is being restored to device /dev/disk/dsk1. Boot your system off of the installation CD as standalone:
>>> b dka500
Pick option: 3) UNIX Shell You will now be at the default root user prompt (#) in single-user mode. Examine the devices available:
# hwmgr -view devices # dn_setup -install_tape
Create the disk label:
# disklabel -rw -t advfs /dev/rdisk/dsk1 rz28
Create the root file domain and fileset. Note that if you have changed the root file domain name or fileset name, use the new name:
# mkfdmn -r /dev/disk/dsk1a root_domain # mkfset root_domain root
Mount the newly created root domain and restore from tape using a restore utility compatible with your dump utility:
# mount root_domain#root /mnt # cd /mnt # vrestore -x
You can now boot your restored root domain.
11 10
Performing Backups
A-PDF Split DEMO
Restoring Individual Files
Before you restore files, you can check if the saveset you are accessing contains the information you want to recover. You can list the names and sizes of all files in the saveset by running the vrestore command using the -t option. The restore operation will not be performed. You can also display the files and directories saved by running the vrestore command with the -i option. This interactive option allows you to select individual files or directories to restore from a list. Table 11-6 lists the steps for restoring a file named /usr/users/jones/chapter10 from a dump tape. You can leave the system in multiuser mode for this procedure.
Table 11-6 Restoring Individual Files
Step
1 2
Action
Load a dump tape on the tape drive. Use the vrestore command to list the files on the dump tape; note the pathnames. Set default to the directory you want the file restored to. Use the vrestore command to restore the file. Check the directory or files to make sure the file has been restored. Unload the tape.
Example
# vrestore -t # cd /usr/users # vrestore -x ./jones/chapter10 # ls -o /usr/users
3 4 5 6
Interactive Restore
Use the vrestore command with the interactive -i option to restore individual files. The -i option allows you to use commands similar to shell commands, some of which are listed in this table.
Table 11-7 Common Interactive Commands
Command Function
Lists files in the current or specified directory. Changes the current directory. Displays current directory. Adds the files in the current directory or the files specified by files to the list of files to be restored from the tape. Deletes all the files in the current directory or the files specified by files to the list of files recovered from the tape. Restores from the tape the files that are marked to be read into the current working directory. Toggles verbose mode. Lists a summary of the interactive commands. Exits session immediately.
ls [directory] cd [directory] pwd add [files] delete [files] extract verbose help quit
11 11
Restoring File Systems
A-PDF Split DEMO
The vrestore(8) reference page contains a full list of the command line commands available with interactive restore.
Restoring Files Interactively
Files in a dump archive are stored relative to the file system root that was dumped. For example, if the file system /usr was dumped, the files /usr/adm and /usr/adm/binary.errlog appear on the dump archive as ./adm and ./adm/binary.errlog. When restored, the files are restored as they were archived, relative to the current working directory. If you specify file names as ./filename, the file is restored into your current working directory. Table 11-8 lists the steps for interactively restoring the files /usr/users/jones/chapter10, /usr/users/jones/chapter11, and /usr/users/smith/.login. You can leave the system in multiuser mode for this procedure.
Table 11-8 Restoring Files Interactively
Step
1 2 3 4 5 6 7 8 9 10 11
Action
Load a dump tape on the tape drive; do not write-enable the tape. Begin an interactive restore session. Change to appropriate directory. List the files in that directory to decide which ones you want to restore. Add the files chapter10 and chapter11 to the list of files to restore. Restore the files from the tape. Change to a different directory to select more files. List the files in that directory to decide which ones you want to restore. Add the file .login to the list of files to restore. Restore the file. Quit the restore.
Example
# vrestore -i vrestore> cd jones vrestore> ls vrestore> add chapter10 chapter11 vrestore> extract vrestore> cd ../smith vrestore> ls vrestore> add .login vrestore> extract vrestore> quit
11 12
Performing Backups
A-PDF Split DEMO
Restoring Files and File Systems from a Remote Device
Just as you can back up file systems to a remote device with rdump, you can restore file systems from a remote device using rvrestore. You can restore file systems that have been saved with dump or rdump.
Using the rvrestore Command
The rvrestore command is identical to the vrestore command, except you must use the -f option to specify the storage device as machine:device. The format for the rvrestore command is:
rvrestore -f machine:device [options]
The vrestore(8) reference page describes all options to the rvrestore command. To restore a file system on sys001 from a tape drive on sys002 that contains the backup of that file system you want to restore, enter the following command from sys001:
# rvrestore -rf sys002:/dev/tape/tape0_d0
11 13
The Networker SingleServer Utility
A-PDF Split DEMO
The Networker SingleServer Utility
Legato's NetWorker SingleServer is a graphical utility that backs up and recovers local files on a single machine or to a local tape. It is a subset of NetWorker Save and Restore. NetWorker SingleServer offers features similar to the multiclient NetWorker products, except that it supports a single client rather than multiple clients. When NetWorker SingleServer is installed on a machine, the machine becomes a client of itself. The utility is bundled with Tru64 UNIX and needs no other license than the OSF_BASE Product Authorization Key (PAK). Unlike standard UNIX backup utilities such as tar, cpio, dump/restore, and vdump/vrestore, NetWorker SingleServer provides easy-to-use user interfaces for saving and restoring data and for performing system administration tasks. NetWorker SingleServer provides you with: Easy-to-use preconfigured settings Label templates for electronically labeling tapes The ability to perform unattended backups Predefined backup schedules Preconfigured policies for managing backed-up files Preconfigured directives that assist you in streamlining backups Notification of NetWorker activity Easy file recovery
11 14
Performing Backups
A-PDF Split DEMO
Learning Check
1. This new graphical utility __________________ local files on the local machine to a local tape or loader. It is shipped with _______________settings that provide you with the ability to start backing up files immediately after installation. 2. The NetWorker SingleServer not only performs data backups but also enhances the site task of managing data ___________________ (archiving). 3. Archiving is controlled by setting the NetWorker Administrator variable, which governs the time data is valid and may be recovered. These variables are: a. ________________ b. ________________ c. ________________ 4. Recovering an archive may be required where one of the following types of disk failures occurs: a. Primary disk damage b. ________________disk damage c. NetWorker SingleServer disk damage d. ___________________ Use the Recover window in the NetWorker Administrator to recover the archived data. 5. Backups are recorded on tape or disk using the vdump(8) command. The format is:
vdump [ key [ argument ] file_system ]
a. A full backup records the _______________ file system. b. An incremental backup records _______________ portions of the file system. c. Full and incremental backups are implemented by means of dump levels from _______________ supplied to the dump command as part of the key argument. Backups provide a complete record of file system changes from month to month. d. The _______________ command backs up remote file systems. 6. If a file system loses data, you can replace the information using the vrestore(8) command. The format is:
.........................................................
7. Use the vrestore command to replace both individual files and complete file systems. You can interactively restore a file from a file system backup using the _______________ option. The rvrestore command restores remote file systems.
11 15
Learning Check
A-PDF Split DEMO
11 16
A-PDF Split DEMO
Monitoring the System
Module 12
Introduction
As system administrator, you are responsible for the smooth operation of your Tru64 UNIX system. You need to monitor the system's performance and workload on a regular basis. Problems can arise that require special treatment. This module gives an overview of several tools you can use for monitoring your system and identifying system problems.
Objectives
To monitor a system and identify system problems, you should be able to: Describe the system event logging facility Generate problem reports using Compaq Analyze Retrieve system events using Event Manager Use Insight Manager Invoke sys_check, collect, and Performance Manager List some useful tools and utilities to monitor and manage the system Use the CDE tools to monitor and manage the system Describe system exercisers used for diagnostic checks
Resources
For more information on the topics in this module, see the following: Tru64 UNIX Reference Pages Tru64 UNIX System Administration, Chapters 11 and 12 Tru64 UNIX System Configuration and Tuning UNIX System Administration Handbook, Nemeth, Snyder, & Seebass, Chapter 21 describes the cron command/utility, Chapter 23 describes some monitoring tools
12 1
Understanding Event Logging
A-PDF Split DEMO
Understanding Event Logging
Overview
Various system programs generate error or status messages. The Tru64 UNIX operating system includes special daemons to collect these messages and then log them to a file, forward them to another system, or write them to a list of users. In the event logging configuration file the system manager can specify: Which facilities to collect messages from Which severity level to log Where the messages should be logged
Event Logging Types
The Tru64 UNIX operating system uses three mechanisms to log system events: ASCII event logging facility Started in run level 3
syslogd error logging daemon
Single-line ASCII text messages
/etc/syslog.conf configuration file
Binary event logging facility Started in run level 3
binlogd error logging daemon
Binary format messages
/etc/binlog.conf configuration file
DECevent utility provides an interface to examine the log files Event Manager (new with Version 5.0) Started in run level 2 Combines events from all sources into a single event stream Can be configured to perform automatic notification of selected conditions Includes a graphical event viewer
12 2
Monitoring the System
A-PDF Split DEMO
Using ASCII Event Logging
Overview
The error logging facility frees the individual programs from having to handle message logging themselves. Programs (including the kernel) use the syslog function to send messages to special device files /dev/klog and /dev/log. The syslogd daemon reads and logs these messages. Messages are one line of ASCII text, for example:
Aug 12 15:02:02 tempest vmunix: NFS server tinker:/users not responding
The message format is not standardized; the format is determined by the programs that generate messages. The syslogd daemon routes messages according to the /etc/syslog.conf configuration file. Messages can be: Appended to a file Written to selected or all users on the system
Note If var is a separate file system, it must be mounted before syslogd is started.
Tru64 UNIX systems start syslogd automatically by using the /sbin/init.d/syslog script. The syslogd daemon can also be started manually.
Setting Up the Configuration File
Each line of the syslog.conf file specifies a set of messages by facility and level and a destination that specifies how syslogd should handle these messages. The format of the syslog.conf file is:
facility[,facility...].level[;facility.level...] destination
facility specifies the part of the system that generates the message. level specifies the severity of the message; syslogd logs all messages of this and greater severity. destination specifies where messages are logged. The syslogd daemon ignores blank lines and lines that begin with the number sign (#).
12 3
Using ASCII Event Logging
A-PDF Split DEMO
Identifying Valid Facilities
Table 12-1 contains a list of valid facilities.
Table 12-1 Valid Facilities
Facility
kern user mail daemon auth lpr local0 local7 mark msgbuf
Description
Messages generated by the kernel. Messages generated by user processes. Messages generated by the mail system. Messages generated by the system daemons. Messages generated by the authorization system (for example, login, su, and getty). Messages generated by the printer spooling system. Reserved for local use. Messages of priority info every 20 minutes, unless a different interval is specified with syslogd -m; a timestamp. Kernel syslog message buffer recovered from a system crash. The savecore command and the syslogd daemon use the msgbuf facility
to recover system event messages from a crash. * Messages generated by all parts of the system.
A syslog.conf file might contain these lines:
*.notice;mail.info kern.err /var/spool/adm/syslog @tinker
The syslogd daemon logs all messages of level notice or higher and all mail messages of level info or higher in the /var/spool/adm/syslog file. The syslogd daemon forwards all kernel messages of level err or higher to system tinker.
Valid Levels
Table 12-2 lists valid levels from highest to lowest severity.
Table 12-2 Valid Levels
Level
emerg or panic alert crit error or err warning or warn notice info debug
Description
Indicates panic condition Denotes a condition that should be immediately corrected, such as a corrupted system database Displays critical condition, such as a hard device error Indicates error messages Denotes warning messages Provides conditions that are not error conditions, but are handled as special cases Displays informational messages Indicates messages containing information used to debug a program
12 4
Monitoring the System
A-PDF Split DEMO
Table 12-2 Valid Levels (Continued)
Level
none
Description
Disables a specific facility's messages
Destinations and Message Routing
Table 12-3 shows the types of destinations and where messages are routed.
Table 12-3 Message Destinations
Destination
Full pathname @hostname user1,user2,. *
Function
Appends messages to specified file. It can also be a device file, such as /dev/console. Forwards messages to the syslogd daemon on the specified host. Writes messages to the specified users if they are logged in. Writes messages to all users who are logged in.
If the destination includes syslog.dated, each day (or each time the system is booted) syslogd creates a directory and log file of the form /var/adm/syslog.dated/date/file. This is useful for separating each day's messages.
Note Log files for the current date are placed in the /var/adm/syslog_dated/current directory.
The syslog.conf File
Example 12-1 shows a default /etc/syslog.conf file from a Tru64 UNIX system.
Example 12-1 A syslog.conf File # syslogd config file # # facilities: kern user mail daemon auth syslog lpr binary # priorities: emerg alert crit err warning notice info debug kern.debug /var/adm/syslog.dated/kern.log user.debug /var/adm/syslog.dated/user.log mail.debug /var/adm/syslog.dated/mail.log daemon.debug /var/adm/syslog.dated/daemon.log auth.debug /var/adm/syslog.dated/auth.log syslog.debug /var/adm/syslog.dated/syslog.log lpr.debug /var/adm/syslog.dated/lpr.log msgbuf.err /var/adm/crash/msgbuf.savecore kern.debug /var/adm/messages kern.debug /dev/console *.emerg *
The default configuration logs kernel messages to the /var/adm/messages file. This is a good place to check for boot and other kernel messages.
12 5
Using ASCII Event Logging
A-PDF Split DEMO
Examining Log Files
You can display the log files. Example 12-2 shows a kernel log file.
Example 12-2 Kernel Log File # cat /var/adm/syslog.dated/22-Aug-13:19/kern.log Aug 7 10:11:59 tempest vmunix: Ethernet: late collision, check transceiver Aug 8 12:21:50 tempest vmunix: NFS server tinker:/project not responding, retrying Aug 8 12:21:50 tempest vmunix: NFS server tinker:/project not responding, retrying Aug 8 12:22:46 tempest vmunix: NFS server tinker:/project OK Aug 22 11:20:17 tempest vmunix: /users: file system full Aug 22 13:19:39 tempest vmunix: vnode: table is full
Cleaning Up Log Files
Over time, log files can take up a lot of space. If you are using dated log files, the system generates a lot of directories and files. You should truncate or remove old log files and dated directories regularly. You can use the cron command to do this. For example, the following line from a crontab file runs at 11:55 p.m. every day to delete dated directories that are more than 5 days old.
55 23 * * * find /var/adm/syslog.dated -depth -type d -mtime +5 -exec rm -rf {} \;
Stopping or Restarting syslogd
When syslogd is invoked, it creates the /var/run/syslog.pid file, which contains the syslogd process ID. To terminate syslogd, use the following command:
# kill `cat /var/run/syslog.pid`
To restart syslogd and cause it to reread syslog.conf, use the following command:
# kill -HUP `cat /var/run/syslog.pid`
12 6
Monitoring the System
A-PDF Split DEMO
Using Binary Event Logging
Overview
Tru64 UNIX systems support the binary event logging facility, which provides more detailed information about kernel events. The binlogd error logging daemon collects hardware and software events in the kernel and logs the detailed information in binary format records. The events are also logged by syslogd, but in a less detailed message. The binlogd daemon routes messages according to the /etc/binlog.conf configuration file. Messages can be: Appended to a file Forwarded to binlogd on another system
Keywords in the binlog_data.c File
You can enable or disable the binary event logger and specify the buffer size by changing the values of keywords in the /sys/data/binlog_data.c file and rebuilding the kernel, as shown in this table.
Table 12-4 binlog Keywords
Keyword Description
Size of kernel buffer Status of binary event logger
Possible Values
Between 8 and 48 KB - 0 (Disable) - BINLOG_ON (Enable) - BINLOG_ON|BINLOG_ASCIION (Enable kernel ASCII messages also)
binlog_bufsize binlog_status
Setting Up the Configuration File
Each line of the binlog.conf file specifies a set of messages by event class and level and a destination for the binary event records