<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >win32ps Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="函数参考" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="wddx_unserialize" HREF="function.wddx-unserialize.html"><LINK REL="NEXT" TITLE="win32_ps_list_procs" HREF="function.win32-ps-list-procs.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.wddx-unserialize.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.win32-ps-list-procs.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.win32ps" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CLXXV. win32ps Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN238477" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="win32ps.intro" >简介</A ></H1 ><P > The win32ps extension is a Windows specific extension that allows PHP retrieve statistics about process and memory utilization. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="win32ps.requirements" >需求</A ></H1 ><P > Windows NT, Windows 2000, Windows XP or Windows Server 2003. Any version of Windows derived from Windows NT should be compatible. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="win32ps.install" >安装</A ></H1 ><DIV CLASS="procedure" ><P ><B ><A NAME="win32ps.install-from-pecl" ></A >Installing from PECL</B ></P ><OL TYPE="1" ><LI CLASS="step" ><P > You can download php_win32ps.dll from <A HREF="http://pecl4win.php.net/" TARGET="_top" >pecl4win.php.net</A >. </P ></LI ><LI CLASS="step" ><P > Copy the php_win32ps.dll into your <A HREF="ini.core.html#ini.extension-dir" >extension_dir</A >. </P ></LI ><LI CLASS="step" ><P > Load the extension from your <TT CLASS="filename" >php.ini</TT > <TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="screen" >extension=php_win32ps.dll</PRE ></TD ></TR ></TABLE > </P ></LI ></OL ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="win32ps.examples" >范例</A ></H1 ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN238501" ></A ><P ><B >例 1. Statistics about the current PHP process</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><font color="#000000"> <font color="#0000BB"><?php<br />print_r</font><font color="#007700">(</font><font color="#0000BB">win32_ps_stat_proc</font><font color="#007700">());<br /></font><font color="#FF8000">/*<br /> Array<br /> (<br /> [pid] => 936<br /> [exe] => D:\Daten\Source\php-5.1\Debug_TS\php.exe<br /> [mem] => Array<br /> (<br /> [page_fault_count] => 2062<br /> [peak_working_set_size] => 8396800<br /> [working_set_size] => 8396800<br /> [quota_peak_paged_pool_usage] => 32080<br /> [quota_paged_pool_usage] => 31876<br /> [quota_peak_non_paged_pool_usage] => 4240<br /> [quota_non_paged_pool_usage] => 3888<br /> [pagefile_usage] => 5865472<br /> [peak_pagefile_usage] => 5865472<br /> )<br /><br /> [tms] => Array<br /> (<br /> [created] => 0.093<br /> [kernel] => 0.015<br /> [user] => 0.062<br /> )<br /><br /> )<br />*/<br /></font><font color="#0000BB">?></font> </font> </code></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN238505" ></A ><P ><B >例 2. Statistics about global memory utilization</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><font color="#000000"> <font color="#0000BB"><?php<br />print_r</font><font color="#007700">(</font><font color="#0000BB">win32_ps_stat_mem</font><font color="#007700">());<br /></font><font color="#FF8000">/*<br /> Array<br /> (<br /> [load] => 37<br /> [unit] => 1024<br /> [total_phys] => 1048096<br /> [avail_phys] => 649960<br /> [total_pagefile] => 2521368<br /> [avail_pagefile] => 2237940<br /> [total_virtual] => 2097024<br /> [avail_virtual] => 2057848<br /> )<br />*/<br /></font><font color="#0000BB">?></font> </font> </code></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >目录</B ></DT ><DT ><A HREF="function.win32-ps-list-procs.html" >win32_ps_list_procs</A > -- List running processes</DT ><DT ><A HREF="function.win32-ps-stat-mem.html" >win32_ps_stat_mem</A > -- Stat memory utilization</DT ><DT ><A HREF="function.win32-ps-stat-proc.html" >win32_ps_stat_proc</A > -- Stat process</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.wddx-unserialize.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.win32-ps-list-procs.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >wddx_unserialize</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >win32_ps_list_procs</TD ></TR ></TABLE ></DIV ></BODY ></HTML >