June 2019
« May    


WordPress Quotes

The truth is that there is nothing noble in being superior to somebody else. The only real nobility is in being superior to your former self.
Whitney Young
June 2019
« May    

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (34)
Ansibile (19)
Apache (133)
Asterisk (2)
cassandra (2)
Centos (210)
Centos RHEL 7 (265)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (1)
horoscope (23)
Hyper-V (10)
IIS (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (3)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (34)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

18 visitors online now
0 guests, 18 bots, 0 members

Hit Counter provided by dental implants orange county

Tomcat log automatic deletion implementation

Tomcat log automatic deletion implementation


In the production environment, Tomcat generates a lot of logs every day. If you don’t clean up the disk capacity, it will be enough. Manual cleaning is too much trouble. Therefore, write a script to delete the log files 5 days ago (depending on the actual situation).

Writing […]

Tomcat log cutting script

time=$(date +%H) end_time=`expr $time – 2`a=$end_timeBF_TIME=$(date +%Y%m%d)_$a:00-$time:00cp /usr/local/tomcat8/logs/catalina.out /var/log/tomcat/oldlog/catalina.$BF_TIME.outecho ” ” > /usr/local/tomcat8/logs/catalina.out


mkdir  -p  /var/log/tomcat/oldlog/

chmod  +x  /root/tom_log.sh

 crontab -e0 */2 * * * sh /root/tom_log.sh

ls /var/log/tomcat/oldlog/

catalina.20190102_15:00-17:00.out  catalina.20190102_17:00-19:00.out


tomcat tuning

Sync sync disk

echo 3 > /proc/sys/vm/drop_caches # Clean up useless memory space

Tomcat8 final configuration 1.${tomcat}/bin/catalina.sh Join 1.${tomcat}/bin/catalina.sh JAVA_OPTS=”-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1G -Xmx1G -Xss256k -XX:NewSize=1G -XX:MaxNewSize=1G -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+DisableExplicitGC”

2. 2. JAVA_OPTS=”$JAVA_OPTS -server -Xms3G -Xmx3G -Xss256k -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseParallelOldGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/usr/aaa/dump -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/usr/tomcat/dump/heap_trace.txt -XX:NewSize=1G -XX:MaxNewSize=1G”

2.${tomcat}/conf/server.xml Open commented out

<Executor name=”tomcatThreadPool” namePrefix=”catalina-exec-” maxThreads=”300″ […]

mod_jk or mod_proxy_ajp ?

mod_jk or mod_proxy_ajp ?

A Tomcat servlet container can be put behind an Apache web server using the AJP protocol, which carries all request information from Apache to Tomcat. There are two implementations of AJP module:

mod_jk which must be installed separately mod_proxy_ajp which is a standard module since Apache 2.2

They both use protocol AJP, […]

Tomcat log cutting and regular deletion

Tomcat log cutting and regular deletion

In Tomcat’s software environment, if we allow log files to grow indefinitely, one day the disk is full (crap). Especially in the case of log file growth is very fast, cutting log files by log and delete, is a very necessary work, the following describes the method of cutting […]

tc server run level RHEL7

ln -s /usr//tcServer/APP/bin/init.d.sh /etc/init.d/tc_APP /sbin/chkconfig –add tc_APP /sbin/chkconfig –level 2345 tc_APP on

#!/bin/sh # # ————————————————————————— # tc Runtime application server bootup script # # Copyright (c) 2009-2011 VMware, Inc. All rights reserved. # ————————————————————————— # chkconfig: 2345 80 20 # description: Start up the tc Runtime application server # version: 2.9.2.RELEASE # build […]

SSL 64-bit Block Size Cipher Suites Supported (SWEET32) – Tomcat

Following on from the Windows vulnerability for SWEET32, Here’s how to resolve the same issue with Tomcat 8. This use the OpenSSL format string for ciphers, so can also be applied to anything using the same cipher list.

ciphers=”HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!kRSA:!ECDHE-RSA-DES-CBC3-SHA” Simply by adding the !ECDHE-RSA-DES-CBC3-SHA to your existing : delimited cipher list disables the cipher on […]

Tomcat commonly used in the tuning

Tomcat commonly used in the tuning

In the usual use of Apache, Nginx or other related to the provision of Web services software has a corresponding performance module tuning changes, and in Tomcat also has a corresponding performance tuning modified configuration, here is simply to say more commonly used Several Tomcat in the performance tuning […]

Garbage Priority Garbage Collector

Garbage Priority Garbage Collector (G1 GC) Use notes

G1 GC is a new garbage collection strategy, starting with JDK7, mainly for server-side JVM, and large memory applications, the goal is to achieve similar high-throughput CMS. G1 is still the idea of ??sub-management, the main use of the idea of ??block management, through the memory is […]

tomcat monitor script

#!/bin/bash echo $(date ‘+%Y-%m-%d %H:%M:%S’) whoami JAVA_HOME=/opt/java/jdk1.8.0_40 PATH=$JAVA_HOME/bin:$PATH export PATH JAVA_HOME port=8086 sn=“tomcat-image-$port“ th=“/home/dev/tomcat/$sn“ url=“http://you-app-server/” tomcat=`ps -ef | grep java | grep $sn | grep $port | wc -l` if [ $tomcat -eq 0 ] then echo $sn stoped. echo starting $sn …… $th/bin/startup.sh fi if [ $tomcat -ge 1 ] then tpid=`ps -ef | […]