TailWatch is a process that handles the tasks previously handled by three separate processes: eximstats, antirelayd and cpbandwd. Each of those older processes performed very similar functions. By merging the common functionality into a single process, system resource requirements are reduced.
As suggested by the name, TailWatch monitors a log file for certain activity and takes action based upon the activity. The specifics, such as which log to monitor and what to do with the information, is handled by a driver module. The stock drivers as shipped by cPanel are:
These drivers are much improved versions of the prior stand-alone processes, building on the features of the older implementations.
Upgrading to a version of cPanel that uses TailWatch should be a seamless experience. TailWatch is started, then the older processes are stopped. The older scripts, such as /usr/local/cpanel/bin/eximstats, are modified to no longer function after the upgrade. These scripts will eventually be removed by a later update. Attempting to start the older process will result in failure and a message being displayed informing the user to use TailWatch instead.
The chkservd monitors for antirelayd, cpbandwd and eximstats are removed by the upgrade.
The TailWatch process can be controlled with various command line flags passed to /usr/local/cpanel/bin/tailwatchd. The full list of flags is obtainable using the –help flag:
/usr/local/cpanel/bin/tailwatchd - Driver based real time log processing
--help This screen
--version Show version of Cpanel::TailWatch
--version=long Same as --version but also include active driver modules version information also.
--status Status information
--status=long Same as --status but also include information about the PID if its running
--stop Stop current tailwatch daemon
--start Start tailwatch daemon
--restart Start tailwatch daemon, stopping it first if necessary
--trace log the first 10,000 lines the drivers collectively process
--trace=n log the first 'n' lines the drivers collectively process
Trace only takes effect on --[re]start.
--start --trace (equivalent to --start --trace=10000)
--restart --trace='perl -e 'print 12+3-4+5+67+8+9;''
--start --trace=1729
--status --trace (--trace has no effect here)
--debug This tells all driver's to log() debug messages.
Debug only takes effect in --[re]start. Typically the message should be prefaced with ‘[debug]’ and are about processed lines that result in an entry of some sort
--perldoc This shows the POD for Cpanel::TailWatch
It is possible to add custom functionality by providing a new driver. Full documentation and examples are provided in the PerlDoc for the TailWatch Module. To access this documentation, execute:
These drivers need placed in /usr/local/cpanel/Cpanel/TailWatch. Once the drivers are in place, restarting TailWatch will load the new drivers, providing the functionality they provide.