|
This is the manual for GNU Gatekeeper 5.13. Chapters: Contents · Introduction · Installation · Getting started · Basic Config · Routed Mode & Proxy · Routing · RAS Config · Authentication · Accounting · Neighbors · Per Endpoint Config · Advanced Config · Monitoring · Advanced Topics
The GNU Gatekeeper Manual Chapter 1414. Advanced TopicsThis portion of the manual will cover advanced topics, such as compiling and debugging the GNU Gatekeeper. 14.1 Compiling GnuGk from GithubThe following instructions are an example of how to compile GnuGk from source on an Ubuntu platform. First make sure your system is up-to-date and install the tools needed for the compile sudo apt-get update sudo apt-get install automake flex bison build-essential git pkg-config automake linuxdoc-tools libssl-devAlso make sure the "...-dev" packages for all databases or LDAP servers you want to use are installed. Do NOT install PTlib or H323Plus packages from your Linux distribution. NOTE: You can't use the latest PTLib from the OPAL project; it is undergoing many changes that are incompatible with GnuGk. Use our patched version PTLib 2.10.9. Get and compile PTLib from Github: cd ~ git clone https://github.com/willamowius/ptlib.git cd ptlib export PTLIBDIR=~/ptlib ./configure --enable-ipv6 --disable-odbc --disable-sdl --disable-lua --disable-expat make optnoshared Get and compile H323Plus: cd ~ git clone https://github.com/willamowius/h323plus.git cd h323plus export OPENH323DIR=~/h323plus ./configure --enable-h235 --enable-h46017 --enable-h46026 make optnoshared Get and compile GnuGk: cd ~ git clone https://github.com/willamowius/gnugk.git cd gnugk ./configure --enable-h46018 --enable-large-fdset make optnoshared Once the compile is finished, the binary can be found as (on a 64bit Linux system) ~/gnugk/obj_linux_x86_64_s/gnugk In order to stay up-to-date, run the following:
cd ~/ptlib git pull make clean ; make optnoshared cd ~/h323plus git pull make clean ; make optnoshared cd ~/gnugk git pull make clean ; make optnoshared 14.2 Tracing GnuGkIf GnuGk doesn't handle calls like you expect, you can enable tracing to see what GnuGk does internally. This should not be confused with connection to the status port and looking at the events ("telnet 127.0.0.1 7000"). Creating a trace file will reveal a lot more of the internal workings. On the command line, start GnuGk with -ttttt and -o to write the trace to a file: gnugk -c gnugk.ini -ttttt -o trace.log If you have a lot of calls, trace.log can grow quite large, so make sure you disable it after you are done with testing, or at least reduce the trace level to 2 or 3 for production. You can also enable tracing in your config file: [Gatekeeper::Main] TraceLevel=5 [LogFile] Filename=trace.log Or you can enable tracing through the status port: setlog trace.log debug trc 5 Doing it through the status port has the advantage that you won't interrupt ongoing calls and you can quickly turn it on or off. The trace file will contain information detailing everything GnuGk does. To reduce it to a single call, you can search for the callID or write a small Perl script to extract only those messages you are interested in. 14.3 Debugging GnuGk (on Linux)In order to use gdb with GnuGk, the software and libraries must be compiled with debug support. You may follow the instructions above in obtaining the software, but the compile in each subdirectory must be: make debugnoshared Allow unlimited core dumps: ulimit -c unlimited Run GnuGk: ~/openh323/obj_linux_x86_64_d_s/gnugk -c your.ini Then wait for the crash and run GDB to get a stack backtrace: gdb obj_linux_x86_64_d_s/gnugk core bt Once you've obtained a backtrace, post it to the mailing list. Note: On some systems, the core dump is named "core.xxx" where xxx is the process number of the GnuGk process that crashed. On Linux, you can also let GnuGk dump it's current usage of file descriptors to the trace file at runtime eg. if you are suspecting a leak by sending it a USR2 signal: killall gnugk -USR2 Next Previous Contents Chapters: Contents · Introduction · Installation · Getting started · Basic Config · Routed Mode & Proxy · Routing · RAS Config · Authentication · Accounting · Neighbors · Per Endpoint Config · Advanced Config · Monitoring · Advanced Topics
|
Last updated: 21. Jan 2025 |