اين موضوع به همين صورت در راهنمای خود NTTacPlus هم ذکر شده.
نقل از صفحه 81 راهنما:
Running a customized post-accounting script Section
Parameter | Value | Accounting
Run the following post accounting external script
It enables the execution of an external script when an accounting message is received from the NAS
You can configure NTTacPlus to execute a script or an external application when an accounting message is received from the NAS. This feature can extend accounting capabilities according to fully customized procedures.
NOTE: This setting operates at a global level and not on a per-user basis, as it happens for the post-authentication scripts.
From the command line you can issue commands or scripts to which you can pass the following macros as command line parameters:
Macro | Value
$user : Username
$nas: NAS IP address or name
$port : Port/Interface
$clid : Caller ID
$addr : Network Address
$priv : Privilege level
$type : Accounting record type (= START, STOP or UPDATE)
$taskid : Session ID
$elapsed : Elapsed time (in seconds), calculated by the NAS and not by NTTacPlus
$bytesin : Input Bytes
$bytesout : Output Bytes
$paksin : Input packets
$paksout : Output packets
Any value returned by the script is ignored.
Post-accounting (useless) script example
Command line configured in the Options window:
cmd.exe /c c:\nttacplus2\external\foolacct.bat $user $type
content of the script file foolacct.bat
@echo off
if not "%1"=="albert" goto exit_foolacct_bat
if "%2"=="START" goto is_start
if "%2"=="STOP" goto is_stop
goto exit_foolacct_bat
:is_start
net send david "Hey, Albert is logging on!"
goto exit_foolacct_bat
:is_stop
net send david "Hey, Albert is logging off!"
:exit_foolacct_bat