|
Zeroing counters using the utility TrafReset
Q2003
The TrafMeter installation package contains the utility TrafReset, which performs the counter reset using a special communication protocol with the TrafMeter Service. If you run TrafReset without parameters on the command line, you will see the following:
TrafReset version 4.5
Usage: TrafReset hostname password filterid1 filterid2 filterid3 .. |
So, all parameters are passed into TrafReset using the command line:
- 1st parameter - address or DNS name of the host running the TrafMeter Service. You may specify the remote host as well.
- 2nd parameter - password for the TrafMeter service. If you want to use TrafReset, the password in the TrafMeter Service cannot be blank.
- 3rd (4th, 5th and etc) parameter(s) - Id of filters (FilterId) which will be zeroed out. You can specify an unlimited number of FilterId's on the command line. If you want to zero all counters, specify "ALL" instead FilterId.
Example:
TrafReset.exe localhost qwerty ALL |
For the periodic running of TrafReset you should first create a .bat file that will invoke TrafReset with the necessary command line parameters (for example, trafficreset.bat). Secondly, add a scheduled task in the Task Scheduler, which will run the newly created .bat file.
How do I run TrafReset once per day when the user logs in?
See the example VB script "trafreset_once.vbs" in the TrafMeter installation package.
Note
- "Zeroing counters" means resetting to zero only the current values of traffic counters, which you can see in the TrafMeter Administrative Console. This doesn't change any other traffic reports in XML files or in any database.
|