Check and Refresh Mailbox Counters
Feature Server release 8.1.201.80 includes the following python scripts:
- refreshMailboxCounters.py—Renews or resets mailbox counters.
- getAllMailboxCountersInfo.py—Checks mailbox counters.
You can run python scripts on the master Feature Server instance to:
- correct an error that caused Feature Server to display incorrect totals for the number of messages in a mailbox.
- check the mailbox counters.
Deploy the Python Scripts
- On the master Feature Server instance:
- For 8.1.202.10 or later versions of Feature Server, copy the jython-standalone-2.7.1b2.jar file from <FS installation path>\work\jetty-x.x.x.x-pppp-fs.war-_fs-any-\webapp\WEB-INF\lib to <FS installation path>\python\.
- For 8.1.202.09 or previous versions of Feature Server, copy the jython-2.7b1.jar file from <FS installation path>\work\jetty-x.x.x.x-pppp-fs.war-_fs-any-\webapp\WEB-INF\lib to <FS installation path>\python\.
- Open console and navigate to <FS installation path>\python\util, which contains the scripts.
- Copy both the above-mentioned python scripts to this path: <FS installation path>\python\.
- Enter the command to set JYTHONPATH:
- Windows
- set JYTHONPATH=<FS installation path>\python
- Linux
- export JYTHONPATH=<FS installation path>/python
Run the Python Scripts
The following python scripts save data, such as User roles, User Voicemail Profiles assignments, and User Group Voicemail Profiles assignments, that are not related to or synchronized with Configuration Server.
Each script creates a .csv file that you can analyze, edit as needed, and use as the input data for the scripts restoring the data not contained in Configuration Server.
Use this command line format to run each script for 8.1.202.09 and previous versions of Feature Server:
java -jar jython-2.7b1.jar <scriptname>.py <script input parameters>
Use this command line format to run each script for 8.1.202.10 and later versions of Feature Server:
java -jar jython-standalone-2.7.1b2.jar <scriptname>.py <script input parameters>
Check Mailbox Counters
- Verify that:
- All Feature Servers are up and running.
- There is no voicemail activity (no one can deposit, read, or listen to voicemail).
- Run getAllMailboxCountersInfo.py.
Sample Command Line
Sample Command Line for 8.1.202.09 and previous versions of Feature Server:
java -jar jython-2.7b1.jar getAllMailboxCountersInfo.py -H localhost -p 9160 -o ./getAllMailboxCountersInfo.log
Sample Command Line for 8.1.202.10 and later versions of Feature Server:
java -jar jython-standalone-2.7.1b2.jar getAllMailboxCountersInfo.py -H localhost -p 9160 -o ./getAllMailboxCountersInfo.log
Refresh Mailbox Counters
- Verify that:
- All Feature Servers are up and running.
- There is no voicemail activity only for mailboxes specified in the .csv file.
- Run getAllMailboxCountersInfo.py to identify mailboxes having invalid counters.
- These mailboxes will be marked with !!! in the script output log. For example:
- Mailbox: 86025: Read value: '-1/0 (0/0)'; Calculated value: '0/0 (0/0)'; !!!
- Create a .csv file which has the list of mailboxes that need to be refreshed.
- Run the Python script refreshMailboxcounters.py using the input file created.
The content of the file csv file created in step 3 should be in this format:
4909045 4909185 4909005 4909889
Sample Command Line
Sample Command Line for 8.1.202.09 and previous versions of Feature Server:
java -jar jython-2.7b1.jar refreshMailboxCounters.py -H localhost -p 9160 -i ./mailboxeIdsInput.csv -o ./refreshMailboxCounters.log
Sample Command Line for 8.1.202.10 and later versions of Feature Server:
java -jar jython-standalone-2.7.1b2.jar refreshMailboxCounters.py -H localhost -p 9160 -i ./mailboxeIdsInput.csv -o ./refreshMailboxCounters.log
Run as a scheduled task
If you are using Feature Server version 8.1.202.00 or above then you can schedule the update-mailbox-counters task as described in the Scheduled maintenance tasks page.
