Ejabberd Source Code parsing Prelude--debugging

Source: Internet
Author: User
Tags system log

One, log files

A ejabberd node writes two log files:
Ejabberd.log

Ejabberd service logs, messages reported by the Ejabberd node
erlang.log ERLANG/OTP system log, messages reported by ERLANG/OTP using SASL (System architecture Support Library)
Option LogLevel Modify the verbosity of the file Ejabberd.log. The syntax is:
{loglevel, Level}.

The possible level is:
0

No ejabberd log (not recommended)
1 Critical
2
Error
3 Warning
4 Info
5 Debug

For example, the default configuration is:
{loglevel, 4}.

Log files continue to grow, so it is recommended to rotate regularly. To rotate the log files, rename the file and reopen them. The EJABBERDCTL command Reopen-log reopen the log file, and it will automatically rename the old file if you do not rename the old file.

Second, debug the console

The debug console is an Erlang shell that is connected to a running Ejabberd server. With this Erlang shell, an experienced administrator can perform complex tasks.

This shell gives full control of the Ejabberd server, so use it with great care. There are some simple and safe examples of the interconnection of Erlang nodes in the article

To exit this shell, close the window or type: Control+c control+c.

Third, watchdog warning

Ejabberd includes a watchdog watchdog mechanism that can be useful to developers when it comes to identifying issues related to memory usage. If a process on the Ejabberd server consumes more than the configured threshold memory, a message will be sent to the XMPP account defined in the Ejabberd configuration file Option Watchdog_admins.

The syntax is:

{watchdog_admins, [JID, ...]}.

The memory consumed is measured in Word: A word is 4 bytes bytes on a 32-bit system, and 8 bytes bytes on a 64-bit system. The default value for this threshold is 1000000 words. This value can be configured with the option Watchdog_large_heap, or the watchdog alert robot is used in a session.

The syntax is:

{watchdog_large_heap, number}.

Example configuration:
{watchdog_admins, ["[Email protected]", "[email protected]"}.
{watchdog_large_heap, 30000000}.

To remove the watchdog administrator, remove it from the options. In order to remove all watchdog administrators, set this option to an empty list:
{watchdog_admins, []}.

Ejabberd Source Code parsing Prelude--debugging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.