Telepathy debugging: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
= Enabling debug logs for Telepathy =
== Enabling debug logs for Telepathy ==


When there are certain kinds of problems with collaboration on the XO, it is useful to developers to have log files for debugging purposes. Here is how to enable these log files. If you haven't already seen [[Attaching Sugar Logs to Tickets]], see that page first.
== Enabling .xsession ==


* [http://wiki.laptop.org/go/Olpc-utils#.2Fhome.2Folpc.2F.xsession Enable your <tt>/home/olpc/.xsession</tt> file]
This page explains how to enable Telepathy debug output on your XO. If you haven't already seen [[Attaching Sugar Logs to Tickets]], see that page first.

* First you need to [http://wiki.laptop.org/go/Olpc-utils#.2Fhome.2Folpc.2F.xsession enable] your /home/olpc/.xsession file
cp /home/olpc/.xsession-example /home/olpc/.xsession
cp /home/olpc/.xsession-example /home/olpc/.xsession
* Then edit .xsession and uncomment the lines about GABBLE_DEBUG, GABBLE_LOGFILE, SALUT_DEBUG and SALUT_LOGFILE
* Edit .xsession and uncomment the lines about GABBLE_DEBUG, GABBLE_LOGFILE, SALUT_DEBUG and SALUT_LOGFILE by removing the initial '#' character
* For debugging lower level problems in the Telepathy connection managers, enable LM_DEBUG (for [[telepathy-gabble]]) or GIBBER_DEBUG (for [[telepathy-salut]]). Note that these will produce much bigger log files.
* For debugging lower level problems in the Telepathy connection managers, enable LM_DEBUG (for [[telepathy-gabble]]) or GIBBER_DEBUG (for [[telepathy-salut]]). Note that these will produce much bigger log files.
* reboot
* Reboot


Telepathy log files are now available at /home/olpc/.sugar/default/logs/telepathy-gabble.log and /home/olpc/.sugar/default/logs/telepathy-salut.log .
Telepathy log files are now available at <tt>/home/olpc/.sugar/default/logs/telepathy-gabble.log</tt> and <tt>/home/olpc/.sugar/default/logs/telepathy-salut.log</tt> .
Be sure to attach these files if you submit a ticket about a Telepathy issue.
Be sure to attach these files if you submit a ticket about a Telepathy issue.


== Capturing core files ==
== Capturing core files ==


Core files are produced when a program crashes and contain useful debugging information.
Core files are produced when a program crashes and contain useful debugging information. By default, core files are disabled on the XO. Here is how to enable them.


As root:
* As root:


echo /tmp/core-%p-%e > /proc/sys/kernel/core_pattern
echo /tmp/core-%p-%e > /proc/sys/kernel/core_pattern


This tells the kernel to put core files into the /tmp directory.
: This tells the kernel to put core files into the /tmp directory. This will only be effective until the laptop is rebooted. To make it persistent across reboots, add the following line to /etc/sysctl.conf:

To make this persist across reboots, add the following line to /etc/sysctl.conf:


kernel.core_pattern = /tmp/core-%p-%e
kernel.core_pattern = /tmp/core-%p-%e


Add the following line to /home/olpc/.xsession:
* Add the following line to <tt>/home/olpc/.xsession</tt>:


ulimit -c unlimited
ulimit -c unlimited


This turns off any limit on core file size.
This turns off any limit on core file size.



[[category:developers]] [[category:software]]
[[category:developers]] [[category:software]]

Revision as of 20:47, 24 March 2008

Enabling debug logs for Telepathy

When there are certain kinds of problems with collaboration on the XO, it is useful to developers to have log files for debugging purposes. Here is how to enable these log files. If you haven't already seen Attaching Sugar Logs to Tickets, see that page first.

 cp /home/olpc/.xsession-example /home/olpc/.xsession
  • Edit .xsession and uncomment the lines about GABBLE_DEBUG, GABBLE_LOGFILE, SALUT_DEBUG and SALUT_LOGFILE by removing the initial '#' character
  • For debugging lower level problems in the Telepathy connection managers, enable LM_DEBUG (for telepathy-gabble) or GIBBER_DEBUG (for telepathy-salut). Note that these will produce much bigger log files.
  • Reboot

Telepathy log files are now available at /home/olpc/.sugar/default/logs/telepathy-gabble.log and /home/olpc/.sugar/default/logs/telepathy-salut.log . Be sure to attach these files if you submit a ticket about a Telepathy issue.

Capturing core files

Core files are produced when a program crashes and contain useful debugging information. By default, core files are disabled on the XO. Here is how to enable them.

  • As root:
 echo /tmp/core-%p-%e > /proc/sys/kernel/core_pattern
This tells the kernel to put core files into the /tmp directory. This will only be effective until the laptop is rebooted. To make it persistent across reboots, add the following line to /etc/sysctl.conf:
 kernel.core_pattern = /tmp/core-%p-%e
  • Add the following line to /home/olpc/.xsession:
 ulimit -c unlimited

This turns off any limit on core file size.