PHP Doku:: List running processes - function.win32-ps-list-procs.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzWindowsbasierte Erweiterungenwin32pswin32ps Funktionenwin32_ps_list_procs

Ein Service von Reinhard Neidl - Webprogrammierung.

win32ps Funktionen

<<win32ps Funktionen

win32_ps_stat_mem>>

win32_ps_list_procs

(PECL win32ps >= 1.0.1)

win32_ps_list_procsList running processes

Beschreibung

array win32_ps_list_procs ( void )

Retrieves statistics about all running processes.

Rückgabewerte

Returns FALSE on failure, or an array consisting of process statistics like win32_ps_stat_proc() returns for all running processes on success.

Siehe auch


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
cf at chronofish dot com
10.09.2007 20:27
For those of you in the WAMP environment, here is a little function that you may find handy:

<?
function kill_proc($processName)
{
    @
$processList = win32_ps_list_procs();
    foreach (
$processList as $processArray)
    {
       
$pid = $processArray['pid'];
        if (
basename($processArray['exe']) == $processName)
        {           
            `
taskkill /f /PID $pid 2>&1`;                   
        }
    }
}
?>

-CF



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)