Commonly used commands at work

WBOY
Release: 2016-08-08 09:25:13
Original
964 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template