ApplicationPool.Cpu Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets CPU usage parameters for the current application pool.
public:
property Microsoft::Web::Administration::ApplicationPoolCpu ^ Cpu { Microsoft::Web::Administration::ApplicationPoolCpu ^ get(); };
public Microsoft.Web.Administration.ApplicationPoolCpu Cpu { get; }
member this.Cpu : Microsoft.Web.Administration.ApplicationPoolCpu
Public ReadOnly Property Cpu As ApplicationPoolCpu
Property Value
An ApplicationPoolCpu object that contains CPU usage parameters.
Examples
The following example checks the value of the Microsoft.Web.Administration.ApplicationPoolCpu.Limit property. If the property is set to a value greater than 25, the example resets the value to 25. This code example is part of a larger example provided for the ApplicationPool class.
// Set the CPU limit to a maximum of 25.
if (applicationPool.Cpu.Limit > 25)
{
applicationPool.Cpu.Limit = 25;
}
Remarks
You can use the properties and methods of the object returned by this property to configure CPU usage parameters for the current application pool. To set default values for all application pools on the server, use the ApplicationPoolDefaults object.
Note
The property values of the ApplicationPoolCpu object will not be written to the ApplicationHost.config file until the Microsoft.Web.Administration.ServerManager.CommitChanges method is called.