Microsoft Operations Manager

ProcessPrevDaysLog Method

The ProcessPrevDaysLogmethod reads and summarizes the previous day's MTA log.

[VBScript]
MTALogAnalyzer.ProcessPrevDaysLog()

Parameters

None

Return Value

Variant

Examples

The following example shows how to get the previous day's top 100 SMTP Out Sender log summary results for 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.ProcessPrevDaysLog() 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

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

MTALogAnalyzer Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.