[root@db init.d]# service [service name] (start|stop|restart|status|...)
service name:就是服务名,需与/etc/init.d/目录下面的应用程序对应。
--显示出目前系统上面所有服务的运行状态
- [root@db init.d]# service --status-all
- acpid (pid 1900) is running...
- anacron is stopped
- atd (pid 2205) is running...
- auditd (pid 1617) is running...
- automount (pid 1989) is running...
- Avahi daemon is running
- Avahi DNS daemon is not running
- hcid (pid 1811) is running...
- sdpd (pid 1817) is running...
- capi not installed - No such file or directory (2)
- conmand is stopped
- cpuspeed is stopped
- crond (pid 2138) is running...
- cupsd (pid 2058) is running...
- ... ...
----------------------------------------------------------------------------
netstat -[atunlp]
-a 将目前系统上所有的连接、监听、Socket数据都列出来;
-t 列出tcp网络数据包的数据;
-u 列出udp网络数据包的数据;
-n 不列出进程的服务名称,以端口号来显示;
-l 列出目前正在网络坚挺的服务;
-p 列出该网络服务的进程PID。
例如:
- [root@linux ~]# netstat -anp | grep 1521
- tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 2542/tnslsnr
- tcp 0 0 127.0.0.1:31115 127.0.0.1:1521 ESTABLISHED 2550/ora_pmon_orcl
- tcp 0 0 127.0.0.1:1521 127.0.0.1:31115 ESTABLISHED 2542/tnslsnr
- [root@linux ~]# netstat -an | grep 1521
- tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN
- tcp 0 0 127.0.0.1:31115 127.0.0.1:1521 ESTABLISHED
- tcp 0 0 127.0.0.1:1521 127.0.0.1:31115 ESTABLISHED
Linux命令:free & df & du !Linux下面开起启动服务命令(chkconfig、ntsysv)相关资讯 Linux命令
- 48 字节命令可令 Linux 系统当机! (今 07:55)
- 在Linux笔记本上执行这句命令能致 (02月02日)
- .NET开发必会的Linux命令 (12/20/2015 10:32:03)
| - 运维工程师必会的109个Linux命令 (03月09日)
- 有趣的Linux命令行:随机输出唐诗 (12/28/2015 20:14:23)
- 10 个 Linux 中的 passwd 命令示例 (10/29/2015 10:14:30)
|
本文评论 查看全部评论 (0)