linux怎样查看 某项服务 当前启动状态
可以在Linux下输入命令:1、$service sshd status2、#service servicename status是当前状态3、#chkconfig --list servicename是查看启动状态,也就是是否开机自动启动注:1、如果service和chkconfig 找不到,可以试试/sbin/service和/sbin/chkconfig2、如果用ubuntu好像是要用/etc/init.d/servicename status查看当前状态(servicename就是你要查的服务名)扩展资料:查看某项服务当前启动状态的其他方式一、利用进程来查看 命令里 ps -aux | grep xxx 是查看某个进程或者服务是否存在。 二、利用services命令 1、查看单个服务的运行状态: service 服务名 status 如:[root@localhost ~]# service sshd status openssh-daemon (pid 3701) 正在运行? 2、查看所有服务的运行状态: service _status -all
如何查看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"即可。如下图所示。

