Common commands at work

Source: Internet
Author: User
: This article mainly introduces common commands at work. For more information about PHP tutorials, see. Ps aux | grep svn check whether SVN is started
Netstat-tln check 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 view firewall Port
Ps-aux | grep mysql viewing process
Change 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 kills all processes
View hard disk usage
Df-h
View memory usage
Free-m
Memory usage measurement
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, the top tool also obtains the corresponding information here.
/Proc/meminfo memory usage information of the machine
/Proc/pid/maps pid is the process number and displays the virtual address occupied by the current process.
Memory occupied by/proc/pid/statm process

The above describes common commands at work, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.