Developer Resources

XML and JSON APIs [+] [-]



Authenticating API Function Calls

Listing Available XML API Calls

Calling cPanel API1 & API2 Commands

Account Functions [+] [-]

DNS Functions [+] [-]

Package Functions [+] [-]

Reseller Functions [+] [-]

Server Information [+] [-]

Server Administration [+] [-]

Service Functions [+] [-]

SSL Functions [+] [-]


cPanel API Version 2

Installing cPanel Plugins

Hooking into cPanel Functionality [+] [-]

About the TailWatch Service

Creating cPAddon Scripts

cPanel Modules & WHM Scripts

The swapip Utility

Using Remote Access Keys

Documentation Home

feed RSS Feed

TailWatch

Introduction

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.

How it works

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:

  • antirelayd
  • cpbandwd
  • eximstats

These drivers are much improved versions of the prior stand-alone processes, building on the features of the older implementations.

Upgrading to TailWatch

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.

Process Control and Status

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 

Customization

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:

/usr/local/cpanel/bin/tailwatchd --perldoc

These drivers need to be 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.

Topic revision: r2 - 15 Jun 2009 - 17:17:28 - Main.MelanieSeibert
AllDocumentation/AutomationIntegration.TailWatch moved from Trash.AllDocumentationTailWatch on 15 Jun 2009 - 17:17 by Main.MelanieSeibert
 

Copyright © cPanel 2000-2010.