首先查看服务是否启动
<pre name="code" class="html">[[email protected] etc]# ps -ef | grep nagios nagios 3256 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3258 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3261 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3264 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3265 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3266 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3270 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3276 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3355 1 0 Mar21 ? 00:00:06 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg nagios 9952 1 0 00:37 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
[[email protected] etc]# netstat -lntActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:747 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:715
0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:784 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:47614 0.0.0.0:* LISTEN tcp 0 0 :::80 :::* LISTEN tcp 0 0 :::22 :::* LISTEN
[[email protected] etc]# lsof -i tcp:5666COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnrpe 9952 nagios 4u IPv4 66781 0t0 TCP *:5666 (LISTEN)
杀掉进程前:查看ps -ef|grep nagios 来记住里面的启动命令
<pre name="code" class="html">[[email protected] etc]# ps -ef | grep nagios nagios 3256 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3258 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3261 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3264 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3265 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3266 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3270 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3276 3197 0 Mar21 ? 00:00:00 /usr/sbin/httpd nagios 3355 1 0 Mar21 ? 00:00:06 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg nagios 9952 1 0 00:37 ? 00:00:00<span style="color:#ff0000;"> /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d</span>
然后在杀掉进程
pkill nrpe
时间: 2024-10-15 03:17:48