图3 Throttling and Tracking ASP
<HTML>
<HEAD>
<TITLE>Throttling and Logging CPU</TITLE>
</HEAD>
<BODY>
<%
Dim iisAdminObj
Dim iisDirObj
' Access IIsWebServer object for Development
Set iisAdminObj = GetObject("IIS://localhost/W3SVC/1")
iisAdminObj.CpuAppEnabled = True
' enable throttling
iisAdminObj.CpuLimitsEnabled = True
' change logging
iisAdminObj.CpuEnableKernelTime = True
iisAdminObj.CpuEnableActiveProcs = True
iisAdminObj.CpuEnablePageFaults = True
' save data back to metabase
iisAdminObj.SetInfo
%>
</BODY>
</HTML>