setproctitle(3) [php man page]
SETPROCTITLE(3) 1 SETPROCTITLE(3) setproctitle - Set the process title SYNOPSIS
void setproctitle (string $title) DESCRIPTION
Sets the process title of the current process. PARAMETERS
o $title - The title to use as the process title. RETURN VALUES
No value is returned. EXAMPLES
Example #1 setproctitle(3) example Running the example below will change the process title (visible with ps a for example). <?php setproctitle("myscript"); ?> The above example will output something similar to: $ ps a PID TTY STAT TIME COMMAND 1168 pts/3 S 0:00 myscript SEE ALSO
cli_set_process_title(3), pcntl_fork(3), setthreadtitle(3). PHP Documentation Group SETPROCTITLE(3)
Check Out this Related Man Page
CLI_SET_PROCESS_TITLE(3) 1 CLI_SET_PROCESS_TITLE(3) cli_set_process_title - Sets the process title SYNOPSIS
bool cli_set_process_title (string $title) DESCRIPTION
Sets the process title visible in tools such as top and ps. This function is available only in CLI mode. PARAMETERS
o $title - The new title. RETURN VALUES
Returns TRUE on success or FALSE on failure. ERRORS
/EXCEPTIONS An E_WARNING will be generated if the operating system is unsupported. EXAMPLES
Example #1 cli_set_process_title(3) example <?php $title = "My Amazing PHP Script"; $pid = getmypid(); // you can use this to see your process title in ps if (!cli_set_process_title($title)) { echo "Unable to set process title for PID $pid... "; exit(1); } else { echo "The process title '$title' for PID $pid has been set for your process! "; sleep(5); } ?> SEE ALSO
cli_get_process_title(3), setproctitle(3). PHP Documentation Group CLI_SET_PROCESS_TITLE(3)