Linux常用命令
in 服务器 with 0 comment

Linux常用命令

in 服务器 with 0 comment

个人常用命令记录

防火墙

systemctl status firewalld
systemctl start firewalld
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

端口

netstat -ntulp |grep 80

进程

ps aux | grep java
ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head
ps aux|head -1;ps aux|grep -v PID|sort -rn -k +4|head

系统

cat /proc/cpuinfo |grep "physical id"|sort|uniq|wc -l
cat /proc/cpuinfo |grep "cpu cores"|uniq|wc -l
cat /proc/cpuinfo |grep "processor"|wc -l

mongodb

./mongo host:port/database -u "user" -p "password"
Responses