1- <!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.40 2006/12/0200:42:54 tgl Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.41 2006/12/0209:29:51 petere Exp $ -->
22
33<chapter id="monitoring">
44 <title>Monitoring Database Activity</title>
@@ -824,29 +824,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
824824 </para>
825825
826826 <sect2 id="compiling-for-trace">
827- <title>Compiling for DynamicTrace </title>
827+ <title>Compiling for DynamicTracing </title>
828828
829829 <para>
830830 By default, trace points are disabled, so you will need to
831831 explicitly tell the configure script to make the probes available
832832 in <productname>PostgreSQL</productname>. To include DTrace support
833- in a 32-bit binary, specify <option>--enable-dtrace</> to configure.
834- For example:
835- <programlisting>
836- $ ./configure --enable-dtrace ...
837- </programlisting>
838- To include DTrace support in a 64-bit binary, specify
839- <option>--enable-dtrace</>
840- and <literal>DTRACEFLAGS="-64"</> to configure. For example,
841- using the gcc compiler:
842- <programlisting>
843- $ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
844- </programlisting>
845- Using Sun's compiler:
846- <programlisting>
847- $ ./configure CC='/path_to_sun_compiler/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...
848- </programlisting>
849- </para>
833+ specify <option>--enable-dtrace</> to configure. See <xref
834+ linkend="install-procedure"> for further information.
850835 </sect2>
851836
852837 <sect2 id="trace-points">
@@ -855,7 +840,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
855840 <para>
856841 A few standard trace points are provided in the source code
857842 (of course, more can be added as needed for a particular problem).
858- These are:
843+ These are shown in <xref linkend="trace-point-table">.
859844 </para>
860845
861846 <table id="trace-point-table">
@@ -974,15 +959,14 @@ postgresql$1:::transaction-commit
974959 Note how the double underline in trace point names needs to
975960 be replaced by a hyphen when using D script.
976961 When executed, the example D script gives output such as:
977- <programlisting >
962+ <screen >
978963# ./txn_count.d `pgrep -n postgres`
979964^C
980965
981966Start 71
982967Commit 70
983- Abort 1
984968Total time (ns) 2312105013
985- </programlisting >
969+ </screen >
986970 </para>
987971 <para>
988972 You should remember that trace programs need to be carefully written and
@@ -999,7 +983,7 @@ Total time (ns) 2312105013
999983
1000984 <para>
1001985 New trace points can be defined within the code wherever the developer
1002- desires, though this will require are-compile .
986+ desires, though this will require arecompilation .
1003987 </para>
1004988
1005989 <para>
@@ -1009,14 +993,14 @@ Total time (ns) 2312105013
1009993 occurrence of an event can be achieved with a single line, using
1010994 just the trace point name, e.g.
1011995<programlisting>
1012- PG_TRACE (my__new__trace__point);
996+ PG_TRACE (my__new__trace__point);
1013997</programlisting>
1014998 More complex trace points can be provided with one or more variables
1015999 for inspection by the dynamic tracing utility by using the
10161000 <literal>PG_TRACE</><replaceable>n</> macro that corresponds to the number
10171001 of parameters after the trace point name:
10181002<programlisting>
1019- PG_TRACE3 (my__complex__event, varX, varY, varZ);
1003+ PG_TRACE3 (my__complex__event, varX, varY, varZ);
10201004</programlisting>
10211005 The definition of the transaction__start trace point is shown below:
10221006<programlisting>
@@ -1055,7 +1039,7 @@ provider postgresql {
10551039 </para>
10561040
10571041 <para>
1058- You should take care that thedatatypes specified for the probe arguments
1042+ You should take care that thedata types specified for the probe arguments
10591043 match the datatypes of the variables used in the <literal>PG_TRACE</>
10601044 macro. This is not checked at compile time. You can check that your newly
10611045 added trace point is available by recompiling, then running the new binary,