STAF Diagnostics Guide July 15, 2014 This document will describe common techniq

STAF Diagnostics Guide July 15, 2014 This document will describe common techniques to debug problems when running the Software Testing Automation Framework (STAF). To find more detailed information on using STAF, go to the main STAF web page 1. General Debugging Information 1.1. STAFProc console output 1.2. Redirecting STAFProc console output 1.3. Configuring STAF 2. STAF Installation Verification 2.1. STAF Install location 2.2. STAF Install packages 2.3. STAF directories 2.4. Key STAF files 2.5. STAF Environment 2.6. Determining which version/architecture of STAF is installed 3. STAF Variables 3.1. VAR LIST 3.2. STAF/Config/Machine 3.3. STAF/Config/MachineNickname 3.4. STAF/Config/ConfigFile 3.5. STAF/Config/InstanceName 3.6. STAF/Config/STAFRoot 3.7. STAF/DataDir 3.8. STAF/Env/* 4. Service Help and Error Codes 4.1. Obtaining STAF service syntax 4.2. STAF service syntax errors 4.3. STAF error codes 5. MISC service 5.1. MISC service 5.2. MISC WHOAMI 5.3. MISC WHOAREYOU 5.4. MISC LIST INTERFACES 5.5. MISC LIST PROPERTIES 6. Debugging STAF communication problems 6.1. Debugging STAF communication problems 7. Debugging STAF trust problems 7.1. Debugging STAF trust problems 8. STAF Handles 8.1. HANDLE LIST 9. STAF Processes 9.1. PROCESS LIST 9.2. Debugging PROCESS START errors 10. TRACE output 10.1. TRACE output 11. Debugging Java problems 11.1. Determining Java version 11.2. Debugging multiple STAF Java services 11.3. Testing STAF Java support 12. JVM Logs 12.1. JVM Logs 12.2. Viewing JVM Logs via the STAX Monitor 12.3. Viewing JVM Logs via the STAFJVMLogViewer class 13. Service logs 13.1. Service logs 13.2. Viewing STAF service logs 14. System CPU/memory utilization 14.1. System CPU/memory utilization - Windows 14.2. System CPU/memory utilization - Unix 15. Debugging STAX Jobs 15.1. Testing STAX Jobs 15.2. Debugging XML Parsing Errors 15.3. Using XML-aware Editors 15.4. Debugging Python Compile-time Errors 15.5. Debugging Python Run-time Errors 15.6. Displaying/logging data within your STAX jobs 15.7. Holding STAX jobs for debugging 15.8. Debugging hung STAX jobs 15.9. STAX Requests return RC 6 16. Reducing overhead in STAX jobs 16.1. Retrieving large files 17. Getting additional support 17.1. Getting additional support 1. General Debugging Information 1.1. STAFProc console output 1.2. Redirecting STAFProc console output 1.3. Configuring STAF 1.1. STAFProc console output When STAFProc starts on a machine, the initial output will contain the following information: Machine : staf3a.austin.ibm.com Machine nickname : staf3a.austin.ibm.com Startup time : 20080626-08:35:57 STAFProc version 3.3.0 initialized The first line, Machine, indicates the TCP/IP hostname (or the IP address if a hostname is not available) used to identify the machine. The second line, Machine nickname, indicates the machine nickname that is used for the machine. This nickname is not used for any network communication; it is used only by STAF services (such as the Log and Monitor services) which store data based on the machine from which it came. The third line, Startup time, indicates the time and date that STAFProc was started on the machine. The fourth line indicates the version of STAF. You can find specific features and bug fixes that were added to a version of STAF by examining the STAF History file. Note that if errors are encountered while STAFProc is starting, details about the errors will be displayed in the STAFProc console output. If you are starting STAFProc on Windows via the Start Menu, and errors occur during startup, the command prompt containing the console output will close and you will not be able to see the error information. If this occurs, open your own command prompt and run "STAFProc" to start STAF and see the errors in the console output. 1.2. Redirecting STAFProc console output If errors occur with the STAFProc daemon, the error messages may be displayed in its console output. In order to ensure that this data is accessible, it is recommended that you redirect the STAFProc console output to a file, so that the information is available if the STAFProc console is closed. To redirect STAFProc's stdout and stderr to a file, you can execute the following when starting STAFProc: On Windows: STAFProc >> STAFProc.out On Unix: STAFProc >STAFProc.out 2>&1 & On Unix (on systems where logging out of the terminal would cause the STAFProc process to be terminated): nohup STAFProc >STAFProc.out 2>&1 & 1.3. Configuring STAF STAF is configured through a text file called the STAF Configuration File. This file may have any name you choose, but the default is STAF.cfg. By default, this file is located in c:\STAF\bin on Windows, /usr/local/staf/bin on UNIX, and /Library/staf/bin on Mac OS X. When you start STAFProc on a system, that system's STAF.cfg file will be read to determine how STAF should be configured on the machine. If you make any changes to a machine's STAF.cfg file, you must restart STAFProc on that machine to make these changes have effect. Some configuration items, such as Trust levels, can be changed dynamically (via an associated STAF service, such as the TRUST service) while STAFProc is running. However, once STAFProc is restarted, these dynamic changes will no longer be in effect. So, usually after making a dynamic change on a machine, you will want to also update the machine's STAF.cfg file, so that the change will be active the next time STAFProc is restarted. 2. STAF Installation Verification 2.1. STAF Install location 2.2. STAF Install packages 2.3. STAF directories 2.4. Key STAF files 2.5. STAF Environment 2.6. Determining which version/architecture of STAF is installed 2.1. STAF Install location By default STAF will be installed to C:\STAF (on Windows), /Library/staf on Mac OS X, and /usr/local/staf on all other Unix platforms. During STAF installation, the user can select any directory as the target for the installation. 2.2. STAF Install packages STAF provides 2 ways to install STAF: InstallAnywhere (for Windows and most Unix platforms), and a tar.gz STAFInst script (for all Unix platforms). Both installers will install the same files to the target install directory. The InstallAnywhere installer will perform additional system updates, such as automatically updating system/user environment variables. The STAF InstallAnywhere installers for most platforms are available as an executable file (.exe on Windows, .bin on Unix); on Mac OS X the InstallAnywhere installer is available as a .zip file. The "Bundled JVM" executable file includes a bundled JVM that will be used during the install and uninstall of STAF. The "NoJVM" executable file will require the system to have an existing JVM. 2.3. STAF directories The following directories will be created when STAF is installed:  bin Contains the binary STAF files and the default STAF configuration file. On Windows, the bin directory will also contain all of the STAF library (dll and jar) files.  codepage Contains the STAF codepage files.  data The default directory where STAF will write data.  docs Contains the STAF documentation files.  include Contains the STAF C++ header files.  lib On Unix, contains the STAF library (so/sl and jar) files.  samples Contains the STAF sample files. 2.4. Key STAF files The following are descriptions of some of the key STAF files that are installed in the root STAF directory:  STAFEnv.bat (STAFEnv.sh on Unix) A script file that can be used to set the environment variables required by STAF. Note that the correct way to source this file on Unix is by executing: ". ./STAFEnv.sh".  bin/STAFProc.exe (bin/STAFProc on Unix) This is the STAFProc executable.  bin/STAF.exe (bin/STAF on Unix) This is the STAF command line utility. Note that on Unix platforms where filenames are case-sensitive, "staf" (lower-case) is created as a soft-link to this file. Note that filenames are not case-sensitive on iSeries and Mac OS X.  bin/FmtLog.exe (bin/FmtLog on Unix) This is the Format Log Utility. Note that on Unix platforms where filenames are case-sensitive, "fmtlog" (lower-case) is created as a soft-link to this file. Note that filenames are not case-sensitive on iSeries and Mac OS X.  bin/STAF.cfg The default STAF configuration file.  bin/STAF.dll (lib/libSTAF.so on Unix) The main STAF library. Note that the filename extension for the Unix file will vary depending on the operating system (i.e. it will not always be .so).  bin/STAFTCP.dll (lib/libSTAFTCP.so on Unix) The STAF TCP/IP connection provider library. Note that the filename extension for the Unix file will vary depending on the operating system (i.e. it will not always be .so).  bin/STAFLIPC.dll (lib/libSTAFLIPC.so on Unix) The STAF "local" connection provider library. Note that the filename extension for the Unix file will vary depending on the operating system (i.e. it will not always be .so).  bin/JSTAF.jar (lib/JSTAF.jar on Unix) The jar file containing the STAF Java classes. 2.5. STAF Environment There are multiple environment settings required for STAF to function correctly. You can find more information about the STAF environment variables in the STAF User's Guide. To view the current environment variables on a system, you can run "set" on Windows or "export" on Unix. Note that on Windows the InstallAnywhere installer will update the appropriate system/user environment variables. These can be viewed in Control Panel -> System -> Advanced -> Environment Variables. On Unix, the InstallAnywhere installer will update the /etc/profile file with the appropriate environment variables. If you used a tar.gz installer, uploads/Industriel/ staf-diagnostics-guide.pdf

  • 11
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager