Page tree
For cPanel & WHM version 82.

Skip to end of metadata
Go to start of metadata


In some rare cases, a long process may hang indefinitely and be difficult for system administrators to detect. The /usr/local/cpanel/bin/is_script_stuck script checks how long a script's current PID has run, and can notify a WHM user or kill the process.

For example, if you experience problems with hung backup processes, you could use this script in a cron job to monitor backup processes.

Run the /usr/local/cpanel/bin/is_script_stuck script

To run the /usr/local/cpanel/bin/is_script_stuck script on the command line, use the following format:

/usr/local/cpanel/bin/is_script_stuck [options]


You can use the following options with this script:


The absolute path to the script that you wish to check.


This option is required, unless you instead use the --help option.


The amount of time that the specified script can run before the /usr/local/cpanel/bin/is_script_stuck script determines that it is stuck.

You can append one of the following units of measure:

  • d — Days.
  • h — Hours.
  • m — Minutes.
  • s — Seconds.

If you do not append a unit of measure, the script treats this value as a number of seconds. For example, specify --time=60 for 60 seconds, or --time=4d for four days.


This option is required, unless you instead use the --help option.

--notifyThe WHM username to which you wish to send a notification of the script's results.--notify=root
--killUse this option if you want the script to stop (kill) the specified script if it runs longer than the specified time.--kill
--helpPrint help information for the /usr/local/cpanel/bin/is_script_stuck script.--help

Additional documentation