The Dialstats script below works when it set to DATA but when it has TELNET the results are always zero. Should dialstats work for TELNET? I was looking to use the data in the connection log for trending and tracking. At this time I'm using "execute" in several scripts to write the date, time, $dialconnect, and $scriptname into a .txt file.
proc main
long LastConn ; Last connection.
long TotalConn ; Total connect time.
long TotalCalls ; Total number of connects.
integer NumEnts ; Number of directory entries.
integer Count ; Used to loop through entries.
string DirEntry ; Name of directory entry.
string LastTime ; Last connect as string.
dialcount DATA NumEnts ; Get number of entries.
for Count = 1 upto NumEnts ; Loop through entries.
dialname DATA Count DirEntry ; Get name of entry.
dialstats DirEntry LastConn TotalConn TotalCalls
ltimestring LastConn LastTime
usermsg "Last Connect: %s" LastTime
dialstats DirEntry CLEAR ; Clear the entry's stats.
endfor
endproc
proc main
long LastConn ; Last connection.
long TotalConn ; Total connect time.
long TotalCalls ; Total number of connects.
integer NumEnts ; Number of directory entries.
integer Count ; Used to loop through entries.
string DirEntry ; Name of directory entry.
string LastTime ; Last connect as string.
dialcount DATA NumEnts ; Get number of entries.
for Count = 1 upto NumEnts ; Loop through entries.
dialname DATA Count DirEntry ; Get name of entry.
dialstats DirEntry LastConn TotalConn TotalCalls
ltimestring LastConn LastTime
usermsg "Last Connect: %s" LastTime
dialstats DirEntry CLEAR ; Clear the entry's stats.
endfor
endproc