Blog

Java Monitoring

How to monitor java process using console https://docs.oracle.com/javase/9/tools/monitoring-tools-and-commands.htm#JSWOR732 jps jstat Options: [root@mplmas2 cron]$ jstat -options -class -compiler -gc -gccapacity -gccause -gcmetacapacity -gcnew -gcnewcapacity -gcold -gcoldcapacity -gcutil -printcompilation jstat -class [PID] ps -ef -u USER|grep tomcat|grep user|tr -s ” “|cut -d” Read More

MySQL Events

Display events – select database show events Dispaly events from information schema select * from information_schema.events Disable/Enable event ALTER EVENT myevent DISABLE; ALTER EVENT myevent ENABLE; https://dev.mysql.com/doc/refman/5.7/en/show-events.htmlhttps://dev.mysql.com/doc/refman/8.0/en/alter-event.html

WordPress

Secure WP login page ADD to htaccess to restrict access only from specific IP <Files wp-login.php> Order Deny,Allow Deny from all Allow from 107.150.23.152 </Files Enable gzip using htaccess <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and fonts Read More

MySQL Config Editor

Use MySQL Config editor to save your login cridential and use it in any scripting. Create login-path mysql_config_editor set –login-path=LOGIN-PATH-NAME–user=USERNAME–socket=/tmp/mysql3340.sock -p mysql_config_editor set –login-path=LOGIN-PATH-NAME–user=USERNAME–host=HOSTNAME –port=PORT -p

Setup sqlplus for AWD

Download and unzip instanceclient packages unzip instantclient-tools-linux-19.6.0.0.0dbru.zipunzip instantclient-basiclite-linux-19.6.0.0.0dbru.zipunzip instantclient-odbc-linux-19.6.0.0.0dbru.zipunzip instantclient-odbc-linux-19.6.0.0.0dbru.zipunzip instantclient-sqlplus-linux-19.6.0.0.0dbru.zipunzip instantclient-tools-linux-19.6.0.0.0dbru.zip Update profile.d/custom.sh file for profile TNS_ADMIN=/usr/lib/oracle/19.6/client/walletORACLE_HOME=/usr/lib/oracle/19.6/client/export TNS_ADMIN ORACLE_HOMEexport LD_LIBRARY_PATH=”$ORACLE_HOME”PATH=$PATH:${ORACLE_HOME}/binexport PATH Download wallet, unzip it and store in secure location . add priviledge only for user who will need Read More