BILLmanager Knowledge Base
en En
es Es

How to search for information in BILLmanager logs

BILLmanager keeps logs to help you track system operation, diagnose issues, and audit events. You can use log data to investigate errors, payments, user activity, and module behavior. For detailed information, refer to Logging in BILLmanager.

Question

How do I search for information in BILLmanager logs?

Answer

About BILLmanager logs

Fundamental information about logs and searching them:

  • logs are located in the /usr/local/mgr5/var/ directory;
  • the main platform log is called billmgr.log;
  • platform module logs have the format pmxxx.log. For example, pmvmmgr6.log is the log for the VMmanager 6 service handler;
  • payment modules may have additional logs. For example, the Paymaster payment module, in addition to pmpaymaster.log, has additional logs pmaspayment.log, pmasresult.log, and others. For more details on payment system logging, see Payment methods;
  • archived logs are stored in the /usr/local/mgr5/var/logs/ directory in the format log_name.creation_time.gz. For example:
    billmgr.log.2019_08_18_08_51_02.0.gz
  • when analyzing information, first pay attention to lines with "ERROR". They are highlighted in red;
  • to get more detailed logs, increase the logging level. You can change the logging level either through the platform's web interface or via the configuration file /usr/local/mgr5/etc/debug.conf. For more details, see the article Logging in BILLmanager.
Note
To run the commands in this guide, connect to your server via SSH. For help, see Workstation setup.

How to monitor logs in real time

To track system events as they occur, use real-time log monitoring mode. Run the command:

tail -f /usr/local/mgr5/var/<log_name>
Comment

Immediately after launching, the command will output the last few lines of the log and then start displaying new entries in real time. To stop the output, press Ctrl+C.

How the tail utility works:

  • without the -f key, tail displays the last lines of a file;
  • with the -f key, tail starts real-time mode. First, the utility outputs the last lines of the file, then automatically shows new entries in the log as they appear. This is useful for:
    • watching live system activity;
    • capturing errors at the moment they occur during troubleshooting;
    • debugging user sessions or automated processes.

See more in Logging in BILLmanager.

How to filter logs using grep

The grep command lets you search for specific text patterns within log files.

  • search for errors:
    tail -f /usr/local/mgr5/var/<log_name> | grep "ERROR"
    Comment
    Output Example
    tail -f /usr/local/mgr5/var/billmgr.log| grep "ERROR"
    Dec 11 08:55:02 [1588072:1] libmgr ERROR Error: Type: 'remote_pricelist' Object: '' Value: ''
    Dec 11 08:55:02 [1588072:1] libmgr ERROR Error: Type: 'remote_pricelist' Object: '' Value: ''
  • search by entity ID:
    tail -f /usr/local/mgr5/var/<log_name> | grep "<entity_ID>"
    Comment
    Example output
    tail -f /usr/local/mgr5/var/billmgr.log| grep "16453" 
    Dec 11 09:12:55 [1499690:13153] db EXTINFO Query: 'SELECT p.id, p.billurl FROM account2project a2p JOIN project p ON p.id=a2p.project WHERE a2p.account=16453 ORDER BY p.id'
  • search by client email:
    tail -f /usr/local/mgr5/var/<log_name> | grep "<client_email>"
    Comment
    Example output
    tail -f /usr/local/mgr5/var/billmgr.log| grep "1111@test.com" 
    Dec 11 09:17:34 [1499690:13188] core_module INFO Request [10.10.10.10][root#1111@test.com(16461)] 'func=usrparam&out=xjson&sfrom=ajax'
  • search by log thread:
    A log thread is a unique identifier that the system assigns to each parallel task when it starts. For example, when a user pays for a service in the platform, the system creates or uses such a thread to process that specific request. All messages in the log related to this particular action will have the same thread number. For more details, see the article Logging in BILLmanager.
    1. Open the log file:
      less -R /usr/local/mgr5/var/<log_name>
      Comment
    2. Find an error entry or other event in the log for analysis and identify the thread number. For example:
      Log example
      Dec 10 10:10:06 [22253:17] db EXTINFO Query: 'SELECT id, billurl FROM project'
      Dec 10 10:10:06 [22253:17] db EXIT Query duration: 0.000069
      Comments
    3. Perform the search using grep:
      grep "22253:17" /usr/local/mgr5/var/<log_name>
      Comment
      Example output
      grep "22253:17" /usr/local/mgr5/var/billmgr.log 
      Dec 11 09:30:08 [22253:17] libmgr TRACE Evaluate path = '/doc/headers/header[@name]'
      Dec 11 09:30:08 [22253:17] libmgr TRACE Evaluate path = '/doc/cookies/cookie'
      Dec 11 09:30:08 [22253:17] libmgr TRACE Evaluate path = '//auth[@id]'

      Or using the less utility:

      less -R /usr/local/mgr5/var/<log_name> | grep "22253:17"
      Comment

      To search in archived logs, use zgrep:

      zgrep "22253:17" /usr/local/mgr5/var/logs/billmgr.log.2019_08_18_08_51_02.0.gz
      Comment

How to view existing logs

To view existing logs, run the commands:

  • current logs:
    less -R /usr/local/mgr5/var/<log_name>
    Comment
  • archived logs:
    zless -R /usr/local/mgr5/var/logs/billmgr.log.2019_08_18_08_51_02.0.gz
    Comment

How to work with less:

  • to search logs from the beginning of the file, type / followed by the search query:

    /<search_phrase>
    Example
    /22253:17
  • to search logs in reverse (from the end of the file to the beginning), type ? followed by the search query:
    ?<search_phrase>
    Example
    ?22253:17
  • to switch between found matches, press n;
  • to jump to the end of the file, press Shift+g;
  • to jump to the beginning of the file, press g;
  • to exit less, press q.

How to use advanced search methods

For advanced log searches, use the following commands:

Searching for errors across all module logs
grep "ERROR" /usr/local/mgr5/var/pm*.log
Comment
Searching for errors in archived logs
zgrep "ERROR" /usr/local/mgr5/var/logs/billmgr.log.2019_08_*
Comment
Performing a combined search in archived logs
zgrep "22253:17" /usr/local/mgr5/var/logs/billmgr.log.2025_08_* | grep "ERROR"
Comment

The specified command:

  • searches for lines containing 22253:17 in all archived logs for August 2025;
  • among the found lines, selects only those that also contain ERROR.
Note
If searching the logs yields no results, increase the logging level. For more details, see the article Logging in BILLmanager.