简体   繁体   中英

GET IIS detail in Classic ASP

I have been looking a function in Classic ASP. So When the page is loaded, it will show the following information: - Active application pool name: (if possible should show the active IIS application pool name for example.com) - Private bytes in use: (should show the private bytes for the active application pool) - Virtual bytes in use: (should show the virtual bytes for the active application pool)

Thanks, Ravi

There is no function in classic ASP which can provide you this. However you can use WMI providers for IIS and call them from your classic ASP page.

From this article, we know that:

IIS 7 lists worker processes with associated application pool names, and provides the following information for each worker process:

  • Application Pool Name . The name of the application pool. In the case of Web gardens, the same application pool may be listed more than once in the grid to account for different worker processes running in the application pool.

  • Process ID . The worker process identifier (ID) associated with the application pool.

  • State . The state of the process, such as starting, running, or stopping.

  • CPU % . The percentage of time that the worker process has used the CPU since last update. This corresponds to CPU Usage in Task Manager.

  • Private Bytes (KB) . The current size of memory committed to a worker process, which cannot be shared with other processes. This corresponds to Virtual Memory Size in Windows Task Manager.

  • Virtual Bytes (KB) . The current size of the virtual address space for a worker process. This does not correspond to anything in Windows Task Manager.

NOTE : This requires the RequestMonitorModule to be installed

You will need to use the following WMI classes:

Refer this link on how to get started on calling WMI in an ASP page:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM