Contents

Legal Notices

Chapter 1:
  Quick Start


Chapter 2:
  Introduction and Installation


Chapter 3:
  About Memory Analysis


Chapter 4:
  Finding Memory Leaks


Chapter 5:
  Finding Memory Errors


Chapter 6:
  Startup Options


Chapter 7:
  Viewing Error Messages


Chapter 8:
  Viewing Source Code


Chapter 9:
  Tips and Techniques


Chapter 10:
  Troubleshooting


Chapter 11:
  Obtaining Support


Chapter 2:  Introduction and Installation

ZeroFault is a tool that finds memory errors and leaks in software programs. ZeroFault accomplishes this by examining every instruction as the program executes to ensure that it is valid within the context of the current memory environment. This run-time approach automatically covers shared libraries and dynamically loaded modules, including ones that come with the operating system or from third parties. You don't need to have source code for the program being tested, and ZeroFault will even work with stripped executables.

Before using ZeroFault, you should have a working knowledge of the AIX operating system and the Motif window system. You should know how to issue commands to AIX and use a mouse and standard Motif menus and commands. You should also know how to open, save, and close files using the standard Motif file dialogs. If you need to review these techniques, see the documentation that came with your AIX system.

In debugging programs with ZeroFault, it helps to have a good understanding of the concepts behind the analysis of memory errors and leaks. They are covered in detail in the chapters About Memory Analysis and Finding Memory Leaks. These chapters provide important information about the art of resolving memory problems, and you should consult them if you ever have trouble understanding ZeroFault's output.

System Requirements

ZeroFault requires a 32 or 64Bit AIX system with the following:
  • AIX version 53, 61, or 71

  • at least 1G of RAM
    If you do not know how much RAM your AIX system has, use the command
    lsattr -H -E -l sys0
    The line starting with the word "realmem" indicates the amount of RAM in kilobytes. Also, the data area ulimit should be unset or set to a very large value, because ZeroFault uses a large data area.

  • at least 30MB of available hard disk space
    If you do not know how much available disk space you have, use the df command to find out.

  • at least 1GB of paging space
    If you do not know how much paging space you have, use the command lsps -a to find out. The total amount of paging space required will depend on the size of the process being examined by ZeroFault.

When working with large applications you may want to refer to the performance tips.


Installing ZeroFault

If you haven't already downloaded the ZeroFault distribution files, they are available as follows...
The evaluation version:
here
The Full Version is available from a custom web link provided by the ZF Support team after purchase.

After downloading, place the distribution file in a working directory. You will need approximately 30Mb of disk space to hold the download and extract it as the root user:

  tar -xvf zf*tar
To install the product, cd to the temporary directory and enter the following commands as the root user:
./ZFinstall -NORMAL
		
Please read the README provided with the installation image for custom details.




The remaining information on this page pertains to the commercial versions only.
licensing does not pertain to the eval/demo edition of ZeroFault.

Installing the License Key

When you purchased ZeroFault you received email containing a license key in the form:
  1111 2222 3333 4444 5555 6666 7777 8888
ZeroFault will not run if this key is not properly installed. There are two types of license keys, desktop and floating, and the installation procedure is a bit different for each.

Desktop License Installation

With a desktop license, the license key is installed in a directory on the local machine. To install the key, enter the following commands as root:
  mkdir /usr/lib/elm
  chmod 755 /usr/lib/elm
  /usr/lpp/ZeroFault/bin/tkg_lmadmin -c -r1/"license_key"
where license_key is replaced by the string of digits that is your license key. Once the key file is created in the /usr/lib/elm directory, ZeroFault should be ready for use.

Floating License Installation

Floating licenses are dispensed by a license manager, which is a daemon, or background, process that runs on a server machine. The server must be reachable ("pingable") from the machines where ZeroFault is to be run. The license server should also be a machine that is available most of the time, as ZeroFault will not run if the license server is down or unreachable. It is also most convenient if the license server is on the same subnet as the machines where ZeroFault will be run (see License Server Considerations for more information).

The license manager distribution file should be obtained from a custom link provided
to you after purchase. (the license manager is not required for the demo/eval edition). To install the license manager, run the following commands as the root user on the machine that is to act as the license server:

        mkdir /usr/lib/elm
        chmod 755 /usr/lib/elm
        installp -acXd tkg_lm.obj all
        mkitab "tkg_lmd:2:respawn:/usr/lpp/tkg_lm/bin/tkg_lmd -l /tmp/tkg_lmd.log -m1"
        init Q
       /usr/lpp/tkg_lm/bin/tkg_lmadmin -c -r1/"license_key"
where license_key is replaced by the string of digits that is your license key. Once the key file is created in the /usr/lib/elm directory and the license manager process is running (the init Q command should start it), ZeroFault should be ready for use.

License Server Considerations

If you are using a floating license and your license server is on a different subnet than a machine that will be using ZeroFault, you need to set the TKG_LMHOST environment variable in the user's environment. One way to do this is to put it in the /etc/profile of every machine that is using ZeroFault:
  export TKG_LMHOST=@license_server_hostname
You can also specify the TKG_LMHOST variable in each user's $HOME/.profile or $HOME/.login script. Alternatively, you can replace the zf command with a shell script that sets the variable and then executes the zf executable. For example:
  cd /usr/lpp/ZeroFault/bin
  mv zf zf.real
  cat > zf <<\EOF
  #!/bin/ksh
  export TKG_LMHOST=@licsrvr
  exec zf.real "$@"
  EOF
  chmod +x zf
This method is particularly useful when the ZeroFault installation directory is remote-mounted by users, as opposed to being installed on each user's machine.

The "@" preceding the license server hostname specifies that ZeroFault should only contact that host, and not try to broadcast on the local subnet to find a license server. The procedure for finding a license server is:

  • If TKG_LMHOST is not set, then broadcast on the local subnet to find a license server.

  • If TKG_LMHOST is set and the first character is not "@", then send a message to the server specified in TKG_LMHOST and also broadcast on the local subnet to find a license server.

  • If TKG_LMHOST is set and the first character is "@", then send a message only to the server specified in TKG_LMHOST.

 

© Copyright 2013 The ZeroFault Group, LLC. All rights reserved. All logos and trademarks are property of their respective owners.