Skip to main content

Name

counter add, counter help, counter increment, counter list, counter reset, counter unlink — manage counters

Synopsis

counter add { counter_name } { delta }

counter help

counter increment { counter_name }

counter list

counter reset { counter_name }

counter unlink { counter_name }

Description

Lua makes use of generic counters. These commands display and manipulate counters.

counter add

Increments the specified counter by the value of the second parameter.

counter help

Displays a brief description of each command.

counter list

Displays the statistics for all counters. See below for sample output:

07:21:07 /tmp/2025> counter list
VALUE       RESET_TIME       SEMANTICS COUNTER

1024   2010-12-02@07:20:58    relaxed  /vendor/sample

2 counters listed.

All content scanning modules record statistics on scanned virus and spam volume metrics. These metrics are exposed via the counters subsystem and can be viewed using the counter list command.

The counter increment command increments the specified counter by one. For example, you can increment the /vendor/sample counter shown in “counter list” by issuing the command counter increment /vendor/sample .

counter unlink

Deletes a counter and the counter reset sets a counter to 0.

You can also display and manipulate counters through the following Lua functions:

Was this page helpful?