ps aux|grep svn Check whether SVN is started
netstat -tln Check the current port status
ps -A | grep nginx Check whether nginx is started
iptables -I INPUT -p tcp --dport 80 -j ACCEPT Add firewall port
/etc/ init.d/iptables status Check the firewall port
ps -aux | grep mysql Check the process
Reset the password!
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(' newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysqld restart
# mysql -u root -p
Enter password:
mysql>
Done!
killall mysqld Kill all processes
Check hard disk usage
df -h
Check memory usage
free -m
Measurement of memory usage
Measure how much memory a process occupies. Linux provides us with a very convenient method, The /proc directory provides us with all the information. In fact, tools such as top also use this to obtain the corresponding information.
/proc/meminfo Machine memory usage information
/proc/pid/maps pid is the process number, showing the virtual address occupied by the current process.
/proc/pid/statm Memory occupied by the process
The above has introduced the commonly used commands in work, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.