georg           Sun Mar 24 05:53:31 2002 EDT

  Modified files:              
    /phpdoc/en/functions        mysql.xml 
  Log:
  
  documentation for new functions: mysql_stat and mysql_list_processes
  
  
Index: phpdoc/en/functions/mysql.xml
diff -u phpdoc/en/functions/mysql.xml:1.95 phpdoc/en/functions/mysql.xml:1.96
--- phpdoc/en/functions/mysql.xml:1.95  Sat Mar 23 08:53:32 2002
+++ phpdoc/en/functions/mysql.xml       Sun Mar 24 05:53:30 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.95 $ -->
+<!-- $Revision: 1.96 $ -->
  <reference id="ref.mysql">
   <title>MySQL Functions</title>
   <titleabbrev>MySQL</titleabbrev>
@@ -1670,6 +1670,54 @@
    </refsect1>
   </refentry>
 
+  <refentry id="function.mysql-list-processes">
+   <refnamediv>
+    <refname>mysql_list_processes</refname>
+    <refpurpose>List MySQL processes</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+     <methodsynopsis>
+      <type>resource</type><methodname>mysql_list_processes</methodname>
+      <methodparam choice="opt"><type>resource</type><parameter>
+        link_identifier
+       </parameter></methodparam>
+     </methodsynopsis>
+    <para>
+     <function>mysql_list_processes</function> returns a result pointer
+     describing the current server threads. 
+    </para>
+    <para>
+     <example>
+      <title><function>mysql_list_processes</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+$link = mysql_connect('localhost', 'myname', 'secret');
+
+$result = mysql_list_processes($link);
+while ($row = mysql_fetch_row($result)){
+    printf("%s %s %s %s %s\n", $row["Id"], $row["Host"], $row["db"],
+       $row["Command"], $row["Time"]);
+}
+mysql_free_result ($result);
+
+]]>
+      </programlisting>
+      <para>
+       The above example would produce the following output:
+       <screen>
+<![CDATA[
+1 localhost test Processlist 0
+4 localhost mysql sleep 5
+]]>
+       </screen>
+      </para>
+     </example>
+    </para>
+   </refsect1>
+  </refentry>
+
   <refentry id="function.mysql-list-tables">
    <refnamediv>
     <refname>mysql_list_tables</refname>
@@ -2223,6 +2271,51 @@
     </para>
     <para>
      <function>mysql_get_server_info</function> was added in PHP 4.0.5.
+    </para>
+   </refsect1>
+  </refentry>
+
+ <refentry id="function.mysql-stat">
+   <refnamediv>
+    <refname>mysql_stat</refname>
+    <refpurpose>Get current system status</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+     <methodsynopsis>
+      <type>string</type><methodname>mysql_stat</methodname>
+      <methodparam 
+choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
+     </methodsynopsis>
+    <para>
+     <function>mysql_stat</function> returns the current server status.
+    </para>
+    <note>
+     <para>
+     <function>mysql_stat</function> currently only returns status for uptime,
+      threads, queries, open tables, flush tables and queris per second. For a
+      complete list of other status variables you have to use the SHOW STATUS
+      sql command.
+     </para>
+    </note>
+    <para>
+     <example>
+      <title><function>mysql_stat</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+$link = mysql_connect('localhost', $user, "secret");
+printf("%s\n", mysql_stat($link));
+]]>
+      </programlisting>
+      <para>
+       The above example would produce the following output:
+       <screen>
+<![CDATA[
+Uptime: 5380  Threads: 1  Questions: 1321299  Slow queries: 1  Opens: 26 Flush 
+tables: 1  Open tables: 17  Queries per second avg: 245.595
+
+]]>
+       </screen>
+      </para>
+     </example>
     </para>
    </refsect1>
   </refentry>


Reply via email to