--- projects/cms/source/host/winhost/nettest.frm 2001/02/26 09:12:51 1.20 +++ projects/cms/source/host/winhost/nettest.frm 2001/02/26 09:54:25 1.23 @@ -159,17 +159,30 @@ Dim TCPUpdateTime As Integer Dim protocolVersion As String Dim connected As Boolean -'Dim CUpTime As New CUpTime +Dim CUpTime As New CUpTime Dim responseNumber As Integer Private Sub Form_Load() + If App.PrevInstance Then + x = MsgBox("There is already an i-scream Winhost running on this machine.", 48, "i-scream host already running") + End If + protocolVersion = "1.1" Status.Caption = "Loading" - 'Form1.Caption = "i-scream Winhost " & protocolVersion & " for " & GetVersion() + Form1.Caption = "i-scream Winhost " & protocolVersion + Form1.Show + + CUpTime.Init + + If CUpTime.isWin9x Then + x = MsgBox("Sorry, the i-scream host can only be used to monitor servers (i.e. not Win9x)", 48, "Not a server.") + End + End If + ''''TEMP 'filterManagerHostname = "killigrew.ukc.ac.uk" 'filterManagerTCPPort = 4567 @@ -370,7 +383,7 @@ Private Sub Timer1_Timer() End End If - osName = getVersion() + osName = GetVersion() osVersionMajor = verinfo.dwMajorVersion osVersionMinor = verinfo.dwMinorVersion osBuild = verinfo.dwBuildNumber @@ -406,6 +419,10 @@ Private Sub Timer1_Timer() uptime = GetTickCount \ 1000 + CUpTime.Capture + cpu_time = CUpTime.CPUTime + percent_idle = CUpTime.PercentIdle + ' build the contents of the XML packet xml = "" & _ "" & _ @@ -417,6 +434,7 @@ Private Sub Timer1_Timer() "" & processorType & "" & _ "" & uptime & "" & _ "" & _ + "" & percent_idle & "" & cpu_time & "" & _ "" & memTotal & "" & memFree & "" & _ "" & swapTotal & "" & swapFree & "" & _ ""