Существует timelimit:/usr/bin/timelimit - эффективно ограничивают абсолютное время выполнения процесса
Options:
-p If the child process is terminated by a signal, timelimit
propagates this condition, i.e. sends the same signal to itself.
This allows the program executing timelimit to determine
whether the child process was terminated by a signal or
actually exited with an exit code larger than 128.
-q Quiet operation - timelimit does not output diagnostic
messages about signals sent to the child process.
-S killsig
Specify the number of the signal to be sent to the
process killtime seconds after warntime has expired.
Defaults to 9 (SIGKILL).
-s warnsig
Specify the number of the signal to be sent to the
process warntime seconds after it has been started.
Defaults to 15 (SIGTERM).
-T killtime
Specify the maximum execution time of the process before
sending killsig after warnsig has been sent. Defaults to 120 seconds.
-t warntime
Specify the maximum execution time of the process in
seconds before sending warnsig. Defaults to 3600 seconds.
On systems that support the setitimer(2) system call, the
warntime and killtime values may be specified in fractional
seconds with microsecond precision.
Два варианта, которые приходят мне на ум:
yum info httpd
проверьте вывод, установлен ли он или нет, вы получите что-то вроде:
[0 1003 12:18:33] ~ % yum info httpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.halifax.rwth-aachen.de
* extras: ftp.rrzn.uni-hannover.de
* remi: mirror5.layerjet.com
* remi-php56: mirror5.layerjet.com
* remi-safe: mirror5.layerjet.com
* updates: ftp.halifax.rwth-aachen.de
Installed Packages
Name : httpd
Arch : x86_64
Version : 2.2.15
Release : 47.el6.centos
Size : 2.9 M
Repo : installed
From repo : updates
Summary : Apache HTTP Server
URL : http://httpd.apache.org/
License : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
: web server.
или
rpm -qf /etc/httpd
посмотреть, не считает ли какой-нибудь пакет ответственным за каталог с конфигом httpd - на CentOS6 вы получите
[0 1001 12:12:46] ~ % rpm -qf /etc/httpd
httpd-2.2.15-47.el6.centos.x86_64
(и самый простой последний вариант, на RH/CentOS принято, что конфиг живет в /etc/httpd/
, так что само его присутствие может быть индикатором. )
Самый простой подход — вызвать httpd, скажем, проверив версию:
httpd -V