VISUALAGE TEAMCONNECTION VERSION 3: HOW TO DO ROUTINE OPERATING SYSTEM TASKS Document Number TR 29.3094 Angel Rivera, Lee R. Perlov, Edna Wong Kyu TeamConnection Development IBM Software Solutions Research Triangle Park, North Carolina Copyright (C) 1998. IBM Corp. ii How to do routine operating system tasks ABSTRACT This technical report contains a collection of hints and tips for VisualAge TeamConnection Enterprise Server Version 3 users and family administrators that must cope with the heterogeneous oper- ating systems environments supported by VisualAge TeamConnection. This document focuses on several system-related tasks that are different across the diverse platforms available to developers using VisualAge TeamConnection. Some sample tasks are: o How to configure the system files related to TeamConnection. o How to shutdown and reboot a workstation. o How to create a user ID. o How to query for the free space of a file system. o How to test the connectivity of the host. ITIRC KEYWORDS o VisualAge TeamConnection o TeamConnection o OEM platforms o Operating systems o AIX o HP-UX o Solaris o OS/2 o Windows NT o Windows 95 ABSTRACT iii iv How to do routine operating system tasks ABOUT THE AUTHORS ANGEL RIVERA Mr. Rivera is an Advisory Software Engineer in the VisualAge TeamConnection/CMVC development group. He joined IBM in 1989 and since then has worked in the development and support of library systems. Mr. Rivera has an M.S. in Electrical Engineering from The Univer- sity of Texas at Austin, and B.S. in Electronic Systems Engi- neering from the Instituto Tecnologico y de Estudios Superiores de Monterrey, Mexico. LEE R. PERLOV Mr. Perlov is an Advisory Software Engineer in the VisualAge TeamConnection/CMVC development group. He started working for IBM in 1985 in Gaithersburg, Md, working in the Federal Systems Division on various projects for the United States intelligence community. He then moved to RTP to work on library development and support. Mr. Perlov received a B.S.Acc degree in Accounting from the Uni- versity of Florida in 1983. He also completed two years of grad- uate work in the Department of Computer Science at the University of Florida. EDNA WONG KYU Mrs. Kyu is a Staff Software Engineer for the Software Solutions division at Research Triangle Park. She joined IBM in 1987 and has worked in testing, VM systems programming, support of library platforms and support of various Unix platforms. Mrs. Kyu received a B.A. in Computer Science and a minor in Busi- ness from New York University in 1985. ABOUT THE AUTHORS v vi How to do routine operating system tasks CONTENTS ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . III ITIRC KEYWORDS . . . . . . . . . . . . . . . . . . . . . iii ABOUT THE AUTHORS . . . . . . . . . . . . . . . . . . . . . . V Angel Rivera . . . . . . . . . . . . . . . . . . . . . . . v Lee R. Perlov . . . . . . . . . . . . . . . . . . . . . . . v Edna Wong Kyu . . . . . . . . . . . . . . . . . . . . . . . v FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . X 1.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Acknowledgements . . . . . . . . . . . . . . . . . . . 1 1.2 Related technical reports . . . . . . . . . . . . . . 2 1.2.1 How to get the most up to date version of this technical report. . . . . . . . . . . . . . . . . . . . . 2 1.3 Supported Platforms . . . . . . . . . . . . . . . . . 3 1.4 Notes on the terminology used in this document . . . . 3 1.5 Notes for Intel users . . . . . . . . . . . . . . . . 3 1.5.1 Installing Unix-like commands . . . . . . . . . . . 4 1.5.2 One family per Intel host . . . . . . . . . . . . . 4 2.0 END USER TASKS . . . . . . . . . . . . . . . . . . . . . 5 2.1 What is the directory structure for TeamConnection? 5 2.2 How to find text strings (grep and find commands) . . 6 2.2.1 Unix: grep . . . . . . . . . . . . . . . . . . . . 6 2.2.2 Windows: findstr . . . . . . . . . . . . . . . . . 7 2.2.3 Unix: find . . . . . . . . . . . . . . . . . . . . 7 2.3 How to find out the version of TeamConnection? . . . . 9 2.3.1 GUI - all platforms . . . . . . . . . . . . . . . . 9 2.3.2 Unix - Client/Server . . . . . . . . . . . . . . 10 2.3.3 Intel - Client/Server . . . . . . . . . . . . . . 11 2.4 How to find out the version of the operating system? 12 2.4.1 Unix - operating system version . . . . . . . . . 12 2.4.2 Intel - operating system version . . . . . . . . 14 2.4.3 Windows . . . . . . . . . . . . . . . . . . . . . 14 2.5 Miscellaneous versions . . . . . . . . . . . . . . . 14 2.6 Where are the customization files for the TeamConnection GUI? . . . . . . . . . . . . . . . . . . . 15 2.6.1 Unix - Customization files . . . . . . . . . . . 15 2.6.2 Intel - Customization files . . . . . . . . . . . 16 2.7 Is there a sample profile for the TeamConnection end user? . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.7.1 Unix - Sample profiles . . . . . . . . . . . . . 16 2.7.2 Intel - Profile information . . . . . . . . . . . 17 2.8 Unix: How to see the contents of files that are active? . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.9 Unix: How to link files and directories using symbolic links? . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.10 How to find out all the processes that are running? 18 Contents vii 2.10.1 Unix - processes . . . . . . . . . . . . . . . . 18 2.10.2 Intel - Processes . . . . . . . . . . . . . . . 19 2.11 How to package and compress files . . . . . . . . . 20 2.11.1 All platforms: using zip and unzip from Info-Zip 20 2.11.2 Unix: using tar and compress . . . . . . . . . . 21 2.12 CR (carriage return) and LF (line feed) . . . . . . 22 2.12.1 Using the tool fixcrlf to fix CR-LF conversion problems . . . . . . . . . . . . . . . . . . . . . . . . 23 2.13 Verifying the checksum for files in Unix . . . . . 24 3.0 CONNECTIVITY TASKS . . . . . . . . . . . . . . . . . . 25 3.1 Test the connection to the TeamConnection family server . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2 Using the ping command . . . . . . . . . . . . . . . 26 3.3 Using the host command (or equivalent) . . . . . . . 27 3.4 Using the nslookup command . . . . . . . . . . . . . 28 3.5 Looking at the TCP/IP Configuration Notebook in OS/2 28 3.6 Using ipconfig in Windows NT . . . . . . . . . . . . 29 3.7 Using winipcfg in Windows 95 . . . . . . . . . . . . 29 3.8 Where are the host and services files? . . . . . . . 30 3.9 Using ypcat when the host is managed by NIS . . . . 30 4.0 ADMINISTRATIVE TASKS . . . . . . . . . . . . . . . . . 31 4.1 Which are the main administration tools for the operating system? . . . . . . . . . . . . . . . . . . . . 31 4.1.1 Unix - Administrative GUI tools . . . . . . . . . 31 4.1.2 Intel - Administrative Tools . . . . . . . . . . 31 4.2 Which are the main administration tools for TeamConnection? . . . . . . . . . . . . . . . . . . . . . 32 4.2.1 How to use the TeamConnection Family Administrator 32 4.2.2 How to use the TeamConnection Activity Monitor . 32 4.3 Is there a sample profile for a TeamConnection family? 34 4.3.1 Unix - Sample profiles . . . . . . . . . . . . . 34 4.3.2 Intel - Profile information . . . . . . . . . . . 35 4.4 Where are the error messages from the TC daemon and database? . . . . . . . . . . . . . . . . . . . . . . . . 35 4.4.1 Unix - syslog . . . . . . . . . . . . . . . . . . 35 4.4.2 Maintaining the syslog . . . . . . . . . . . . . 38 4.4.3 Intel - syslog . . . . . . . . . . . . . . . . . 38 4.5 How to determine the patches applied to the system? 38 4.5.1 AIX . . . . . . . . . . . . . . . . . . . . . . . 38 4.5.2 HP-UX . . . . . . . . . . . . . . . . . . . . . . 39 4.5.3 Solaris . . . . . . . . . . . . . . . . . . . . . 41 4.5.4 Windows . . . . . . . . . . . . . . . . . . . . . 43 4.5.5 OS/2 . . . . . . . . . . . . . . . . . . . . . . 43 4.6 How to create groups and users . . . . . . . . . . . 43 4.6.1 Unix . . . . . . . . . . . . . . . . . . . . . . 43 4.6.2 Intel . . . . . . . . . . . . . . . . . . . . . . 44 4.7 How to change the owner/group of a file . . . . . . 44 4.7.1 Unix - chown . . . . . . . . . . . . . . . . . . 44 4.7.2 Intel - file ownership . . . . . . . . . . . . . 45 4.8 How to export directories to be mounted by other hosts? . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.8.1 Unix - exporting directories . . . . . . . . . . 45 viii How to do routine operating system tasks 4.8.2 Intel - Exporting directories or drives . . . . . 47 4.9 How to mount directories exported by a remote host? 48 4.9.1 Unix - mount command . . . . . . . . . . . . . . 48 4.9.2 Intel - mount command . . . . . . . . . . . . . . 49 4.10 Using CD-ROMs . . . . . . . . . . . . . . . . . . . 50 4.10.1 AIX - CD-ROMs . . . . . . . . . . . . . . . . . 50 4.10.2 HP-UX - Using CD-ROMs . . . . . . . . . . . . . 52 4.10.3 Solaris - Using CD-ROMs . . . . . . . . . . . . 53 4.10.4 Intel - CD-ROMs . . . . . . . . . . . . . . . . 54 4.11 How to shutdown and reboot the machines? . . . . . 54 4.11.1 Unix - shutdown . . . . . . . . . . . . . . . . 54 4.11.2 Intel - How to shutdown and reboot . . . . . . . 56 4.12 How to startup an application upon boot and reboot 57 4.12.1 Unix Systems . . . . . . . . . . . . . . . . . . 57 4.13 Additional processing in Solaris . . . . . . . . . 59 4.13.1 OS/2 . . . . . . . . . . . . . . . . . . . . . . 59 4.13.2 Windows . . . . . . . . . . . . . . . . . . . . 59 4.14 How to find out the available space in a file system 60 4.14.1 Unix - Space in a file system . . . . . . . . . 60 4.14.2 Intel - Space on each drive . . . . . . . . . . 61 4.15 How to expand the size of a file system . . . . . . 61 4.15.1 AIX . . . . . . . . . . . . . . . . . . . . . . 62 4.15.2 HP-UX . . . . . . . . . . . . . . . . . . . . . 64 4.15.3 Solaris . . . . . . . . . . . . . . . . . . . . 65 4.15.4 Intel . . . . . . . . . . . . . . . . . . . . . 65 4.16 Unix: How to identify and kill semaphores and free shared memory? . . . . . . . . . . . . . . . . . . . . . 66 4.17 How to setup a printer . . . . . . . . . . . . . . 66 4.17.1 AIX . . . . . . . . . . . . . . . . . . . . . . 66 4.17.2 HP-UX . . . . . . . . . . . . . . . . . . . . . 68 4.17.3 Solaris . . . . . . . . . . . . . . . . . . . . 68 4.17.4 OS/2 . . . . . . . . . . . . . . . . . . . . . . 69 4.17.5 Windows . . . . . . . . . . . . . . . . . . . . 72 4.18 Using fsck to check for the file system consistency 73 4.19 How to check the swap space . . . . . . . . . . . . 73 4.20 Miscellaneous topics, by platform . . . . . . . . . 73 4.20.1 AIX . . . . . . . . . . . . . . . . . . . . . . 73 4.20.2 HP-UX . . . . . . . . . . . . . . . . . . . . . 74 4.20.3 Solaris . . . . . . . . . . . . . . . . . . . . 75 APPENDIX A. COPYRIGHTS, TRADEMARKS AND SERVICE MARKS . . . 77 Contents ix FIGURES 1. findfile: Korn shell script to perform a global find for files . . . . . . . . . . . . . . . . . . . . . . . . . 8 2. seek: Korn shell script to perform a global find for strings . . . . . . . . . . . . . . . . . . . . . . . . 9 3. Output of 'what teamcd' that shows details about AIX teamcd . . . . . . . . . . . . . . . . . . . . . . . . 10 4. Output of 'what teamc' that shows details about teamc 11 5. Output of 'what teamcd' that shows details about Windows teamcd . . . . . . . . . . . . . . . . . . . . . . . . 12 6. Output of 'net start' that shows Windows NT services . 20 7. Output of 'teamc report -testServer' . . . . . . . . . 25 8. Output of 'nslookup' . . . . . . . . . . . . . . . . . 28 9. Output of 'ipconfig' in Windows NT . . . . . . . . . . 29 10. Output of 'winipcfg' in Windows 95 . . . . . . . . . . 29 11. Output of 'monitor 1' . . . . . . . . . . . . . . . . 33 12. Output of 'lslpp' command . . . . . . . . . . . . . . 39 13. Output of 'swlist' . . . . . . . . . . . . . . . . . . 40 14. Output of 'swlist -l product' . . . . . . . . . . . . 40 15. Output of 'swlist -l product "DB2*" ' . . . . . . . . 41 16. Output of 'swlist -l fileset "DB2*" ' . . . . . . . . 41 17. Output of 'pkginfo' . . . . . . . . . . . . . . . . . 42 18. Output of 'pkginfo | grep -i db2' . . . . . . . . . . 42 19. Output of 'showrev -p' . . . . . . . . . . . . . . . . 42 20. Example shell script to mount file systems . . . . . . 55 21. /etc/rc.teamcd - Sample of auto start TeamConnection on boot . . . . . . . . . . . . . . . . . . . . . . . . . 58 22. Output of 'df -k' in AIX and Solaris (bdf in HP-UX) . 60 x How to do routine operating system tasks 1.0 INTRODUCTION This technical report contains a collection of hints and tips for VisualAge TeamConnection Enterprise Server Version 3 users and family administrators that must cope with the heterogeneous oper- ating systems environments supported by VisualAge TeamConnection. This document focuses on several system-related tasks that are different across the diverse platforms supported by VisualAge TeamConnection: 1. Some tasks that are usually performed by end users (which also include system and family administrators) are described in 2.0, "End User Tasks" on page 5. 2. Some tasks that are usually performed to test the connectivity of the TeamConnection client machine and the TeamConnection family server machine are described in 3.0, "Connectivity Tasks" on page 25. 3. Some tasks that are usually performed by system and family administrators are described in 4.0, "Administrative Tasks" on page 31. Each task is grouped, where appropriate, into "Unix" (that is, AIX, HP-UX and Solaris) and "Intel" (that is, OS/2, Windows NT, and Windows 95) sections, since there are typically significant differences in how tasks are performed for each group. There are subsections where differences exist between specific operating systems in a group. For example, the administrative tool in AIX is smit, in HP-UX is sam and in Solaris is admintool. 1.1 ACKNOWLEDGEMENTS Many of the questions and answers that are compiled in this tech- nical report were obtained from the TEAMC and CMVC forums in the IBMPC conferencing disk and from the CMVC6000 forum in the IBMUNIX conferencing disk. We want to thank the main partic- ipants in these electronic forums for their support! We want to thank in particular the following co-workers and cus- tomers: o Keith Purcell, OEM Lab in RTP, North Carolina. o Jim Austin, AIX Lab in RTP, North Carolina. o Clifford Meyers, VisualAge TeamConnection team in RTP, North Carolina. Introduction 1 o Tom Bing from Andersen Consulting and BellSouth, Atlanta, Georgia. We want to thank Dodde Stark for editing this technical report. 1.2 RELATED TECHNICAL REPORTS The following technical reports provide more details on installa- tion and maintenance tasks for DB2 Universal Database V5 which is the database management system used by VisualAge TeamConnection Enterprise Server Version 3: o TR 29.3076 Configuration and Administration of DB2 Universal Database V5 by users of VisualAge TeamConnection Enterprise Server V3. VisualAge TeamConnection Enterprise Server Version 3 uses DB2 Universal Database V5 (DB2 UDB V5) to store objects and parts. This technical report provides a collection of hints and tips for the installation and configuration of DB2 UDB V5 for the supported platforms. This technical report is based on the technical report TR 29.2267 for Version 2: "TeamConnection frequently asked questions: how to do routine operating system tasks". 1.2.1 How to get the most up to date version of this technical _______________________________________________________________ report. _______ This document, as well as other recently released technical reports related to TeamConnection, contains some information that was previously available in other "unofficial" documents. We have endeavored to better organize the information and improve its readability so that you will find it more useful. The most up to date version of this technical report can be obtained from the IBM VisualAge TeamConnection Enterprise Server: o Library home page by selecting the item Library at URL: HTTP://WWW.SOFTWARE.IBM.COM/AD/TEAMCON o FTP site by accessing the URL: FTP://FTP.SOFTWARE.IBM.COM/PS/PRODUCTS/TEAMCONNECTION/PAPERS See the file README.index.txt for details. 2 How to do routine operating system tasks 1.3 SUPPORTED PLATFORMS The supported operating systems for VisualAge TeamConnection Version 3 that have both server and client code are: AIX Version 4.2.1 HP-UX Version 10.20 Solaris Version 2.5.1 OS/2 Warp Version 4 Windows NT Version 4 The operating systems that have only client code are: Windows 95 NOTE: Notice that the client for Windows 3.1, which was sup- ported in VisualAge TeamConnection version 2, is no longer sup- ported in Version 3. 1.4 NOTES ON THE TERMINOLOGY USED IN THIS DOCUMENT o Some tasks are specific to the Unix family of operating systems, due to the multi-user characteristics. o The names of the operating systems will be used without the version numbers, when there is no need to specify it. For example, the term "AIX" means in this document "AIX Version 4". o The term Unix will be used as a generic term for all the dif- ferent Unix versions when there is no need to specify one of them. o The term Windows will be used as a generic term for all the different Windows versions when there is no need to specify one of them. o The term Intel will be used as a generic term for the non- Unix operating systems that run under Intel processors (OS/2 and Windows) when there is no need to specify one of them. 1.5 NOTES FOR INTEL USERS Introduction 3 1.5.1 Installing Unix-like commands ____________________________________ We strongly recommend installing a package of Unix-like commands for your Intel platform (such as grep, which, cut). These packages are generally inexpensive and provide between 30 and 100 useful tools that are common to Unix operating systems. These tools will allow you to perform most of the Unix commands described in this document on your Intel operating system. You may try to find such packages from the Internet by using search engines such as "http://www.yahoo.com/" and using keywords such as "OS/2 utilities" or "Windows NT utilities". 1.5.2 One family per Intel host ________________________________ Due to the performance characteristics of Intel machines, it is strongly recommended that only one DB2 instance and only one TeamConnection family should be installed in an Intel host. Furthermore, the Windows NT "Administrator" user id cannot be used to administer the DB2 instance and to handle the DB2 tools. This user id does not comply the upper limit of 8 characters in the user id. Thus, another administrator user such as "db2admin" must be created to handle the DB2 activities. This in turn, has an effect in the maintenance of a TeamConnection family, which uses the DB2 facility. In other words, if you use "db2admin" to start DB2, then it is better to use it also to start the TeamConnection family. 4 How to do routine operating system tasks 2.0 END USER TASKS This section describes some common tasks and useful information for TeamConnection client users. 2.1 WHAT IS THE DIRECTORY STRUCTURE FOR TEAMCONNECTION? This section provides a summary of the default directory struc- ture used by VisualAge TeamConnection: o DB2 UDB - code The UNIX location cannot be changed! AIX /usr/lpp/db2_05_00 HP-UX /opt/IBMdb2/V5.0 SOLARIS /opt/IBMdb2/V5.0 WINDOWS NT c:\sqllib OS/2 WARP c:\sqllib o DB2 instance (such as db2inst1) The UNIX location cannot be changed if you use the DB2 installer! AIX /home/db2inst1 HP-UX /home/db2inst1 SOLARIS /export/home/db2inst1 WINDOWS NT c:\sqllib OS/2 WARP c:\sqllib o DB2 Administration Server (such as db2as) The UNIX location cannot be changed if you use the DB2 installer! AIX /home/db2as HP-UX /home/db2as SOLARIS /export/home/db2as WINDOWS NT c:\sqllib OS/2 WARP c:\sqllib o VisualAge TeamConnection code AIX /usr/teamc HP-UX /opt/teamc SOLARIS /opt/teamc WINDOWS 95 AND NT c:\teamc OS/2 WARP c:\teamc End User Tasks 5 o VisualAge TeamConnection family (such as tcfamily) AIX /home/tcfamily HP-UX /home/tcfamily SOLARIS /export/home/tcfamily WINDOWS NT c:\tcfamily OS/2 WARP c:\tcfamily By default, the actual database is stored under the DB2 Instance home. 2.2 HOW TO FIND TEXT STRINGS (GREP AND FIND COMMANDS) 2.2.1 Unix: grep _________________ The "grep" utility can be used to find out strings inside files or as part of a redirected output from a line command. o Example of searching for the strings that contain "DB2" in the .profile for a family: grep DB2 .profile The output could be something like this: export DB2INSTANCE=db2inst1 export DB2DBDFT=$LOGNAME o Example of searching for the environment variables that contain "DB2": set | grep DB2 The output could be something like this: DB2INSTANCE=db2inst1 DB2DBDFT=$LOGNAME o Example of searching for the strings that contain "DB2" or "db2" (case insensitive) in the /etc/services file: grep -i db2 /etc/services The output could be something like this: db2cd2inst1 50000/tcp # Connection port for DB2 instance db2inst1 db2id2inst1 50001/tcp # Interrupt port for DB2 instance db2inst1 6 How to do routine operating system tasks 2.2.2 Windows: findstr _______________________ The equivalent command in Windows for the "grep" command in Unix, is "findstr". 2.2.3 Unix: find _________________ The "find" utility can be used to find files that satisfy certain criteria. Even though it is a very powerful command, it is a bit difficult to understand and master, therefore, this section shows 2 actual Korn shell scripts that exploit this command. 2.2.3.1 Finding file names in subdirectories To see if a file named "file.c" is located inside a directory structure, and to find out where is actually located, issue the following command: $ findfile . file1.c findfile: searching in . for file1.c ./src/file1.c In this example, the directory structure is the current directory and the file was found in the subdirectory ./src The findfile Korn shell script is shown below: End User Tasks 7 #!/usr/bin/ksh #---------------------------------------------------------------------+ # NAME: findfile path filename # # DESCRIPTION: # This shell script is a global find file command. # This shell script invokes the find command to perform a recursive # search in the directories. # #---------------------------------------------------------------------+ # # Invoke findfile USAGE="findfile path filename" if "$#" -eq 2 then echo "findfile: searching in $1 for $2" find $1 -name $2 -print else echo "findfile: Usage is = $USAGE" echo " example from current directory: findfile . filename " echo " example from home directory: findfile $HOME filename " fi # end of file Figure 1. findfile: Korn shell script to perform a global find for files 2.2.3.2 Finding a string in a set of subdirectories To find the files inside a directory structure that have a par- ticular text string (such as msgText), issue the following command: $ seek msgText seek: searching for msgText find . -type f -exec grep -l 'msgText' {} \; ./src/file1.c In this example, the directory structure is the current directory and the file was found in the subdirectory ./src The seek Korn shell script is shown below: 8 How to do routine operating system tasks #!/usr/bin/ksh #---------------------------------------------------------------------+ # NAME: seek string # # DESCRIPTION: # This shell script is a global find string command. # # This shell script invokes the find command to perform a recursive # search in the directories. The find command uses # the grep command to search for the actual string. # #---------------------------------------------------------------------+ # # Invoke seek USAGE="seek string" if "$#" -eq 1 then echo "seek: searching for $1" echo "find . -type f -exec grep -l '$1' {} \;" find . -type f -exec grep -l "$1" {} \; else echo "seek: Usage is = $USAGE" fi # end of file Figure 2. seek: Korn shell script to perform a global find for strings 2.3 HOW TO FIND OUT THE VERSION OF TEAMCONNECTION? 2.3.1 GUI - all platforms __________________________ The version of the TeamConnection GUI for all platforms can be found from the Help pulldown, option "Product Information". For example: IBM VisualAge TeamConnection for Windows, Version 3 Release 0 Mod 1 It is important to clarify that due to the GUI -> line command -> server model of TeamConnection, the version of the GUI might be different than the line commands or the server. This could happen if there are hotfixes applied to one of them. End User Tasks 9 2.3.2 Unix - Client/Server ___________________________ The version of the TeamConnection server and line commands for Unix can be found as follows: 1. Find out the directory where the daemon (teamcd) or the client (teamc) is installed: o For AIX or Solaris, enter: which teamcd o For HP-UX, enter: whence teamcd 2. Change to the directory shown in the step above. 3. Use the 'what' command to find out the embedded strings that begin with @(#) and search for the 'teamc' keyword: o For the server, do the following: what teamcd | grep teamc The output should look like this: teamcd: teamc (C) Copyright IBM Corp.,1996,1998 teamc Platform: AIX tcaix02 1 4 000044289000 teamc Release: v310 teamc Driver: N98-10-17 teamc The database is DB2 Universal Database Version 5.0.0 Figure 3. Output of 'what teamcd' that shows details about AIX teamcd o For the client, do the following: what teamc | grep teamc The output should look like this: 10 How to do routine operating system tasks teamcd: teamc (C) Copyright IBM Corp.,1996,1998 teamc Platform: AIX tcaix02 1 4 000044289000 teamc Release: v310 teamc Driver: N98-10-17 Figure 4. Output of 'what teamc' that shows details about teamc Notice that the output for the client is the same as the server, with the exception of the line about the database name and version. 4. You can use the following statement to perform in a single statement the operations of finding out where the file is located and then doing the what command against that file: o Option 1: what 'whence cmvcd' | grep cmvc NOTE: Where ' is the accent grave, in the upper left corner in the English keyboard. o Option 2 (only when using Korn shell): what $(whence cmvcd) | grep cmvc NOTE: The release string "v310" in the output from the "what" command represents Version 3 Release 0 Modification 1 (or Fixpak 1) of VisualAge TeamConnection. 2.3.3 Intel - Client/Server ____________________________ The client and code for Intel has the same "what" strings and if you have access to a similar "what" and "grep". command, then you can find out the version of the TeamConnection executables. For OS/2 and Windows NT, TeamConnection provides a version of the "what" command: "tcwhat". o Locate the TeamConnection "bin" directory on the path: echo %PATH% or PATH End User Tasks 11 o Change to the appropriate directory for VisualAge TeamConnection that is shown in the PATH, such as C:\TeamC o Use the 'tcwhat' command to find out the embedded strings that begin with @(#): tcwhat teamcd The output should look like this: teamcd: teamc (C) Copyright IBM Corp.,1996,1998 teamc Platform: Windows NT Version 4.0 teamc Release: v310 teamc Driver: N98-10-17 teamc The database is DB2 Universal Database Version 5.0.0 Figure 5. Output of 'what teamcd' that shows details about Windows teamcd 2.4 HOW TO FIND OUT THE VERSION OF THE OPERATING SYSTEM? 2.4.1 Unix - operating system version ______________________________________ You can use the command "uname -a". The output will be similar to the following: o AIX AIX oem-ppc3 2 4 000022559000 = + = ++++++ Version = ============ Release Notice that the version (4) is shown after the release (2). Thus in the above example, the operating system is: AIX 4.2 o HP-UX 12 How to do routine operating system tasks HP-UX oem-hp10 B.10.20 A 9000/770 2006068783 two-user license +++++ + ++++++ Version + Release In the above example, the operating system is: HP-UX 10.20 o Solaris SunOS oem-sn08 5.5.1 Generic_103640-14 sun4u sparc SUNW,Ultra-2 +++++ +++++ + + + ++++++ Version + Release + Level + +++++ "Generic" term for the family of SunOS operating systems. In the above example, the operating system is: Solaris 2.5.1. The explanation for the equivalence between "SunOS 5.5.1" and "Solaris 2.5.1" is shown below. The SunOS operating system (Version 4.x) was based on the BSD Unix system. However, due to the industry convergence to the System V Unix system, the Solaris 2.x operating system was born, which is not binary compatible in most cases with the SunOS operating system. However, for marketing reasons (and not for technical reasons), a family of operating systems was created, in which the term "SunOS 4" refers to the old SunOS, and the term "SunOS 5" refers to the new Solaris system (but the Solaris version number begins with 2). One example of this strategy is in the output of the "uname" command, in which "SunOS 5.5.1" really means "Solaris 2.5.1". This is used to cause a lot of confusion a couple of years ago, when the customer base for SunOS was larger than the Solaris one. Specifically, due to the binary incompatibility between SunOS 4 and Solaris, in CMVC we provide two versions, one for the old SunOS 4 and another one for the new Solaris; when a customer said, I have a Sun operating system, we had to ask, which one? 2.4.1.1 AIX level version For AIX, you can find the level (that is, version.release.level) using the following command: oslevel The output looks like this: 4.2.1.0 End User Tasks 13 This is more conclusive than looking at the different "bos.*" installp packages in your system and trying to guess which one represents the actual level number. 2.4.1.2 X-Windows server version The X-Windows server is the program the manages the graphical display on your system and communicates with the TeamConnection GUI for Unix. The X-Windows server needs to be running when you run the following command: xrdb -symbols The output will have a lot of entries, the ones that are of interest are the ones that identify X11 R5 as follows: -DVERSION=11 -DRELEASE=5 2.4.2 Intel - operating system version _______________________________________ You can use the command "ver". For example: Windows NT Version 4.0 2.4.3 Windows ______________ 1. Select Start -> Settings -> Control Panel. 2. Double click on the icon System. 3. In the tab "General" you will see the version of the oper- ating system, such as: Microsoft Windows NT 4.00.1381 2.5 MISCELLANEOUS VERSIONS Because HP-UX has a history of significant bugs in certain ver- sions of tools, it is important to know what version you have: o Check for version of compiler: what cc Look for something like "A.10.13" 14 How to do routine operating system tasks o Check for version of linker: what ld Look for something like "B.10.19" 2.6 WHERE ARE THE CUSTOMIZATION FILES FOR THE TEAMCONNECTION GUI? 2.6.1 Unix - Customization files _________________________________ There are two customization files for the GUI: o $HOME/teamcv3x.ini This is the file that contains the tasks shown in the TeamConnection GUI Tasks window and contains values used by functions in the GUI. The user could copy the sample task list and customize it by using the GUI and not by modifying directly this file (in Unix): cp /usr/teamc/nls/cfg/$LANG/teamcv3x.ini $HOME/. chmod u+w $HOME/teamcv3x.ini NOTE: It is strongly recommended that the users should not attempt to edit this file; use the GUI functions from File -> Task List -> Edit task list. o $HOME/Teamcgui This is the local Motif Resource File in Unix where the user can specify the font type and size, and colors. If this file does not exist, then the GUI will NOT create it in the $HOME directory; instead, the GUI will rely on the system-wide Teamcgui resource file which is located in /usr/teamc/nls/msg/$LANG/Teamcgui. The user could copy the sample and customize it (in Unix): cp /usr/teamc/nls/cfg/$LANG/Teamcgui.user $HOME/Teamcgui chmod u+w $HOME/Teamcgui Those advanced users who want to guarantee that the new Teamcgui changes are loaded, they can do the following: 1. Exit teamcgui 2. xrdb -remove 3. xrdb -load Teamcgui End User Tasks 15 2.6.2 Intel - Customization files __________________________________ In OS/2 and Windows, the teamcv3.ini file is stored where the operating system code is stored, such as C:\OS2 or C:\WINDOWS. These files are updated through the settings page of the teamcgui. It is strongly recommended that the users should not attempt to edit this file; use the GUI functions from File -> Task List -> Edit task list. 2.7 IS THERE A SAMPLE PROFILE FOR THE TEAMCONNECTION END USER? Because there are many environment variables that are needed for a VisualAge TeamConnection family or end user, we provide sample profiles that have already defined these variables. Some of them are commented out and the user needs to activate them by deleting the comment mark (such as the one for each operating system), and others require a real value instead of the place-holder value used in the sample. 2.7.1 Unix - Sample profiles _____________________________ The following sample profile can be used as the basis for the profile of a Unix user account that will use TeamConnection (end- user): 1. Login as the end user. 2. Make a backup of the current profile. cp .profile .profile.original 3. Copy the sample profile. In AIX do the following (use /opt/teamc for HP-UX and Solaris): cp /usr/teamc/nls/cfg/$LANG/profile.user .profile chmod u+w .profile 4. Read the entire profile and delete the comment character (in the first column) of those lines that are appropriate for the operating system to be used. Also, use the appropriate values for your setup. 16 How to do routine operating system tasks 5. Logout and login again in order to start with a fresh envi- ronment. Note that some users just restart the .profile without logging out and then logging in. The problem is that there are some variables such as $PATH that uses a previous version of itself, and thus, when logging out and then logging in, the PATH is properly set. 2.7.2 Intel - Profile information __________________________________ Because the Intel operating systems are single user systems, the TeamConnection installation script addresses all environmental configuration needs in the appropriate system files or registry. However, the administrator should verify the setup for the TeamConnection and DB2 variables such as TC_FAMILY and TC_BECOME, which will be used for line commands. 2.8 UNIX: HOW TO SEE THE CONTENTS OF FILES THAT ARE ACTIVE? To see the up-to-date contents of the files that are active, such as nohup.out and the audit or database logs, do the following: 1. Enter the following command: tail -f filename 2. Observe that the output is scrolling when the file is being updated. 3. If it is no longer scrolling, then the file is not being updated anymore. 4. Press Ctrl+C to exit from the tail command. 2.9 UNIX: HOW TO LINK FILES AND DIRECTORIES USING SYMBOLIC LINKS? o To establish a symbolic link between a 'real' file/directory and a 'shadow' file/directory do: ln -s real-entity shadow-entity The following example will allow the user to use "myFile" as if it were the real "myFileWithLongName": End User Tasks 17 ln -s $HOME/bin/myFileWithLongName $HOME/myFile o Use the following command in order to see the real file of a linked file: ls -l fileName Using the example above, the output of "ls -l myFile" would look like: lrwxrwxrwx 1 rivera staff 9 Nov 17 09:22 myFile@ -> myFileWithLongName NOTES: 1. The first character in the file permissions is an "l" which indicates a "link". 2. The string "myFile@ -> myFileWithLongName" means that the file "myFile" is really mapped to the real file "myFileWithLongName". 3. The "@" at the end of "myFile" indicates that is a sym- bolic link. o Use the following command in order to see the real directory of a linked directory: ls -dl directoryName This is useful to avoid showing the actual contents of the directory, which is what you get if you use "ls -l directoryName". 2.10 HOW TO FIND OUT ALL THE PROCESSES THAT ARE RUNNING? 2.10.1 Unix - processes ________________________ To see the processes that are running, do the following: o To find out how many TeamConnection family server daemons are running on the entire system: ps -ef | grep teamcd o To find out all of the processes running in a family account: ps -fu FAMILY_ACCOUNT Where FAMILY_ACCOUNT is the name of your family. 18 How to do routine operating system tasks In TeamConnection, there are different processes that are typically running: teamcd, teamcbld and teamcgui. You will also intermittently see teamc and any miscellaneous tools being run in the family account. 2.10.2 Intel - Processes _________________________ 2.10.2.1 OS/2 - process status pstat | more 2.10.2.2 Windows o You can use the Task Manager to find out which processes are running. 1. Select the task bar at the bottom of the screen (default location). 2. Click on the right button of the mouse and select "Task Manager". 3. Select the tab "Applications". You will see the active applications, such as "TeamConnection - Tasks". 4. Select the tab "Processes". You will see the list of processes and the real names of the executables, such as "TEAMCGUI.EXE". o You can also issue the command "net start" as follows: End User Tasks 19 C:\>net start These Windows NT services are started: Computer Browser DB2 - DB2 DB2 - DB2DAS00 EventLog Lotus Domino Go Webserver Messenger Plug and Play Remote Procedure Call (RPC) Service Server Spooler TCP/IP NetBIOS Helper TME 10 NetFinity Support Program TrcBoot Workstation Figure 6. Output of 'net start' that shows Windows NT services 2.11 HOW TO PACKAGE AND COMPRESS FILES Sometimes it is necessary to package a set of files into a single one in order to perform a backup copy or to send them to another system. Furthermore, in order to save space, the file that con- tains the packaged files can be compressed. 2.11.1 All platforms: using zip and unzip from Info-Zip ________________________________________________________ The VisualAge TeamConnection team uses the Info-Zip "zip" and "unzip" tools to package compressed files (in which the files to be packaged are compressed first). The main advantages of Info-ZIP are: o Compatibility: these tools are compatible with other ZIP pro- grams. o Portability: they are available in ALL the platforms that are supported by VisualAge TeamConnection. Furthermore, a zip file prepared in Unix can be unzipped in the correct format in Windows NT and vice versa. This is something that the other ZIP programs such as "gnuzip" or "gzip" cannot do. 20 How to do routine operating system tasks Info-ZIP's software (zip, unzip and related utilities) is free and can be obtained for the desired platforms from various anonymous-ftp sites, including the URL: ftp://ftp.uu.net:/pub/archiving/zip/ To compress and package files do the following: 1. Change to the directory where you have the files to be proc- essed. 2. Issue the following command to compress and package: zip -r myfile.zip fileList The -r flag indicates that if there are subdirectories, they need to be recursively traversed. The fileList can be a single file (file.c), a list of files (file.c file.h) or using wildcards (file*). 3. To only view the contents of the zip file (without actually unpackaging and uncompressing the files) do: unzip -l myfile.zip 4. To unpackage and uncompress the zip file do: unzip myfile.zip 5. To fine more information about these tools simply invoke them without any parameters. 2.11.2 Unix: using tar and compress ____________________________________ In case that you do not want to use the Info-Zip tools, you may want to do the following process to package and compress files: 1. Change to the directory where you have the files to be pack- aged. 2. Issue the tar command to package the files (without com- pression): tar -cvf file.tar fileList The fileList can be a single file (file.c), a list of files (file.c file.h) or using wildcards (file*). 3. Issue the compress command to reduce the size of the tar file: End User Tasks 21 compress file.tar The file will be compressed and the file name will be changed to reflect that it is compressed. The new name will have a suffix of uppercase Z at the end, such as "file.tar.Z". 4. Issue the uncompress command to restore the tar file to its original size: uncompress file.tar.Z The file will be uncompressed and the file name will be changed to its original name, such as "file.tar". 5. Issue the tar command to list the table of contents (without actually unpackaging the files) tar -tvf file.tar 6. Issue the tar command to unpackage (extract) the files: tar -xvf file.tar 2.12 CR (CARRIAGE RETURN) AND LF (LINE FEED) The end of a line of text in OS/2 or in Windows is represented by the character pair CR-LF (carriage return and line feed), whereas in Unix is represented simply by the character LF (line feed). In TeamConnection, the model of what-you-see-is-what-you-get is used. This means that if a user creates a file in TeamConnection, regardless of the platform of the server, then TeamConnection will NOT do any conversion of LF or CRLF on that file. There are choices in the -extract action to allow for more fine tuning of these on-the-fly-conversions. For example, a Unix user may wish to extract with only LF a file that was stored ori- ginally from OS/2 that has CRLF. The following file will be the source file to be used in the rest of the examples in this section: This is line 1 This is line 2 This is line 3 If the source file is created from an OS/2 client and later on is extracted into a Unix client without CRLF conversion, then the resulting file will have the CR character at the end of each line and the file would look like: 22 How to do routine operating system tasks This is line 1&caret.M This is line 2&caret.M This is line 3&caret.M NOTE: The &caret. symbol is similar to an inverted V, located in the Shift position for the numeric key "6" in the alphanumeric keyboard (not in the numeric keyboard in the right side) for English for the USA. If the source file is created from a Unix client and later on is extracted into an OS/2 client without CRLF conversion, then the resulting file will not have the CR character at the end of each line and the file would look like: This is line 1 This is line 2 This is line 3 2.12.1 Using the tool fixcrlf to fix CR-LF conversion problems _______________________________________________________________ If you are encountering the CR-LF problems mentioned in 2.12, "CR (carriage return) and LF (line feed)" on page 22 with your files when exchanging text files between Unix and Intel, then you can use the FIXCRLF tool. This tool can be obtained from the TeamConnection ftp site: 1. ftp ftp.software.ibm.com 2. login anonymous 3. cd ps/products/teamconnection/tools 4. ascii 5. get fixcrlf.txt 6. binary 7. Download the corresponding file for your platform: o AIX: aixfixcrlf o HP-UX: hpfixcrlf o Solaris: fixcrlf.solaris o OS/2: fixcrlf2.exe o Windows: fixcrlfw.exe 8. quit The file fixcrlf.txt provides more details about using the tool. Also, you can simply invoke the tool with no parameters to find out how to use it. End User Tasks 23 2.13 VERIFYING THE CHECKSUM FOR FILES IN UNIX The SUM command is generally used to determine if a file that has been copied or communicated over transmission lines is an exact copy of the original. This command provides both the checksum and the number of 1024-byte blocks for a given file, such as: $ sum file1 55681 11 file1 ***** --> number of blocks (1024-byte) ***** --> checksum NOTE: The sum command is implemented differently in each oper- ating system and the results will be different when running the command against the same file in different operating systems. 24 How to do routine operating system tasks 3.0 CONNECTIVITY TASKS This section describes some common tasks and useful information for testing the connectivity between the TeamConnection client machine and the TeamConnection family server machine. Sometimes it is important to test the connectivity of a host in order to properly diagnose a problem. 1. The "teamc report -testServer" command is useful to determine if the TeamConnection client can connect to the TeamConnection family server. 2. The ping command can be issued to find out if the host is operational. 3. The host command can be issued to find out if there is full reciprocity between a host name and its IP address. 4. In case of problems with the ping or host command, some useful commands are described to help with the debugging efforts. 3.1 TEST THE CONNECTION TO THE TEAMCONNECTION FAMILY SERVER You can use the command "teamc report -testServer" to verify if the TeamConnection client has a good connection to the TeamConnection family server. For example: $ teamc report -testServer Connect to Family Name: vatc Server TCP/IP Name: tcaix05.raleigh.ibm.com Server IP Address: 9.67.238.38 Server TCP/IP Port Number: 2600 Server Specific Information ---------------------------------- Product Version: 3.0.1 Operating System: AIX Message catalog language: English Server Mode: non-maintenance Authentication Level: PASSWORD_OR_HOST Figure 7. Output of 'teamc report -testServer' Connectivity Tasks 25 3.2 USING THE PING COMMAND The "ping" command is the first tool that the user should use to diagnose possible network problems. The TCP/IP "ping" command can be used to test if a given host specified by a host name or host IP address is registered as a valid host and actively connected to the network. If the host name or IP address is not registered as a valid iden- tifier, then the ping command will fail. If the host is active but not connected to the network then the "ping" command will not be able to receive the expected message. For example: 1. At a prompt, type "ping testfam". If you receive information that is similar to the following, you can successfully connect to your TeamConnection family: PING testfam.company.com: 56 data bytes 64 bytes from 1.23.457.78: icmp_seg:0. time=0. ms 64 bytes from 1.23.456.78: icmp_seg:1. time=0. ms 64 bytes from 1.23.456.78: icmp_seg:2. time=0. ms 2. Press Ctrl+C to end the command. You may get the following summary: --- testfam.company.com ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0/0/0 ms In Windows, the ping command only shows few lines and then it terminates by itself. 3. If you receive the message "unknown host testfam", you cannot connect to the family. Verify that the data in the hosts and services files is correct, and then try the command again. If you still do not get the correct response, contact your TCP/IP administrator to solve the problem. 26 How to do routine operating system tasks 3.3 USING THE HOST COMMAND (OR EQUIVALENT) In AIX and in OS/2 there is a command called "host" which gets the IP address given a host name or vice versa. This command uses the local /etc/hosts file first, and if the host name or the IP address is not found there, then the network name server is contacted next. This command is not provided by TCP/IP in Solaris, HP-UX and Windows, but we provide in the CD-ROMs for TeamConnection the command "tchost", which is a reduced version of the AIX "host" command: Platform location in CD-ROM Windows NT samples/tchostw.exe HP-UX misc/tchost.hp Solaris misc/tchost.sol The "host" command is used to ensure that a specified host name can be resolved to an IP address, and correspondingly, that the same IP address is resolved to the specified host name. We have seen cases in which a host name is resolved to an IP address, but this IP address is resolved to a different host. In these cases, it is important to first fix the TCP/IP configura- tion problem and do NOT attempt to use TeamConnection until the TCP/IP problem is fixed. Also, we have seen this problem when using DHCP in Windows 32-bit in which the host receives a dynamic IP address that exists only for the duration of the session. In this cases it is better to use the password authentication level (such as PASSWORD_ONLY or PASSWORD_OR_HOST) for TeamConnection. In some networks, there could be a mismatch between the host name and the IP address. Do the following to verify that the hosts file is specified correctly: 1. Type "host family_name", where family_name is the name of your TeamConnection family. The information returned should match the number and name specified in your hosts file. For example: host testfam The system response might be as follows: testfam.company.com = 9.12.345.67 2. Type "host ip_address", where ip_address is the IP address of your machine. Connectivity Tasks 27 The information returned should match the output from the previous step (that is: host testfam). For example: host 9.12.345.67 The system response might be as follows: testfam.company.com = 9.12.345.67 If you do not receive the expected response, contact your TCP/IP administrator to solve the problem. In some networks the second step gives a different host name and this will cause problems with TeamConnection. 3.4 USING THE NSLOOKUP COMMAND The TCP/IP "nslookup" command skips the local hosts file and queries directly the network name server, thus its name: Name Server Look Up. It provides the host name and IP address of the name server, followed by the target host name and IP address. For example: $ nslookup cordoba Server: ralns1.raleigh.ibm.com Address: 9.37.0.5 Name: oem-ppc3.raleigh.ibm.com Address: 9.37.199.98 Aliases: cordoba.raleigh.ibm.com Figure 8. Output of 'nslookup' 3.5 LOOKING AT THE TCP/IP CONFIGURATION NOTEBOOK IN OS/2 In OS/2, you can look at the TCP/IP Configuration Notebook to find out the details on the configuration of TCP/IP. 28 How to do routine operating system tasks 3.6 USING IPCONFIG IN WINDOWS NT Windows NT provides the following utility to find out the actual TCP/IP values used with the current communication session in your machine: 1. Open a Command Prompt window. 2. Issue: ipconfig Windows NT IP Configuration Ethernet adapter NdisWan4: IP Address. . . . . . . . . : 9.37.194.164 Subnet Mask . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . : 9.37.192.1 Figure 9. Output of 'ipconfig' in Windows NT 3.7 USING WINIPCFG IN WINDOWS 95 Windows 95 provides the following utility to find out the actual TCP/IP values used with the current communication session in your machine: 1. Select Start -> Run... 2. From the Run window, enter the name: winipcfg 3. You will see a window titled "IP Configuration" and will have data such as: Ethernet Adapter Information PPP Adapter Adapter Address: 44-45-53-54-00-00 IP Address: 32.225.77.105 Subnet Mask: 255.0.0.0 Default Gateway: 32.225.77.105 Figure 10. Output of 'winipcfg' in Windows 95 Connectivity Tasks 29 4. You can press the button "More Info >>" and then you will see the additional information about the host, such as: Host Information Host Name: xxx.raleigh.ibm.com DNS Server: 9.67.1.5 3.8 WHERE ARE THE HOST AND SERVICES FILES? The "hosts" file is used to indicate the IP address of a host and aliases for that host. The "services" file is used to indicate the port number of the service (TeamConnection family). UNIX "/etc/hosts" and "/etc/services" It is recommended that the system administration utilities should be used to update these files, such as smit in AIX and sam in HP-UX. OS/2 They are located in the directory described in the environment variable "etc". To see the value for this variable type: SET ETC WINDOWS 95 They are located where the operating system is located, such as C:\WINDOWS The "hosts" file by default does not exist, but it can be constructed from the sample "Host.sam" which, by default, resides in C:\WINDOWS WINDOWS NT They are located in the subdirectory SYSTEM32\DRIVERS\ETC, where the operating system is located. The default is C:\WINNT 3.9 USING YPCAT WHEN THE HOST IS MANAGED BY NIS When using NIS to control the userIDs, the groupIDs and the port numbers in the services file of client machines from a central machine, you can use the command ypcat to find out more details about the NIS maps: o ypcat passwd (for /etc/passwd replacement/supplement) o ypcat group (for /etc/group replacement/supplement) o ypcat services (for /etc/services replacement/supplement) o ypcat -x (to display the Nickname Translation Table, which indicate the things that are mapped). Please consult your local documentation to know how to tell which files are being supplemented or replaced. 30 How to do routine operating system tasks 4.0 ADMINISTRATIVE TASKS This section describes some common tasks that the system adminis- trators or the TeamConnection family administrators are likely to do with the operating system. 4.1 WHICH ARE THE MAIN ADMINISTRATION TOOLS FOR THE OPERATING SYSTEM? 4.1.1 Unix - Administrative GUI tools ______________________________________ AIX The main tool is "smit" for GUI or "smitty" for a character-based interface. If you use telnet to login into a remote host and you issue "smit", if you have not exported your DISPLAY environment variable, then the GUI session cannot be started and thus, "smitty" is invoked instead. You can look at the files ./smit.log and ./smit.script for the details on the commands issued by smit and its associated results. HP-UX The main tool is "sam" for GUI. You can look at the files /var/adm/sw/sw*.log for the details on the installation commands. SOLARIS The main tool is "admintool" for GUI. 4.1.2 Intel - Administrative Tools ___________________________________ 4.1.2.1 OS/2 The vast majority of administrative actions can be found by opening the System Icon. Administrative Tasks 31 4.1.2.2 Windows NT and Windows 95 Generally performed administrative tasks are split between several icons. Here are the most commonly used for TeamConnection administration: o In Windows NT and Windows 95 The system administration facilities in Windows 95 are in the "Start" -> "Control Panel" program selection. o In Windows NT, you can access other utilities by doing Start -> Programs -> Administrative Tools 4.2 WHICH ARE THE MAIN ADMINISTRATION TOOLS FOR TEAMCONNECTION? The main administration tools for TeamConnection are: o The TeamConnection Family Administrator (tcadmin) is described in 4.2.1, "How to use the TeamConnection Family Administrator." o The TeamConnection Activity Monitor (monitor) is described in 4.2.2, "How to use the TeamConnection Activity Monitor." 4.2.1 How to use the TeamConnection Family Administrator _________________________________________________________ The VisualAge TeamConnection Family Administrator tool is a Java- based interface that allows the family administrator to create and delete a TeamConnection family, modify configuration types and configurable fields, modify the authentication level for the family, modify the authority and notification groups, etc. 4.2.2 How to use the TeamConnection Activity Monitor _____________________________________________________ The Activity Monitor is already included in tcadmin (right panel). However, a family administrator who wants to use a remote telnet session to monitor the activity of the family, can follow these steps: To find out what the family daemons are doing, use the TeamConnection Activity Monitor: monitor 1 Where the number 1 is the number of seconds to refresh the output screen which looks like this: 32 How to do routine operating system tasks 2 of 2 teamcd daemons running. Shared mem size is 2988. Press any key to quit. Total hits = 54 01,18148,00027,, 02,18410,00027,, Figure 11. Output of 'monitor 1' The description of the fields is shown below: o The first row indicates how many family daemons are active. The size of shared memory is not too relevant, thus, do not worry about it. o The second row indicates the total number of requests that all the family daemons have processed since the family was started. When the family is stopped, then this number is reset to 0. o The rest of the rows show information about each daemon: - The first column is simply an index number for each daemon. - The second column indicates the process id for each daemon. In case that you need to recycle this daemon (such as when a user is doing a query such as "FileView, 1=1" which is not really a very relevant query and which will degrade the performance for the rest of the daemons), then you can issue the following commands in this order: 1. "kill -1 processId" This is a very gentle signal that tells the daemon to stop the current activity and to reset itself ready for the next request. It is most often used to force the daemon to re-read updated configuration files. 2. "kill -15 processId" Use -15 if the previous -1 did not work. This is a stronger signal that tells the daemon to stop the current activity and to terminate as grace- fully as possible. These daemon will not be able to handle more requests. Administrative Tasks 33 These inactive daemons are identified in monitor by >> instead of an actual index number in the first column. 3. "kill -9 processId" Use -9 if the previous -15 did not work. This is the strongest signal that tells the daemon to terminate now. This should be used only as the last resource, because the daemons do not terminate grace- fully. These daemons will not be able to handle more requests. These inactive daemons are identified in monitor by >> instead of an actual index number in the first column. - The third column indicates the number of hits for that particular daemon. - The rest of the columns will show the current activity. 4.3 IS THERE A SAMPLE PROFILE FOR A TEAMCONNECTION FAMILY? 4.3.1 Unix - Sample profiles _____________________________ The following sample profile can be used as the basis for the profile of a Unix family account that will use VisualAge TeamConnection: 1. Login as the family owner. 2. Make a backup of the current profile. cp .profile .profile.original 3. Copy the sample profile. In AIX do the following (use /opt/teamc for HP-UX and Solaris): cp /usr/teamc/nls/cfg/$LANG/profile.family .profile chmod u+w .profile 4. Read the entire profile and delete the comment character (in the first column) of those lines that are appropriate for the operating system to be used. Also, use the appropriate values for your setup. 34 How to do routine operating system tasks 5. Logout and login again in order to start with a fresh envi- ronment. 4.3.2 Intel - Profile information __________________________________ Because the Intel operating systems are single user systems, the TeamConnection installation script addresses all environmental configuration needs. 4.4 WHERE ARE THE ERROR MESSAGES FROM THE TC DAEMON AND DATABASE? 4.4.1 Unix - syslog ____________________ Errors encountered by TeamConnection are recorded in the system log file (syslog) when the syslog daemon (syslogd) is activated. If syslogd is not active, then the error messages are sent to the console of the TeamConnection server workstation; however, these messages eventually will scroll off the screen. Because multiple families may be supported by a single TeamConnection server, the messages logged in syslog may pertain to multiple families. It is important to activate the syslog daemon so that TeamConnection errors and database errors can be logged for sub- sequent problem resolution. Unfortunately by default (why?), when you install the operating system in a machine, the syslog is not activated. Thus, you may need to do the following to acti- vate it. To activate the syslog daemon do the following: 1. Login as root. 2. Use the touch command to create the syslog file if it does not exist already in the appropriate directory: AIX "touch /var/spool/syslog" HP-UX "touch /var/adm/syslog/syslog.log" SOLARIS "touch /var/adm/messages" 3. When creating the syslog file, set the file permissions according to the directions for the operating system. o AIX: Administrative Tasks 35 chmod 666 /var/spool/syslog chown root:system /var/spool/syslog o HP-UX: chmod 666 /usr/adm/syslog/syslog.log chown root:system /usr/adm/syslog/syslog.log o Solaris: chmod 666 /var/adm/messages chown root:system /var/adm/messages NOTES: a. If you do not want to use "chmod 666", you can use any of the following: chmod a=rw /var/adm/syslog or chmod ugo=rw /var/adm/syslog b. The command "chown root:system" is a short way to do the following: chown root /var/spool/syslog chgrp system /var/spool/syslog 4. Edit the /etc/syslog.conf file and add the following line: NOTE: You must use a tab character to separate the values. AIX "*.warning /var/spool/syslog" HP-UX "*.warning /var/adm/syslog/syslog.log" SOLARIS "*.warning /var/adm/messages" 5. Stop and restart syslogd after modifying syslog.conf and cre- ating the log file. a. AIX: stopsrc -s syslogd startsrc -s syslogd b. HP-UX: There are 2 choices to force the syslog daemon (syslogd) to read again the contents of the file /etc/syslog.conf: o If the file /var/run/syslog.pid exists, then use: kill -HUP `cat /var/run/syslog.pid` o Otherwise do: 36 How to do routine operating system tasks $ ps -ef | grep syslogd ### Find the process ID (pid) of the syslogd process. ### Use the actual pid below: $ kill -HUP pid c. Solaris ps -ef | grep syslog # Find the process id for syslogd kill -9 ******************** => use the process id /usr/sbin/syslogd 6. Verify that the syslog daemon is running: ps -ef | grep syslog You should see an entry for syslogd. 7. Verify that the syslog daemon is able to write into the syslog file. The following test case can help you to deter- mine if the syslog has been configured properly: a. Login with a TeamConnection family id. b. Use 'su root' and give a wrong password. This action will fail and will add a warning message at the bottom of the syslog. c. To quickly view the last 10 lines of the syslog, do: tail ****************** => use the appropriate name d. If the syslog is properly set and running, then a message similar to this one will be added to the syslog: Apr 19 hostname su: BAD SU from user ID to root at /dev/pts/3 or May 1 oem-hp03 syslog: su : - ttyp1 cmhp3ora-root 8. If you want to cleanup the syslog, you can use the following command: cp /dev/null **************** => use the appropriate name Administrative Tasks 37 4.4.2 Maintaining the syslog _____________________________ Monitor the syslog file at regular intervals so that any required maintenance or problem resolution can be performed. Because the syslog is a file that will grow overtime, it is highly recommended to have a set of syslog files which can be rolled periodically in order to avoid having a syslog that is too large and that has very old information that is obsolete. For example, a syslog file can be copied into syslog.1 and this new file can be compressed; later on the file syslog.1 can be renamed syslog.2, and the normal syslog can be copied as syslog.1 and compressed Usually a set of 4 such backup files is suffi- cient, and thus the file syslog.4 can be deleted during the rolling of the files. 4.4.3 Intel - syslog _____________________ The syslog facility is not a native application for OS/2 and Windows, TeamConnection provides an application specific syslog. The syslog file resides in the sample location where the TeamConnection Family Server (teamcd.exe) resides, and it is called "syslog.log". 4.5 HOW TO DETERMINE THE PATCHES APPLIED TO THE SYSTEM? Sometimes it is necessary to determine if there are patches or PTFs or fixpaks applied for an application or the operating system. You can use the commands in this section to find this information. 4.5.1 AIX __________ To find out the installed filesets or fileset updates in AIX 4, you can use the following command: o To list all the filesets: lslpp -l -a | more o To list all the filesets that have a common name, such as for "db2*": 38 How to do routine operating system tasks lslpp -l -a "db2*" | more An example of the output is shown below: Fileset Level State Description ---------------------------------------------------------------------------- Path: /usr/lib/objrepos db2_05_00.adt.rte 5.0.0.0 COMMITTED DB2 Application Development Tools (ADT) db2_05_00.adt.samples 5.0.0.0 COMMITTED DB2 ADT Sample Programs db2_05_00.client 5.0.0.0 COMMITTED DB2 Client Application Enabler 5.0.0.20 COMMITTED DB2 Client Application Enabler Figure 12. Output of 'lslpp' command Notice that the first entry for the db2_05_00.client is the original installation (version 5.0.0.0) and the second entry is the fixpak (version 5.0.0.20). 4.5.2 HP-UX ____________ To find out the installed filesets/products in HP-UX 10 you can use the following commands: o To list the bundles and products Administrative Tasks 39 $ swlist | more # Initializing... # Contacting target "oem-hp10"... # # Target: oem-hp10:/ # # # Bundle(s): # B2617CBEng C.05.25.01 English C++ SoftBench S700 10.x LOTUSGO 4.6.1 Lotus Domino Go Webserver # # Product(s) not contained in a Bundle: # DB2V5CAE 5.0.0 DB2 Client Application Enabler for HP-UX PDB2_04057 5.0.0 DB2 Product Patch PHCO_14175 B.10.00.00.AA mount(1M) cumulative patch Figure 13. Output of 'swlist' o To list all the products: $ swlist -l product | more # Initializing... # Contacting target "oem-hp10"... # # Target: oem-hp10:/ # DB2V5CAE 5.0.0 DB2 Client Application Enabler for HP-UX DB2V5ENTP 5.0.0 DB2 UDB Enterprise Edition for HP-UX PHCO_14175 B.10.00.00.AA mount(1M) cumulative patch Figure 14. Output of 'swlist -l product' o To list all the products that have a certain string in the name: 40 How to do routine operating system tasks $ swlist -l product "DB2*" | more # Initializing... # Contacting target "oem-hp10"... # # Target: oem-hp10:/ # DB2V5CAE 5.0.0 DB2 Client Application Enabler for HP-UX DB2V5CONN 5.0.0 DB2 Connect Enterprise Edition for HP-UX DB2V5ENTP 5.0.0 DB2 UDB Enterprise Edition for HP-UX Figure 15. Output of 'swlist -l product "DB2*" ' o To list the individual filesets: $ swlist -l fileset | more # Initializing... # Contacting target "oem-hp10"... # # Target: oem-hp10:/ # # DB2V5CAE 5.0.0 DB2 Client Application Enabler for HP-UX DB2V5CAE.client 5.0.0 DB2 Client Application Enabler DB2V5CAE.convucs 5.0.0 Code Page Conversion Tables - Uni Code Support DB2V5CAE.jdbc 5.0.0 Java Database Connectivity (JDBC) Support DB2V5CAE.odbc 5.0.0 Open Database Connectivity (ODBC) Support Figure 16. Output of 'swlist -l fileset "DB2*" ' 4.5.3 Solaris ______________ To find out the installed filesets/products in Solaris you can use the following commands: o To list the applications and products: Administrative Tasks 41 $ pkginfo | more application CICSmsg CICS messages system PFUagaow AG-10 DDX Support(OpenWindows) application db2cliv50 DB2 Client Application Enabler application db2engn50 DB2 Engine Figure 17. Output of 'pkginfo' o To list a subset of the products: $ pkginfo | grep -i db2 application db2cliv50 DB2 Client Application Enabler application db2engn50 DB2 Engine Figure 18. Output of 'pkginfo | grep -i db2' o To list the patches: $ showrev -p | more Patch: 101242-12 Obsoletes: Packages: SUNWlibC 5.6,REV=97.03.05,PATCH=12 Patch: 103663-08 Obsoletes: 103683-01, Requires:, Incompatibles:, iss_sparc-01 Packages: SUNWcsu, SUNWcsr, SUNWhea Figure 19. Output of 'showrev -p' 4.5.3.1 Role of /var/sadm/patch in Solaris The following directory has one subdirectory for each patch that has been applied to the system: /var/sadm/patch The naming convention for system patches is "patch_name-version", such as the patch required by DB2: 103600-13. However, at the time of writing this TR, we got a patch version that is more recent: 103600-18. Notice that this latest version 18 includes the explicit version 13 required by DB2. 42 How to do routine operating system tasks Thus in our machine, we have the following subdirectory that con- tains more information about the version 18 of patch 103600: /var/sadm/patch/103600-18 4.5.4 Windows ______________ To determine the version and level of the currently installed DB2 product in Windows, type "regedit" from an MS-DOS command prompt and check the following values under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\\Current Version. The values should be the following: Version "0x00000005" (5) Release "0x00000000" (0) Modification "0x00000000" (0) Service Level "" 4.5.5 OS/2 ___________ To determine the version and level of the currently installed DB2 product in OS/2, do the following: 1. Double-click on the 'Installation Utility' icon in the 'DB2 for OS/2' folder. 2. Select 'View', 'Installed Products'. 3. Select the appropriate DB2 product. 4. Select 'Details', 'Product Status'. The version should be 05.00.00. 5. Select a component. Click on 'Service level'. The level should be 0000000. 4.6 HOW TO CREATE GROUPS AND USERS 4.6.1 Unix ___________ For example, to create a user ID called db2inst1 which will use db2iadm1 as its primary group and use /home/db2inst1 as its home directory: o AIX Use SMIT to create the groups and user IDs, or you can issue the following commands: Administrative Tasks 43 mkgroup db2iadm1 mkuser pgrp=db2iadm1 groups=db2iadm1 home=/home/db2inst1 db2inst1 passwd db2inst1 o HP-UX Use SAM to create the groups and user IDs, or you can issue the following commands: groupadd db2iadm1 useradd -g db2iadm1 -d /home/db2inst1 -m db2inst1 passwd db2inst1 o Solaris Use the AdminTool to create the groups and user IDs, or you can issue the following commands: groupadd db2iadm1 useradd -g db2iadm1 -d /export/home/db2inst1 -m db2inst1 passwd db2inst1 4.6.2 Intel ____________ In OS/2 there are no facilities for users and groups. In Windows NT, you can use Start -> Programs -> Administrative Tools -> User Management, to create users and groups. 4.7 HOW TO CHANGE THE OWNER/GROUP OF A FILE 4.7.1 Unix - chown ___________________ For all platforms you can use the following command: chown user:group file NOTES: 1. Using the command 'ls -l' will show both the owner and the group. 2. The command "chown user:group" is a short way to do the fol- lowing: chown user file chgrp group file 44 How to do routine operating system tasks 4.7.2 Intel - file ownership _____________________________ Intel operating systems do not have the concept of ownership for ordinary files. Windows 95 and NT do maintain separate config- uration files for each user login, but this is not a general purpose feature. 4.8 HOW TO EXPORT DIRECTORIES TO BE MOUNTED BY OTHER HOSTS? This section assumes that you are using TCP/IP and the NFS daemon to export your filesystems. For Intel platforms and AIX there is support for IBM OS/2 Warp Server and other traditional Intel "net use" facilities. 4.8.1 Unix - exporting directories ___________________________________ 4.8.1.1 Finding out what directories are exported A quick way to find out what directories are exported from the local host, enter: exportfs -v An example of the output is: /home/buildtc -rw /disk2 -root=oem-ibm,access=oem-ibm In the above output, the file system /home/buildtc can be read and write by everybody (-rw), and the file system /disk2 can be accessed only from the oem-ibm host which also has root privi- lege. Administrative Tasks 45 4.8.1.2 AIX - /etc/exports You can use the smit tool to specify the directories to be exported; this information is stored in /etc/exports: 1. Login as root. 2. Enter "smit" (GUI) or "smitty" (ASCII) 3. Select "Communications Applications and Services" 4. Select "NFS" 5. Select "Network File System" 6. Select "Add a Directory to exports lists" AIX also allows client access to IBM OS/2 Warp Server drivers through "net use", starting with AIX 4.1.4. 4.8.1.3 HP-UX You can use the sam tool to specify the directories to be exported; this information is stored in /etc/exports: 1. Login as root. 2. At the command prompt, enter "sam". 3. Double click on the Networking and Communications icon. 4. Double click on the Networked File Systems icon. 5. Double click on the Exported Local Filesystems icon. 6. From the menu bar, select Actions. Then select Add Exported File System. 7. In the Local Directory Name field, enter the absolute path name of the directory to export. Also select other options on the same screen as appropriate for your system. 8. Then click on the OK box. This will export your directory to the specified machines immediately. 4.8.1.4 Solaris The Solaris admintool does not provide a convenient method of updating /etc/dfs, so we have provided the manual process below: 1. Login as root. 2. Change directory to /etc/dfs. 3. Edit the file dfstab which is a file containing commands for sharing resources across a network. Append a share command to the end of this file. Use the man command to find out more information about the share command. Add a share command in the dfstab file. For example: share -F nfs -o rw=host -d "teamc client" /export/home/dir 4. Save and exit the file. 46 How to do routine operating system tasks 5. For the export to take effect immediately, execute the same share command on the command line. 4.8.2 Intel - Exporting directories or drives ______________________________________________ 4.8.2.1 OS/2 IBM TCP/IP provides an NFS daemon, which is compatible with the latest TCP/IP versions, but for a strange marketing reason it is not delivered anymore with TCP/IP. Since NFS is a separate product from the operating system we will only cover this facility briefly. 1. Add export directories by updating the "exports" file in the directory pointed to by the ETC environment variable. 2. Restart TCP/IP with the "tcpstart" command. 3. Verify the new export with the "showexp SYSTEM_NAME" command. NOTE: We have found the "showexp" command to be unique to OS/2. It is very useful for checking NFS exports in a heterogeneous environment. The latest NFS 2.0 CSC is UN57064, and can be downloaded via anonymous ftp from: ftp.software.ibm.com cd /ps/products/tcpip/fixes/v2.0os2/un57064 However, there are extra fixes that have not been formally pack- aged as a CSD that can be downloaded from the same ftp site, under a different directory: cc /ps/products/tcpip/fixes/nfslatest You should first apply the CSD then the fixes from the nfslatest directory. 4.8.2.2 Windows NT and Windows 95 The operating system does NOT support an NFS daemon, which is the process that manages an NFS exported directory, in the operating system. The NFS server for this platform is provided by third-party vendors. Follow the instructions provided by the vendor. Administrative Tasks 47 4.9 HOW TO MOUNT DIRECTORIES EXPORTED BY A REMOTE HOST? 4.9.1 Unix - mount command ___________________________ The best way to mount directories that are exported by a remote host is to use the system administration tool. If you have mounted directories as part of your normal system configuration, you can use the system administration tool and have the operating system mount the directories during bootup and initialization. Note that if your network is experiencing problems, your system may hang or take a long time to complete the bootup process. 4.9.1.1 Mounting directories using manual commands 1. Login as root. 2. Create an empty directory which will be the mount point. That is, after the remote file system is mounted to the local mount point, this local mount point will represent the top directory for the mounted system. 3. Enter the following command: mount carcps21:/home/build /home/build | | | host remote directory local directory to be mounted 4. To look at the mounted file systems, you can use either of the following commands: o mount o df -k Note: In HP-UX, it is better to use "bdf" instead of "df". 48 How to do routine operating system tasks 4.9.1.2 AIX mount AIX supports administering mounts through smit: 1. Login as root. 2. smit 3. System Storage Management (Physical & Logical Storage) 4. File Systems 5. Mount a File System 6. Specify the details. AIX also supports "net use" for drives exported by OS/2 Warp Server. 4.9.1.3 HP-UX mount HP-UX supports administering mounts through sam: 1. Login as root. 2. sam 3. Disks and File Systems 4. File Systems 5. Select "Actions", then "Add Remote File System". 6. Specify the details. 4.9.1.4 Solaris mount The admintool does not support the administration of mounts. Thus, you need to perform this administration by using the mount command. 4.9.2 Intel - mount command ____________________________ 4.9.2.1 OS/2: OS/2 mount syntax: mount carwin10:c:\home\build x: | | | | host remote remote directory local drive drive if to be mounted an Intel Server Administrative Tasks 49 4.9.2.2 Windows NT and Windows 95 The operating system does NOT support an NFS client (the process that mounts an exported file system from a remote host) in the operating system. The NFS client for this platform is provided by third-party vendors. Follow the instructions provided by the vendor. 4.10 USING CD-ROMS CD-ROM is the only medium IBM provides for installing the com- plete VisualAge TeamConnection package. The use the TeamConnection CD-ROM is well documented in the VisualAge TeamConnection Installation Guide. 4.10.1 AIX - CD-ROMs _____________________ Before you can use a CD-ROM in AIX, you have to mount the CD-ROM. Once the CD-ROM is mounted, then you can access it. 4.10.1.1 Mounting a CD-ROM in AIX 1. Insert the CD-ROM into the CD-ROM drive. 2. Log in as user root or do "su - root" to login as root and use the profile. 3. Create a directory for the CD-ROM /cdrom by entering "mkdir /cdrom". 4. Enter "smit" to add a CD-ROM file system. 5. Select "System Storage Management (Physical & Logical Storage)" 6. Select "File Systems" 7. Select "Add / Change / Show / Delete File Systems." 8. Select "CDROM File Systems" 9. Select "Add a CDROM File System" 10. Select a "Device name", such as "cd0". 50 How to do routine operating system tasks The CD-ROM file system device names must be unique. You may need to delete a previously defined CD-ROM file system if there is a conflict. 11. Type "/cdrom" for "Mount Point". 12. Select "OK" (or press enter if using the smit ASCII inter- face). 13. Return to the previous smit level, "System Storage Management (Physical & Logical Storage)" 14. Select "File Systems". 15. Select "Mount a File System". 16. Select "/dev/cd0" for "File System name". 17. Select "/cdrom" for "Directory over which to mount". 18. Select "cdrfs" for "Type of file system". 19. Select "yes" for "Mount as a READ-ONLY system.". 20. Select "OK" (or press enter if using the smit ASCII inter- face). 21. Exit smit. Now you are ready to use the CD-ROM. 4.10.1.2 Using a CD-ROM in AIX After the CD-ROM is mounted, then you can use the CD-ROM. You can change the directory to /cdrom and work with the files con- tained in it. After you have finished with the CD-ROM, you need to do the fol- lowing in order to be able to remove the CD-ROM: 1. Log in with root authority. 2. Change to a directory that is not in /cdrom, to avoid a message saying that the device is busy. 3. Unmount the CD-ROM: umount /cdrom 4. Press the eject button from the CD-ROM drive. Administrative Tasks 51 4.10.2 HP-UX - Using CD-ROMs _____________________________ Before you can use a CD-ROM in HP-UX, you have to mount the CD-ROM. Once the CD-ROM is mounted, then you can access it. 4.10.2.1 HP-UX - Mounting a CD-ROM Do the following to add and mount a CD-ROM file system: 1. Insert the installation CD into the CD-ROM drive. 2. Log in as user ROOT or type su - root. 3. Issue the mount command to determine if the CD-ROM file system is mounted and operational. Verify that /CDROM is listed; if, not, then do the following: a. To create a directory for the CD-ROM, type mkdir /CDROM. b. Type: sam & c. Select Disks and File Systems. d. Select Disk Devices. e. Select the entry for a CD-ROM. f. From the menu bar select "Actions" and choose the option "View More Iinformation...". Disregard any warnings that say that the system cannot get information from an unused device. g. Click on Show Device Files... h. Write down the value for a "Block device file", such as /dev/dsk/c1t2d0 Do not select raw devices such as /dev/rdsk/c1t2d0. i. Close the Device Files window. j. Close the View More Information window. k. Exit from the Disks and File Systems window. l. Exit sam. m. To mount the CD-ROM device file identified above, type: mount /dev/dsk/c0t2d0 /CDROM n. Issue the mount command again and verify that /CDROM is listed. 52 How to do routine operating system tasks 4.10.2.2 Using a CD-ROM in HP-UX After the CD-ROM is mounted, then you can use the CD-ROM. You can change the directory to /cdrom and work with the files con- tained in it. After you have finished with the CD-ROM, you need to do the fol- lowing in order to be able to remove the CD-ROM: 1. Log in with root authority. 2. Change to a directory that is not in /cdrom, to avoid a message saying that the device is busy. 3. Unmount the CD-ROM: umount /cdrom 4. Press the eject button from the CD-ROM drive. 4.10.3 Solaris - Using CD-ROMs _______________________________ There is no need to mount the CD-ROM if the Volume Management is running. Once you insert the CD-ROM into the drive, the oper- ating system mounts it for you. If Volume Management is not running, do the following to mount the CD-ROM: 1. Login as root. 2. Start the Volume Management daemon by executing the following command: /etc/init.d/volmgt start 3. Execute "ps -ef | grep vold". You should see the process "/usr/sbin/vold" started. 4.10.3.1 Using a CD-ROM in Solaris After the CD-ROM is mounted (automatically or manually), then you can use the CD-ROM. You can change the directory to /cdrom and work with the files contained in it. After you have finished with the CD-ROM, you need to do the fol- lowing in order to be able to remove the CD-ROM: 1. Log in with root authority. 2. Change to a directory that is not in /cdrom, to avoid a message saying that the device is busy. Administrative Tasks 53 3. Unmount the CD-ROM if the Volume Manager is not running and you had to manually mount the CD-ROM umount /cdrom 4. Eject the CD-ROM by typing the following command: eject cdrom 4.10.3.2 Detecting if media has been inserted In Solaris, the command VOLCHECK can be used to check if a CD-ROM has been inserted in the driver, such as follows: $ volcheck -v /cdrom /cdrom has no media 4.10.4 Intel - CD-ROMs _______________________ In Intel operating systems, the CD-ROM drive is recognized by the operating system during boot and is treated as a read-only drive. 4.11 HOW TO SHUTDOWN AND REBOOT THE MACHINES? 4.11.1 Unix - shutdown _______________________ 4.11.1.1 Miscellaneous notes before shutdown In order to efficiently shutdown a system, it is recommended that you follow these suggestions before you actually shutdown the system: 1. It is recommended to shutdown your system from a local session that does not use a windowing system (otherwise, the shutdown time will be longer because the windowing system has to be shutdown too). 2. If possible, unmount all the mounted NFS file systems. 54 How to do routine operating system tasks 4.11.1.2 Miscellaneous notes after reboot After the system has been rebooted, it is suggested that you should manually remount the necessary NFS file systems and if desired, start specific processes that may not be started auto- matically after reboot, such as the database server. Sometimes it is not convenient to automatically mount NFS file systems. For example, Host A and Host B are being rebooted at the same time. If Host B NFS mounts directories from Host A, Host B will hang during bootup until Host A is completely ini- tialized and has its nfsd and mountd daemons running. Then Host B can NFS mount directories from Host A and complete its bootup. It is also convenient to startup processes only when they are needed, such as databases. This is advantageous when you know that the system is heavily used and when there is no need for some databases to be running all the time. In order to facilitate these tasks, you can, as root, create a shell script that will mount the necessary NFS file systems and start the desired processes. In our site we have the convention that this shell script is located in the root directory, it has file permissions for execute, it is named after the hostname and it has a suffix of ".mounts"; for example, in the host "oem-hp01", the shell script is called "/oem-ppc3.mounts" and its contents is: #!/usr/bin/ksh # Enter here the mounts that need to be done manually: mount tcaix05:/home/build /home/build mount tcaix05:/tcinstall /tcinstall # end of file Figure 20. Example shell script to mount file systems 4.11.1.3 AIX - shutdown 1. Login as root. 2. Enter the following command to shutdown and reboot (quick restart): Administrative Tasks 55 shutdown -Fr 4.11.1.4 HP-UX - shutdown 1. Login as root. 2. Enter the following command to shutdown and reboot: shutdown -r 4.11.1.5 Solaris - shutdown 1. Login as root. 2. Enter the following command to shutdown and reboot: shutdown -i6 -y -g0 4.11.2 Intel - How to shutdown and reboot __________________________________________ 4.11.2.1 OS/2 - setboot The OS/2 "setboot /b" command will cause OS/2 to shutdown and reboot. You can also manually specify Shut Down from the desktop menu (point to the desktop and click right button). 4.11.2.2 Windows NT o You can manually select "Start" then "Shut Down" and then specify the desired level for shutdown and reboot. o You can use the utility "reboot" from the Windows NT Resource Kit. 4.11.2.3 Windows 95 You can manually select "Start" then "Shut Down" and then specify the desired level for shutdown and reboot. 56 How to do routine operating system tasks 4.12 HOW TO STARTUP AN APPLICATION UPON BOOT AND REBOOT 4.12.1 Unix Systems ____________________ The easiest method to automatically startup an application upon booting the Unix system is to create an rc.xxxx file in /etc and add a corresponding entry in /etc/inittab. If you have installed DB2 UDB V5 and created DB2 instances which are started upon boot, then take a look at the following file: /etc/rc.db2 Below is a sample of an /etc/rc.teamcd for TeamConnection (this is as-is code): Administrative Tasks 57 #!/usr/bin/ksh ####################################################################### # NAME: rc.teamcd # FUNCTION: rc.teamcd - auto start TeamConnection on boot # CUSTOMIZATION NOTES: # # This script is designed to be executed on reboot. Do the following # to enable auto-starting of TeamConnection daemons. # # 1) You must modify this file to reflect the values used in your # system. A strong recommendation for administering TeamConnection # families is to use the same name for both the userId and family: # 1.a) replace familyUserId with the appropriate value. # 1.b) replace familyName with the appropriate value. # 1.c) replace 2 with appropriate value of family daemons # Note: To avoid your system from failing on reboot, it is recommended # that you should very careful when changing the file. # # 2) After you have edited the file, you need to do the following: # 2.a) copy this file as /etc/rc.teamcd # 2.b) mark the file as executable: chmod u+x /etc/rc.teamcd # 2.c) add the following line to /etc/inittab (of course without # the comment characters in the first column): # teamcd:2:once:/etc/rc.teamcd > /dev/console 2>&1 # Start TC ####################################################################### # Wait for DB2 processes to start while (( $(ps -ef | grep db2 | wc -l) == 1 )) do sleep 60 done # One extra sleep for all DB2 processes to start sleep 10 # Define for each family. You MUST replace the values for # familyUserId and familyName. Also, you may specify a different number # of family server daemons other than 2: su - familyUserId -c 'teamcd familyName 2;exit' exit 0 Figure 21. /etc/rc.teamcd - Sample of auto start TeamConnection on boot The comments in this file also indicate that the following line needs to be appended to the end of /etc/inittab: teamc:2:once:/etc/rc.teamcd > /dev/console 2>&1 # Start TC Additionally, for HP-UX and Solaris, there are recommended startup and configuration models that can be implemented to start 58 How to do routine operating system tasks applications during system boot. Some references are provided below: o HP-UX 10.x HP-UX 10.X Startup and Configuration White paper Document ID : SRL96080307 o Solaris Solaris System Administrator's Guide, Second Edition by Janice Winsor 4.13 ADDITIONAL PROCESSING IN SOLARIS Below is an example procedure for autostarting TeamConnection using the Solaris recommended method for starting applications. 1. Create file /etc/rc2.d/S99teamcd. If you are using a method similar to the one described above (using rc.teamcd), then rename /etc/rc.teamcd to /etc/rc2.d/S99teamcd. 2. Remove the teamc entry from /etc/inittab 4.13.1 OS/2 ____________ Place a shadow of the desired application in the StartUp folder in the OS/2 System folder. 4.13.2 Windows _______________ Place a shortcut of the desired application in the Start folder: 1. Select the taskbar and click on the right mouse button to select the Properties. 2. In the Taskbar Properties dialog, select the tab Start Menu Programs. 3. Select Advanced. You will see the window Exploring - Start Menu. 4. Expand Programs and select the folder StartUp. 5. In StartUp add the shortcuts of the desired applications. If the application is a "service" then use the Services dialog: Start -> Settings -> Control Panel -> Services Administrative Tasks 59 4.14 HOW TO FIND OUT THE AVAILABLE SPACE IN A FILE SYSTEM 4.14.1 Unix - Space in a file system _____________________________________ To show, in kilobytes, the space left in the file system, use: AIX df -k Without "-k" the default is 512 byte blocks. HP-UX bdf Notice that in HP-UX the command "df -k" provides an output that is not easier to interpret. We recommend to use "bdf" which provides an output that is similar to "df -k" from AIX and Solaris. SOLARIS df -k Without "-k" the default is 512 byte blocks. An example of the output is: $ df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 16384 8728 47% 1341 17% / /dev/hd2 1503232 475716 69% 40565 11% /usr /dev/hd9var 16384 13584 18% 193 5% /var /dev/hd3 81920 52000 37% 246 2% /tmp /dev/hd1 241664 175640 28% 710 2% /home /dev/disk2 1503232 244028 84% 12672 4% /disk2 Figure 22. Output of 'df -k' in AIX and Solaris (bdf in HP-UX) Notice that if the -k flag is not used, then the values for the 2nd and 3rd columns will be in 512-byte blocks, which are not that intuitive to read. To display the statistics for one mounted file system, enter: $ df -k /home/buildtc The output should look like this: 60 How to do routine operating system tasks Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/extra3lv 1527808 472684 70% 1752 1% /home/buildtc 4.14.2 Intel - Space on each drive ___________________________________ To show the space available on any logical disk drive, use: dir /w [DRIVE-LETTER] or chkdsk [DRIVE-LETTER] 4.14.2.1 Windows In Windows you can open My Computer, then select the desired drive, click with the right mouse button, then select Properties from the context sensitive menu, and one of the items is "Free space". 4.15 HOW TO EXPAND THE SIZE OF A FILE SYSTEM Keep in mind the following suggestions when you increase/expand the size of a file system: o For all practical purposes, you cannot shrink/reduce the size of a file system. Therefore, try to be conservative on how much you increase a file system. o Try to keep unallocated space in the volume group in order to be used as reserve for other file systems. That is, if you do not have a compelling reason, try to not allocate all the remaining space to one file system (keep something in reserve). o Increase the size in several iterations, using smaller chunks (50 of 100 MB) at a time, instead of a very large increase (1 GB) at once. For example, use 2 windows: one with smit to add 100 MB, and in the other issue the "df -k" to verify that the increase was properly done. Administrative Tasks 61 4.15.1 AIX ___________ To expand the size of a file system in AIX, it is necessary to perform the following activities: 1. Login as root. 2. Display the current statistics of the mounted file systems to find out the baseline values before attempting to increase the file system. For details see 4.14, "How to find out the available space in a file system" on page 60. 3. Identify the logical volume and the volume group for a given file system. For details see 4.15.1.1, "How to identify Logical Volume and Volume Group for a File System." 4. Find out if there is unallocated space in the volume group that can be allocated to expand a file system. For details see 4.15.1.2, "How to find out the space left in a volume group" on page 63. 5. If there is disk space in the volume group, then reallocate space to the file system. For details see 4.15.1.3, "Adding more disk space to a file system" on page 63. 6. Display the new statistics of the mounted file systems in order to compare them with the baseline values. For details see 4.14, "How to find out the available space in a file system" on page 60. 4.15.1.1 How to identify Logical Volume and Volume Group for a File System Perform the following activities as user ID root: smit System Storage Management (Physical & Logical Storage) Logical Volume Manager Logical Volumes List All Logical Volumes by Volume Group The output will look like this: extra3vg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT extra3lv jfs 250 250 1 open/syncd /home/buildtc In this case the file system /home/buildtc (identified by the column MOUNT POINT) belongs to the logical volume extra3lv (iden- tified by the column LV NAME), which in turns belongs to the volume group extra3vg (above the LV NAME column). It is a good convention to use the suffix "lv" for logical volume and "vg" for volume group. In this case, there is a 3rd disk, named extra3, which has the volume group extra3vg and which in turn has the logical volume extra3lv. 62 How to do routine operating system tasks 4.15.1.2 How to find out the space left in a volume group Perform the following activities as user ID root: smit System Storage Management (Physical & Logical Storage) Logical Volume Manager Volume Groups List Contents of a Volume Group Select the VOLUME GROUP name by using F4 Specify in the List OPTION: status From the output, the key values are located in the right column: PP SIZE: 4 megabytes TOTAL PPs: xxx (yyy in megabytes) FREE PPs: xxx (yyy in megabytes) Where PP is a Physical Partition. 4.15.1.3 Adding more disk space to a file system Perform the following activities as user ID root: smit System Storage Management (Physical & Logical Storage) File Systems Add / Change / Show / Delete File Systems Journaled File Systems Change / Show Characteristics of a Journaled File System Select the desired file system Then specify the SIZE of file system (in 512-byte blocks). For example, add the following to the existing value: o To add approximately 50 MB, you should add 100000 blocks (one hundred thousand). o To add approximately 100 MB, you should add 200000 blocks (two hundred thousand). Hint: you may position the cursor in the 6th position from the right, and just add the value 2 to the existing digit. Administrative Tasks 63 4.15.2 HP-UX _____________ There are two methods to expand the size of a file system in HP-UX according to the type of file system: o User defined logical volume, which are defined by the user. See 4.15.2.1, "Expanding a user defined logical volume" on page 64. o System related logical volume, which are used by the oper- ating system such as /opt. See 4.15.2.2, "Expanding a user defined logical volume." 4.15.2.1 Expanding a user defined logical volume To expand the size of a user defined file system in HP-UX, perform the following steps: 1. Login as root. 2. Use the export command to export your DISPLAY environment. 3. Invoke the System Administration Management tool by typing: sam & 4. Select the Disks and File Systems Icon. 5. Select the Logical Volumes Icon and find the logical volume that needs to be increased. 6. Then select Increase Size from the Actions pull down menu. 7. The space available in the volume group will be displayed. Enter the new TOTAL size of the logical volume. For example, if the logical volume is currently at 100 MB and you want to grow the logical volume by an additional 100 MB, then the New Size to enter will be 200. 8. Select the OK button. If there is no available space in the volume group, you will have to install another physical drive to the machine and use SAM to add it to the volume group. 4.15.2.2 Expanding a user defined logical volume While the procedure mentioned in 4.15.2.1, "Expanding a user defined logical volume" is successful on user defined logical volumes, it will not work on system related logical volumes such as /opt. This is because HP-UX cannot increase a logical volume it is using. In order to increase space on a system logical volume, follow the steps below: 1. Login as root with no windows. 64 How to do routine operating system tasks 2. Shutdown the operating system to single user mode by entering the command at the prompt: /etc/shutdown 0 3. Unmount the filesystem you want to increase. For example, to unmount /opt, enter: umount /opt 4. Use the LVEXTEND command to grow the logical volume size. As an example, to increase the size of logical volume /dev/vg00/lvol5 that is mounted to mount point /opt from 100 MB to 200 MB, enter: lvextend -L 200 /dev/vg00/lvol5 5. Use the EXTENDFS command on the raw device file. To extend the filesystem in our example, enter: extendfs /dev/vg00/rlvol5 6. Reboot the system: /etc/shutdown -r 0 4.15.3 Solaris _______________ The Solstice DiskSuite utilities can be used to expand a mounted or unmounted UFS file system. Only UFS file systems can be expanded using these utilities. At the print time of this tech- nical report, the Solstice DiskSuite utilties were not part of the operating system and can be installed from a separate product cdrom named Solstice DiskSuite Tool. Please refer to the Solstice DiskSuite Administration Guide and the Solstice DiskSuite User's Guide for detailed procedures on expanding file systems. 4.15.4 Intel _____________ To modify the size of a disk partition in OS/2 and Windows, you can use specialized utilities such as Partition Magic. Administrative Tasks 65 4.16 UNIX: HOW TO IDENTIFY AND KILL SEMAPHORES AND FREE SHARED MEMORY? To cleanup the semaphores and shared memory used by one TeamConnection family, you can do one of the following: o Use the TeamConnection utility /usr/teamc/bin/stopteamc which also stops the TeamConnection daemons. o Perform the following manual procedure: 1. Login as root. 2. Enter the following command to show the semaphores: ipcs -s 3. Enter the following command to kill a semaphore: ipcrm -s xxx Where xxx is the semaphore id identified in the previous step. 4. Enter the following command to show the shared memory: ipcs -m 5. Enter the following command to kill the shared memory: ipcrm -m xxx Where xxx is the shared memory id identified in the pre- vious step. 4.17 HOW TO SETUP A PRINTER 4.17.1 AIX ___________ You can use the "smit" or "smitty" tool to set up local or remote printer access. The steps below show how to set up remote printer access. Please refer to system documentation for local set up. 1. Type 'smitty' at a command line prompt. 2. At the System Management screen select 'Print Spooling'. 3. At the Print Spooling screen select 'Add a Print Queue'. 66 How to do routine operating system tasks 4. At the Add a Print Queue screen select 'remote'. 5. At the Type of Remote Printing screen select 'Standard Proc- essing'. 6. At this final screen, you will be asked to enter the fol- lowing information: o Name of QUEUE to a add o HOSTNAME of remote server o Name of QUEUE on remote server o TYPE of print spooler 7. Press enter and the new print queue will be added. 8. Exit smitty and verify the setup by attempting to print a small ASCII text file using the lp command. Please also refer to your system documentation for further infor- mation on printer setup. 4.17.1.1 How to start/stop the print server Use "Print Spooling" in smitty, then "Manage Print Server", then select the appropriate option. 4.17.1.2 How to print a file to the local queue for a remote printer After you have defined the local queue for the remote printer, then you could print a file by doing: lpr -P cordoba file.name 4.17.1.3 How to use smit to give remote access to the local printer This section is only relevant to those people who have a laser printer locally attached to their AIX host. Then you can do the following process to give access to other people who will remotely use your local printer. 1. Logon as root to the workstation that has attached the local printer. 2. Issue: Administrative Tasks 67 smit 3. Select: Print Spooling Manage Print Server Add Print Access for a Remote Client 4. Perform the desired task: List All Remote Clients with Print Access Add Print Access for a Remote Client Remove Print Access for a Remote Client 5. Exit. 4.17.2 HP-UX _____________ You can set up local or remote printer access using "sam". 1. At the command line prompt, enter 'sam'. 2. Select the 'Printers and Plotter' icon. 3. Select the 'Printers and Plotter' icon again. 4. From the 'Actions' pull down, select local, remote or network based printer access. 5. Complete and/or answer the screens that appear. Please also refer to your system documentation for further infor- mation on local, remote or network printer setup. 4.17.3 Solaris _______________ There are 2 options: o You can set up local or remote printer access using the "admintool" in Solaris. 1. At the command line prompt, enter 'admintool'. 2. Select 'Browse', then 'printer' from the pull down menu. 3. On the 'Admintool: Printers' pull down menu, select 'Edit', then 'add' and then one of the following: - 'Access to Printer' for remote printer set up, or 68 How to do routine operating system tasks - 'Local Printer' for local printer setup. 4. Complete the information on the screen and select 'OK'. Please also refer to your system documentation for further information. o You can use the line commands below to setup a printer. 1. Ensure that the client is allowed to print on the host. 2. Do the following: lpsystem -t bsd server_name lpadmin -p new_name -s hostname!printer_name lpadmin -p new_name -T unkonwn # unless PS (PostScript) lpadmin -p new_name -I simple # unless above is PS 3. Change directory to /etc/lp/fd 4. Do the following: sh for f in download dpost postio postior postprint postreverse do lpfilter -f $f -F $f.fd done 5. Do the following: accept new_name enable new_name 4.17.4 OS/2 ____________ The overall process to setup a printer in OS/2 is: 1. Setup the lprmon process for port lpt3 if you are using a remote printer that is available via TCP/IP. 2. Setup an icon for the printer. 4.17.4.1 Requisites You need to install TCP/IP for OS/2; if you use DOS or WIN-OS2, then install also the DOS Access Box diskette from TCP/IP. You need to have at hand the 3 diskettes with the Printer Drivers for OS/2. Administrative Tasks 69 4.17.4.2 Setup LPRMON (line printer monitor) LPRMON will allow you to monitor the status of a printer. 1. Open the Templates folder. 2. Drag a Program template into the desktop, select the "Program" tab and provide the following information: o Name of the program: \BIN\LPRMON.EXE o Parameters: -p lp -s cordoba.raleigh.ibm.com lpt3 Change "lpt3" to "lpt1" or "lpt2", if you have a locally attached printer you are fond of. Change "cordoba.raleigh.ibm.com" if you want to access another host name that has attached a laser printer. 3. Change the name from Program to LPRMON, by selecting the "General" tab and then changing the name, to something such as "lprmon lpt3" 4. Ask the owner of the remote laser printer to get access to the printer. 4.17.4.3 Setup a printer icon for the OS/2 desktop 1. Access the printer drivers: o Obtain the diskette 2 of the Printer Drivers for OS/2. 2. Open the Templates folder. 3. Create a printer by dragging a printer icon from the tem- plates folder into the desktop. Specify the following infor- mation: a. Give it a name, such as 'Laser Printer'. b. From the "Default printer driver" list, select IBM 4201 (and not the 4029 laser printer). c. From the "Output Port" list, select the port, which must be the same used for LPRMON; in this document the port is "lpt3". d. You may need to install the printer driver. 70 How to do routine operating system tasks 1) Click on the button "Install a new printer driver". 2) Select IBM 4201 normal printer. Click on Install. 3) Select IBM 4029 Laser Printer 10. Click on Install. 4) Insert the appropriate diskette of the Printer Drivers (diskette 1 if using OS/2 Warp 3). e. Click on Create. f. If it asks if you want to create a windows printer, say Yes. Follow the instructions. You will need diskette 1 of the Printer Drivers. 4. To make the new printer icon to be the default, click mouse button 2 on the printer icon and select "set default" and select "Laser Printer". 4.17.4.4 Create a REXX file to print the file (LASER.CMD) You can create the following REXX file (LASER.CMD) which can be used from a OS/2 window: /* Printing a file to a remote laser printer */ PARSE ARG input_file 'lpr -p lp -s cordoba.raleigh.ibm.com' input_file exit You should place this file in a directory that is listed in your PATH. NOTE: In OS/2 Warp 4 the syntax of LPR was changed. The file name is the last argument. In OS/2 Warp 3, the file name seems to be just after LPR and before the flags. 4.17.4.5 Testing the setup from the OS/2 desktop In order to successfully test the setup, you need to be sure that TCP/IP is up and running. 1. Open the LPRMON icon, in that way you could see the status of the printing process. 2. Open a folder where you have a text file. Administrative Tasks 71 3. Drag the icon of the text file and drop it on the 'Happy Printer' icon. 4. Select Printer Specific. 5. Observe the LPRMON, and you should see how the job is placed in the queue (spooling), and then how it is printed and then how the queue becomes empty again. 6. Pick up the output from the printer. 4.17.5 Windows _______________ To install a printer that is connected via a NETBIOS LAN, do the following: 1. Exit all applications. 2. Get the diskette or CD-ROM that has the printer drivers or if your company has these printer drivers in the LAN, then you can use "net use" to setup this LAN drive. 3. Select Start -> Settings -> Printers 4. Select the Add Printer icon. You see the Add Printer Wizard Make sure the option Network Printer is selected 5. Select Next and then type the Network Path for the printer in the Printer command line. 6. Select Next and select Have disk. You see the Install from Disk dialog box. Insert the diskette, CD-ROM or LAN drive. 7. Select OK and select the appropriate Printer in the list of printers. 8. Select OK and then select Finish. The files are copied into your machine. 9. If prompted, select Yes or No to indicate whether you want to print a test page. 10. If you printed a test page, you are asked if the page printed correctly. Select Yes or No. 11. You should see the Printers folder with the new printers added. 12. Select the printer you just installed. 13. Select File -> Properties. You see the printer driver's note- book. 14. Display each tab, making the appropriate changes as you go. 15. Select OK to close the notebook. 72 How to do routine operating system tasks 4.18 USING FSCK TO CHECK FOR THE FILE SYSTEM CONSISTENCY In some cases in which there are problems in creating files in a file system, there is a possibility that something is not right with the file system, even though there are no explicit messages about it. You can use the command "fsck" (file system check) to check for the file system consistency and interactively repair the file system if needed. 4.19 HOW TO CHECK THE SWAP SPACE You can use the following commands to find out the swap space in your machine: AIX lsps -a HP-UX swapinfo SOLARIS swap -s WINDOWS NT Select Task Manager from Start menu, then select the Performance tab. OS/2 WARP See the CONFIG.SYS in the statement SWAPPATH. NOTE: A general recommendation is to have in swap space 2 times the amount of real memory. 4.20 MISCELLANEOUS TOPICS, BY PLATFORM 4.20.1 AIX ___________ 4.20.1.1 How to defragment a filesystem in AIX Through AIX smit or smitty, you can defragment a filesystem. Some steps to point out: 1. Backup the filesystem. 2. fuser -k -v LOGICAL DEVICE (e.g. /usr) 3. umount LOGICAL DEVICE 4. fsck the filesystem to fix errors. 5. mount LOGICAL DEVICE Administrative Tasks 73 6. Use SMITTY DEJFS or DEFRAGFS FILESYSTEM. 7. You can also invoke smitty and go through the following steps: smitty System Storage Management ( Physical and Logical Storage ) File Systems Add / Change / Show / Delete File Systems Journaled File Systems Defragment a Journaled File System 8. Select the file system you wish to defragment. 9. Do not interrupt the process. 10. Exit smitty when completed. 4.20.2 HP-UX _____________ 4.20.2.1 Transitional links for HP-UX 10 to look like an HP-UX 9 system In HP-UX 10, many commands were moved from their previous location in HP-UX 9, such as mount: in HP-UX 9 was in /etc/mount, now in HP-UX 10 is in /usr/sbin/mount. By default, HP-UX 10 installs with a compatibility package that contains the "transi- tional" links that allow the shell scripts and programs that used the HP-UX 9 locations to work fine under HP-UX 10. The following commands allow you to set and unset these transi- tional links. You have to login as root in order to execute the install and removal commands. o To install the transitional links: /opt/upgrade/bin/tlinstall o To list the transitional links: /opt/upgrade/bin/tllist o To remove the transitional links: /opt/upgrade/bin/tlremove NOTE: We strongly recommend NOT to remove the transitional links, because many important utilities from HP-UX, such as the rebuilding of the kernel use them. That is, if you do not have these transitional links, then you cannot rebuild the kernel! 74 How to do routine operating system tasks Furthermore, other applications, such as Informix, require them in order to install the product. 4.20.3 Solaris _______________ 4.20.3.1 How to fix problems with system files such as /etc/vfstab If this file is corrupted, such as wrong parameters were used, then the system could hang when trying to mount or to perform fsck. To solve this problem, boot from the Solaris Operating System install disk. When the GUI is shown, mount the /etc file system; you must use the device name, such as: mount /dev/dsk/c0t1d0s0 /mnt Then you can correct the invalid entry. Administrative Tasks 75 76 How to do routine operating system tasks APPENDIX A. COPYRIGHTS, TRADEMARKS AND SERVICE MARKS The following terms used in this technical report, are trademarks or service marks of the indicated companies: +---------------------+-------------------------------------------+ | TRADEMARK, | COMPANY | | REGISTERED | | | TRADEMARK OR | | | SERVICE MARK | | +---------------------+-------------------------------------------+ | HP, HP-UX | Hewlett-Packard Company | +---------------------+-------------------------------------------+ | IBM, AIX, | IBM Corporation | | OS/2, OS/2 Warp, | | | CMVC, TeamConnection| | | VisualAge | | | DB2, | | | Universal Database | | +---------------------+-------------------------------------------+ | Info-ZIP | Info-ZIP Group | +---------------------+-------------------------------------------+ | Intel | Intel Corporation | +---------------------+-------------------------------------------+ | Microsoft, Windows, | Microsoft Corporation | | Windows 95, | | | Windows NT | | +---------------------+-------------------------------------------+ | Partition Magic | PowerQuest Corp. | +---------------------+-------------------------------------------+ | Sun, Solaris | Sun Microsystems Inc. | +---------------------+-------------------------------------------+ | Unix | X/Open Co. Ltd. | +---------------------+-------------------------------------------+ | Yahoo | Yahoo! Inc. | +---------------------+-------------------------------------------+ END OF DOCUMENT Appendix A. Copyrights, Trademarks and Service marks 77