COREmanager Documentation

How to view log-files


logread is a console application that is provided along with COREmanager and is available in all our software products. It provides a number of functions making it easier for you to read log-files, select data by process ID, search, etc.

How to use

Entering the command

 /usr/local/mgr5/sbin/logread -h


 /usr/local/mgr5/sbin/logread --help

will display the hint about command's syntax

 Usage: logread [OPTION] [FILE]...
   -b, --batch             run program in noninteractively mode
   -p, --pid=PID[:THREAD]  filter output by process ID
   -h, --help              display this help and exit

Currently, the following command line options are available:

  • -b
    Informs the application that the "noninteractive mode" is used for working with log-files, i.e. you must send a request and terminate the operation. The result will be sent to stdout.
  • -p
    Informs the application that data should be filtered by the id of the panel's process. This option receives to stdin the parameter with process ID or "process ID :thread ID" separated by ":".
  • -h
    Outputs a brief hint and termination of the operation.

As a data source, you should specify the path to the panel's log-file or a group of files. The file can be both a text log-file of the control panel and the archive created by a log-rotations program.


 /usr/local/mgr5/sbin/logread -p21760:3 /usr/local/mgr5/var/ispmgr.log /usr/local/mgr5/var/ispmgr.log.0

i.e. upload two log-files of ISPmanager, one of which is an archive, and filter the result by ID of the specified process.

Interactive mode

In the interactive mode, you can view log-files in both directions. Besides, it provides easy-to-use functions for search and navigation. By default the text is grouped by requests to control panel like that:

 Feb 20 17:54:38 [21760:24] journal INFO Request [][root] 'func=keepalive&operafake=1392886478547&sfrom=ajax'
Main commands
  • q and ESC
    Terminate an application.
  •  and 
    Vertical scroll.
  • PageUp and PageDown
    Vertical scroll per page.
  • g and Home
    Top of the test.
  • G and End
    Bottom of the text.
    View log of the current request (the one to which the mouse cursor is pointing).

In this article