How to check whether specified PID is currently running without invoking ps from PHP?

后端 未结 9 1874
时光说笑
时光说笑 2020-12-15 03:29

We would like to check if a specified process is currently running via PHP.

We would like to simply supply a PID and see if it is currently executing or not.

9条回答
  •  遥遥无期
    2020-12-15 04:10

    i have done a script for this, which im using in wordpress to show game-server status, but this will work with all running process on the server

     1) {
                            echo "$string: RUNNING
    "; } else { echo "$string: DOWN
    "; } } } //Beispiel "Text zum anzeigen", "Prozess Name auf dem Server" server_status("Running With Rifles","rwr_server"); server_status("Starbound","starbound_server"); server_status("Minecraft","minecarf"); ?>

    more information here http://umbru.ch/?p=328

提交回复
热议问题