linux 查看服务状态(linux查看服务的状态)

linux

如何在Linux下查看服务的运行情况?

可以在Linux下输入命令:

1、$service sshd status

2、#service servicename status是当前状态

3、#chkconfig –list servicename是查看启动状态,也就是是否开机自动启动 注: 1、如果service和chkconfig 找不到,可以试试/sbin/service和/sbin/chkconfig 2、如果用ubuntu好像是要用/etc/init.d/servicename status查看当前状态 (servicename就是你要查的服务名)

如何判断linuxDHCP服务器状态/关闭/开启命令?

1. 查看是否设置开机启动

chkconfig –list | grep dhcpd

2. 查看端口是否打开

netstat -anulp | grep :67

3.查看服务状态

/etc/

init.d/dhcpd

status

【查看是否运行dhcp服务: ps aux | grep dhcp |grep -v grep 】

4:关闭 dhcpd

/etc/

init.d/dhcpd

stop

5:开启 hdcpd

/etc/

init.d/dhcpd

start

Linux怎么检查web服务器状态?

通过查看进程是否存在,命令ps -ef grep tomcat可以查看服务,如果服务已启动会显示有对应路径的信息,也可以通过status查看 php status

linux怎么查看一个服务是否开启?

1、ps aux 或netstat -tlunp ps是进程查看命令

netstat是端口查看命令

在Linux系统中,服务一定是有进程的,所以使用ps命令可以查看服务运行情况。

另外,Linux服务多数是网络服务,所以通过netstat命令也可以查看服务运行状态。

2、service 服务名 status

比如查看httpd的Web服务的运行状态,执行service httpd status,

3、/sbin/service –status-all |grep “服务名”

比如查看httpd的web服务

执行 /sbin/service –status-all |grep “httpd”即可。

4、chkconfig –list

比如查看httpd的web服务

执行 chkconfig –list |grep “httpd”即可。

1

友好的显示所有服务的运行状态:

service –status-all

chkconfig –list

2

查看单个服务的运行状态

service sshd status

3

查看启动状态,是否开机自动启动

chkconfig –list servicename

开机

1:单用户模式

2:多用户模式,不具有网络档案系统(NFS)功能

3:多用户模式,具有网络档案系统(NFS)功能

4:某些发行版linux用这个等级进入 X windows 系统

5:同4

6:重新启动

注意:切记无用1和6

关闭或开启服务状态:

chkconfig –level 345 nscd off/on

4

增加服务:

chkconfig –add xxx

( 注意:服务脚本必须存放在 /etc/init.d/目录下)

如mysqld

#cp support-files/mysql.server etc/init.d/mysqld

chkconfig mysqld on (各等级为ON,各等级为2345等级)

这样就会以系统服务的形式启动了

删除服务:

chkconfig –del XXX

runlevel 查看当前等级。

注意:运行级别就是操作系统正在运行的功能级别。

linux怎么查看服务是否运行?

可以在Linux下输入命令:

1、$servicesshdstatus2、#serviceservicenamestatus是当前状态3、#chkconfig–listservicename是查看启动状态,也就是是否开机自动启动注:

1、如果service和chkconfig找不到,可以试试/sbin/service和/sbin/chkconfig2、如果用ubuntu好像是要用/etc/init.d/servicenamestatus查看当前状态(servicename就是你要查的服务名)扩展资料:查看某项服务当前启动状态的其他方式一、利用进程来查看 命令里ps-aux|grepxxx是查看某个进程或者服务是否存在。

二、利用services命令 1、查看单个服务的运行状态:service服务名status 如:#servicesshdstatus openssh-daemon(pid3701)正在运行…

2、查看所有服务的运行状态: service–status-all

Published by

风君子

独自遨游何稽首 揭天掀地慰生平