Log worker process recycle events in IIS 6.0

Source: Internet
Author: User
Tags requires metabase

By default, IIS does not record worker-process recycle events. However, you can enable the specified worker process to recycle event records. Unlike other IIS activities that are recorded at your designated location and file, worker process recycle events are written to the system event log.


Logging worker Process Recycling events helps troubleshoot IIS. For example, when troubleshooting an ISAPI extension that performs a new server support feature Report_unhealthy, you can specify that IIS record each ISAPI self report as an example of a bad state.

The following table describes the worker process recycle events that you can record. To log events, set the corresponding Metabase property to True.

Metabase Property Description
Apppoolrecycletime
Record events with time as the basis for recycling.

Apppoolrecyclerequests
Log events as a recycle base.

Apppoolrecycleschedule
Log events by scheduling as the basis for recycling.

Apppoolrecyclememory
Record events using memory as the basis for recycling.

Apppoolrecycleisapiunhealthy
Because ISAPI reports are in poor state, events are logged when worker processes require recycling.

Apppoolrecycleondemand
Events are logged when the system administrator requires that all the processes in the application area be reclaimed.

Apppoolrecycleconfigchange
If the application assembly area is reclaimed because one of the application assembly properties that requires recycling is changed, the event is logged.

Apppoolrecycleprivatememory
Events are logged if the application assembly area is reclaimed according to private memory.


Important matters
You must be a member of the Administrators group on the local computer to execute the specified code and the execution file. The best security approach is to log on to your computer using an account that is not a Administrators group, and then use the runas command to execute the script or file as a system administrator. In the command prompt character input runas/profile/user:mycomputeradministrator cmd, open the Command window with system administrator privileges, and enter Cscript.exe ScriptName ( Contains the full path of the script and any parameters).
Program
Enable records for worker process recycling
1. Click [Execute] on the [Start] menu.

2. In the [Open] box, type cmd, and then click [OK].

3. Type the following in the command prompt character, and then press the ENTER key. CD%systemroot%inetpubadminscripts

4. Type the following in the command prompt character, and then press the ENTER key. cscript adsutil.vbs set w3svc/apppools/apppoolname/eventname true

Replace AppPoolName with the name of the application assembly area, and replace EventName with the event name you want to record. For example, the following command records the memory-based recycle events of a preset AppPool: csript adsutil.vbs set w3svc/apppools/defaultapppool/apppoolrecylememory true

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.