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 32Bit AIX system with the following:
- AIX
version 3.2.5, 4.1, 4.2, 4.3, or 5.1
- at
least 32MB 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 10MB 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 100MB 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 10Mb of disk space to hold the download
and extract it. To extract the installation image, enter one of
the following commands as the root user:
tar xf zf-aix325.tar
tar xf zf-aix41.tar
tar xf zf-aix43.tar
To install
the product, cd to the temporary directory and enter the following commands as the root user:
export target_dir="/usr/lpp/ZeroFault"
mkdir ${target_dir}
./install zf.images ${target_dir}
Please read the README provided with the installation image for custom details.
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 with this link:
tkg_lm.obj.
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.
This provides
a great deal of flexibility in setting up your license server environment,
and allows for the possibility of having redundant servers if desired.
Please contact ZeroFault Support (please refer to http://www.zerofault.com/contact.html)
if you wish to set up redundant license servers.
ZeroFault
Documentation
ZeroFault
documentation is distributed in HTML format, and is installed into
the doc subdirectory, which is by default /usr/lpp/ZeroFault/doc.
You may use any browser to view the documentation, e.g.:
netscape file:/usr/lpp/ZeroFault/doc/manuals.html
The latest documentation is also available at:
http://www.zerofault.com/doc/manuals.html
|