Brief introduction to Linux system commands and Tomcat maintenance

  

With the Linux system, you can't help but understand the commands in this system. A system command sometimes improves the working efficiency and more convenient for us in the operation process. Therefore, we have to learn a little bit of this knowledge, of course, Tomcat maintenance must also have a certain understanding.

Monitor the CPU average. After SSH to the Linux server, type uptime to display the CPU usage before 1 minute, 5 minutes ago, and 10 minutes before. The closer the value is to 0, the better.

Monitor memory and swap partition usage. After SSH to Linux server, type free-m to display memory and swap partition usage. If memory usage exceeds 90% and swap space usage exceeds 50%, proof There is a problem with the system. (At least there is memory leak phenomenon)

Monitor hard disk usage. After SSH to Linux server, type df-h to view the hard disk usage rate. More than 90% need to clean up useless data and logs in time

Monitor CPU and process CPU and memory usage. After SSH to Linux server, type top-cs to view the allocation of detailed process resources according to CPU and memory usage.

Monitor the number of Apahce connections, SSH to After the Linux server, type ps-ef| Grephttpd| Wc-l can view the Apache at the time, this depends on the Apache connection settings, if it exceeds the setting of 80%, it proves unstable.

PostFix Processing

Health status tail-f/var/log/maillog to view postfix mail server operation.

Start PostFix

servicehttpdstart

servicemysqldstart

servicepostfixstart

servicecourier-authlibstart

servicedovecotstart

servicespamassassinstart

serviceMailScannerstart

servicesaslauthdstart< Br>

Related services required to start the mail service

Restart PostFix

servicehttpdstart

postfixrestart

Do not restart the server, only restart POSTFIX

Tomcat processing method, Tomcat log in the log folder of its installation directory, you can view the Tomcat log query problem.

Close the Tomcat process and type ./shutdown.sh&kill-9$(ps-ef|) in the bin directory of the Tomcat installation directory. Grepjava| Awk'{print$2}') can kill all Tomcat processes, then type ./startup.sh to restart Tomcat

Copyright © Windows knowledge All Rights Reserved