我建议你还是查查病毒吧~·!作者: coolglay 时间: 2007-7-13 16:59
病毒肯定是查过的啦,我首先是排除掉病毒这个问题啦~进程监控我也查过了,没木马,没病毒。作者: 我俩相爱 时间: 2007-7-13 17:00
我帮顶,我以前也有这样的情况出现,跟邮件量大有点关系。有个软件可以监测25,110,80等端口的,至于是什么软件忘记了。你不防可以搜索下这方面的软件。但达不到重启服务(你写的是进程)的要求啊。作者: yiwang_xiaojia 时间: 2007-7-23 15:26
我写了个脚本 可以监控25 110 的状况,但是就不知道怎样获取“待发邮件数”,
有谁知道WinWebMail 的 adminmsg 目录下的statistics.txt文件中的各个数值的意思?
'Dim Path, LogFile
Path = "D:\test\"
LogFile = Date & "_Port.htm"
Function strText(Text, style)
Set regEx = New RegExp
regEx.Global = True
regEx.IgnoreCase= True
regEx.Pattern = "CLOSE_WAIT"
If regEx.Test(text) Then
Select Case style
Case "SMTP"
strText = "<td>25 端口 CLOSE_WAIT</td>"
Case "POP3"
strText = "<td>110端口 CLOSE_WAIT</td></tr>"
End Select
Else
Select Case style
Case "SMTP"
strText = "<td>25 端口正常</td>"
Case "POP3"
strText = "<td>110端口正常</td></tr>"
End Select
End If
End Function
strComputer= "."
Set objSWbemServices = GetObject("Winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetwork = objSWbemServices.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objNetworkConf in colNetwork
If Not IsNull(objNetworkConf.IPAddress) And Not IsNull(objNetworkConf.DefaultIPGateway) And Not IsNull(objNetworkConf.DNSServerSearchOrder) Then
IPPortSMTP = objNetworkConf.IPAddress(0) & ":25 "
IPPortPOP3 = objNetworkConf.IPAddress(0) & ":110 "
End If
Next
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objStartup = objSWbemServices.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = 12
Set objProc = objSWbemServices.Get("Win32_Process")
dtmTime = "<tr><td>" & Time & "</td>"
objProc.Create "cmd /c Netstat -n |Find """ & IPPortSMTP & """ > " & Path & "PortTemp.txt", Null, objConfig, pingPID
Set colProcess = objSWbemServices.ExecNotificationQuery("Select * From __InstanceDeletionEvent WithIn 1 Where TargetInstance ISA 'Win32_Process'")
Do Until c = 999
Set objProErr = colProcess.NextEvent
If objProErr.TargetInstance.ProcessID = pingPID Then
Exit Do
End If
Loop
Set tf1 = FSO.OpenTextFile(Path & "PortTemp.txt", 1)
Do Until tf1.AtEndOfStream
strNextLine1 = tf1.ReadLine
If Len(strNextLine1) > 0 Then
strLine1 = strNextLine1
End If
Loop
tf1.Close
SMTP = strText(strLine1, "SMTP")
objProc.Create "cmd /c Netstat -n |Find """ & IPPortPOP3 & """ > " & Path & "PortTemp.txt", Null, objConfig, pingPID
Set colProcess = objSWbemServices.ExecNotificationQuery("Select * From __InstanceDeletionEvent Within 1 Where TargetInstance ISA 'Win32_Process'")
Do Until c = 999
Set objProErr = colProcess.NextEvent
If objProErr.TargetInstance.ProcessID = pingPID Then
Exit Do
End If
Loop
Set tf2 = FSO.OpenTextFile(Path & "PortTemp.txt", 1)
Do Until tf2.AtEndOfStream
strNextLine2 = tf2.ReadLine
If Len(strNextLine2) > 0 Then
strLine2 = strNextLine2
End If
Loop
tf2.Close
POP3 = strText(strLine2, "POP3")
On Error Resume Next
Set tf3 = fso.CreateTextFile(Path & LogFile, False)
ErrNumber = Err.Number
tf3.WriteLine "<html><head><style><!--body,td{ font-family: 宋体; font-size: 9pt }--></style></head><body topmargin=0 leftmargin=0></b><table border cellspacing=0.1><tr><td>时间</td><td>端口25状态</td><td>端口110状态</td></tr>"
tf3.WriteLine dtmTime & SMTP & POP3
tf3.Close
On Error GoTo 0
If ErrNumber = 58 Then
Set tf4 = fso.OpenTextFile(Path & LogFile, 8)
tf4.WriteLine dtmTime & SMTP & POP3
tf4.Close
End If作者: coolglay 时间: 2007-7-24 09:39
谢谢楼上的老大写代码,可是啥用?好像不是ASP的吧,你是用VB写的?好像没看到代码中有重启WWM服务的代码噢,小弟不才,等你写好发布。作者: hubinjsj991 时间: 2007-7-24 09:40
我也常出现这样的问题.一两天就要重启一下服务器作者: rayer 时间: 2007-7-24 15:24
貌似装瑞星的有这问题.作者: coolglay 时间: 2007-7-24 15:45
我用的是MF 8.0和8.5都试了,一样会出现!