Linux笔记

2018-01-11  本文已影响0人  John13

参考文档:
linux性能瓶颈排查
Shell编程入门

1、重启机器:

reboot
shutdown -r now
shutdown -r 10 (10分钟后)
shutdown -r 20:35

2、 关机:

halt
poweroff
shutdown -h now
shutdown -h 10 (10分钟后)

3、防火墙管理:

永久关:chkconfig iptables off
开机启动:chkconfig iptables on
开:chkconfig iptables start
关:chkconfig iptables stop
重启:service iptables restart
查看状态:service iptables status

4、查看文件信息:

ls -lh [file_name]
file [file_name]
stat [file_name]

5、查看程序,删除:

rpm -qa | grep [jdk]
yum -y remove [java]

6、进程、磁盘管理:

1、查看是否服务在运行:ps -ef | grep tomcat

2、彻底杀死进程:kill -9 [pid]

3、查看指定端口的进程:netstat -anp | grep [port]

4、查看磁盘空间:df -lh [/usr/local]

查看已使用空间:du -h [/usr]

5、性能分析,查看内存使用情况:top -s

查看进程信息:top -s |grep [java]

上一篇 下一篇

猜你喜欢

热点阅读