Microsoft Operations Manager |
The ProcessLogFileNamemethod reads and summarizes an MTA log specified by file name.
[VBScript]
MTALogAnalyzer.ProcessLogFileName(MTALogFileName Variant)
Variant
The following example shows how to get the MTA log's top 100 SMTP Out Sender log summary results for the C:\Exchange\tracking.log\19991231.log log file from the EXCHSERVER1 Exchange server using the Someone mailbox.
[VBScript]
Const PI_MTA_SMTP_OUT_SENDER = 1001
Dim objMTALogAnalyzer, vntData
Dim lngRowCount, lngIndex, lngMsgCount, lngMB
Dim strError
Set objMTALogAnalyzer = CreateObject("McExchg.MTALogAnalyzer")
If objMTALogAnalyzer.LogonToMAPI("EXCHSERVER1", "Someone") Then
If
objMTALogAnalyzer.ProcessLogFileName("C:\Exchange\tracking.log\19991231.log")
Then
If objMTALogAnalyzer.LogSummary(PI_MTA_SMTP_OUT_SENDER,
vntData, lngRowCount, 100) Then
For lngIndex = 0 to lngRowCount - 1
strObject = vntData(0, lngIndex)
lngMsgCount = vntData(1, lngIndex)
lngMB = vntData(2, lngIndex)
' Do something with summary information
Next
Else
strError = objMTALogAnalyzer.GetError()
End If
Else
strError = objMTALogAnalyzer.GetError()
End If
Else
strError = objMTALogAnalyzer.GetError()
End If
Set objMTALogAnalyzer = Nothing
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.