If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > data duplication in page

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-17-03, 23:59
tward3017 tward3017 is offline
Registered User
 
Join Date: Dec 2003
Posts: 5
data duplication in page

When I run this page it gives me duplicates of each information I am wanting. There is something I am missing after moving to the next secytion I get the first requests its when I move on to get the next section wish this forum wouldn't word wrap.
Code below.
<%

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_ASP_ActiveServerPages",,48 )
For Each objItem in colItems
response.write "Caption: " & objItem.Caption
response.write "Description: " & objItem.Description
response.write "Name: " & objItem.Name
response.write "RequestsPerSec: " & objItem.RequestsPerSec & "<BR><BR>"
response.write "RequestsQueued: " & objItem.RequestsQueued & "<BR><BR>"
response.write "SessionDuration: " & objItem.SessionDuration & "<BR><BR>"
response.write "SessionsCurrent: " & objItem.SessionsCurrent & "<BR><BR>"
response.write "SessionsTotal: " & objItem.SessionsTotal & "<BR><BR>"


Next
%>
'Section 2 Drive Freespace
<%
On Error Resume Next
strComputer = "."
'Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk",,48)
For Each objItem2 in colItems


response.write "FreeSpace: " & objItem2.FreeSpace & "<BR><BR>"

Next
%>

'section 3 webservice information

<%
On Error Resume Next
strComputer = "."
'Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_W3SVC_WebService",,48)
For Each objItem3 in colItems
response.write "CurrentConnections: " & objItem3.CurrentConnections & "<BR><BR>"
response.write "ServiceUptime: " & objItem3.ServiceUptime & "<BR><BR>"

Next
%>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On