https://community.jboss.org/wiki/JBoss51DisableEnableHotDeployHDScanner
Wednesday, 19 December 2012
Wednesday, 7 November 2012
DB Oracle Important Stats to monitor
1) Buffer Cache hit ratio. This should be high as the data is needs to be read from cache. Also the disk i/o is less if it is read from cache.
2) Cache hit ratio
3) Library cache.. where sql,pl/sql, re-usable sql are placed
4)soft parsing should be high compared to hard parsing... as the time spent in parsing sqls is less softparsing. (Softparsing->hardParsing->Explain plan)
2) Cache hit ratio
3) Library cache.. where sql,pl/sql, re-usable sql are placed
4)soft parsing should be high compared to hard parsing... as the time spent in parsing sqls is less softparsing. (Softparsing->hardParsing->Explain plan)
Sunday, 4 November 2012
Monday, 29 October 2012
Sunday, 28 October 2012
Using JMX-Console to get Thread Dumps
https://community.jboss.org/wiki/GenerateAThreadDumpWithTheJMXConsole
Saturday, 27 October 2012
Sunday, 14 October 2012
Apache MPM Prefork vs Worker
https://communities.ca.com/web/ca-identity-and-access-mgmt-distributed-global-user-community/message-board/-/message_boards/view_message/98290538
This Tuesday Tip will cover some common questions regarding Apache, specifically prefork vs. worker mode, how to change the default value on RedHat, Solaris and other operating systems as well as verifying what mode apache is currently running in.
A. The default MPM for Unix is the Prefork module.
B. The Worker MPM was introduced in Apache2.
Now Comparing between Worker MPM and Prefork MPM.
Prefork MPM
- prefork MPM uses multiple child processes with one thread each.
- Each process handles one connection at a time and uses more memory.
- Good for non-thread-safe third party modules.
Worker MPM
- worker MPM uses multiple child processes with many threads each.
- Each thread handles one connection at a time.
- Good for high-traffic, smaller memory footprint.
MPM uses a multi-process and multi-threaded structure.
Multi-process --> multi PIDs (use 'ps -aef' to find out)
Multi-thread --> more connections per PID. (use 'lsof' (on Solaris) to find out. 'netstat -an' (You really won’t see everything.)
The worker MPM uses multiple child processes. It's multi-threaded within each child, and each thread handles a single connection. Worker is fast and highly scalable and the memory footprint is comparatively low. It's well suited for multiple processors.
Prefork MPM is preferred for better compatibility with older software or for better stability although it uses more memory. It handles requests in a manner similar to Apache 1.3. It is appropriate for sites that need to avoid threading for compatibility with non-thread-safe libraries. It is also the best MPM for isolating each request, so that a problem with a single request will not affect any other. Prefork is well suited for single or double CPU systems, speed is comparable to that of worker, and it's highly tolerant of faulty modules and crashing children - but the memory usage is high, and more traffic leads to greater memory usage.
Conclusion: For most new websites that are that use thread safe libraries, use multiple processes and high traffic sites, CA SiteMinder recommends MPM worker mode for Apache.
>>>>>>>>>>>
How to tell if I’m running Apache in prefork or worker MPM? (Multi-Processing Module)
Note : You can have one and only one MPM module loaded in apache at any one time.
From the bin directory, you can run ./apachectl -V (Capital V)
./apache2/bin/apachectl -V
Server version: Apache/2.0.50
Server built: Aug 3 2004 16:52:20
Server's Module Magic Number: 20020903:8
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork" (This is running in prefork mode)
Newer version running in worker mode:
./apachectl -V
Server version: Apache/2.2.21 (Unix)
Server built: Oct 23 2011 17:42:11
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture: 32-bit
Server MPM: Worker <------Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker" <- This same line will still exist.
A second way to check, again from the bin directory:
#./ httpd -l
Compiled in modules:
core.c
prefork.c <---- Prefork
http_core.c
mod_so.c
./httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_logio.c
mod_env.c
mod_setenvif.c
worker.c <-----Worker
>>>>>>>>>>>
How do I change the default value on RHEL (Red Hat Enterprise Release)?
Edit the /etc/sysconfig/httpd file.
Change #HTTPD=/usr/sbin/httpd.worker
to
HTTPD=/usr/sbin/httpd.worker
and stop/start the apache service.
>>>>>>>>>>>
Solaris or most unix like operating systems.
When I download the code from apache.org and use certain flags to compile apache, what flag do I use for worker mode?
./configure --with-mpm=worker
For all compile options, please reference www.apache.org
Apache Bench results for prefork:
Requests per second: 20.91 [#/sec] (mean)
Apache Bench results for prefork:
Requests per second: 40.94 [#/sec] (mean)
How to install Worker MPM:
http://kmaiti.blogspot.in/2012/02/how-to-start-apache-uisng-worker-mpm.html
http://articles.slicehost.com/2010/5/19/configuring-the-apache-mpm-on-centos
http://www.virtualmin.com/node/15046
http://articles.slicehost.com/2010/5/19/apache-configuration-files-on-centos
http://articles.slicehost.com/2010/5/19/configuring-the-apache-mpm-on-centos
This Tuesday Tip will cover some common questions regarding Apache, specifically prefork vs. worker mode, how to change the default value on RedHat, Solaris and other operating systems as well as verifying what mode apache is currently running in.
A. The default MPM for Unix is the Prefork module.
B. The Worker MPM was introduced in Apache2.
Now Comparing between Worker MPM and Prefork MPM.
Prefork MPM
- prefork MPM uses multiple child processes with one thread each.
- Each process handles one connection at a time and uses more memory.
- Good for non-thread-safe third party modules.
Worker MPM
- worker MPM uses multiple child processes with many threads each.
- Each thread handles one connection at a time.
- Good for high-traffic, smaller memory footprint.
MPM uses a multi-process and multi-threaded structure.
Multi-process --> multi PIDs (use 'ps -aef' to find out)
Multi-thread --> more connections per PID. (use 'lsof' (on Solaris) to find out. 'netstat -an' (You really won’t see everything.)
The worker MPM uses multiple child processes. It's multi-threaded within each child, and each thread handles a single connection. Worker is fast and highly scalable and the memory footprint is comparatively low. It's well suited for multiple processors.
Prefork MPM is preferred for better compatibility with older software or for better stability although it uses more memory. It handles requests in a manner similar to Apache 1.3. It is appropriate for sites that need to avoid threading for compatibility with non-thread-safe libraries. It is also the best MPM for isolating each request, so that a problem with a single request will not affect any other. Prefork is well suited for single or double CPU systems, speed is comparable to that of worker, and it's highly tolerant of faulty modules and crashing children - but the memory usage is high, and more traffic leads to greater memory usage.
Conclusion: For most new websites that are that use thread safe libraries, use multiple processes and high traffic sites, CA SiteMinder recommends MPM worker mode for Apache.
>>>>>>>>>>>
How to tell if I’m running Apache in prefork or worker MPM? (Multi-Processing Module)
Note : You can have one and only one MPM module loaded in apache at any one time.
From the bin directory, you can run ./apachectl -V (Capital V)
./apache2/bin/apachectl -V
Server version: Apache/2.0.50
Server built: Aug 3 2004 16:52:20
Server's Module Magic Number: 20020903:8
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork" (This is running in prefork mode)
Newer version running in worker mode:
./apachectl -V
Server version: Apache/2.2.21 (Unix)
Server built: Oct 23 2011 17:42:11
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture: 32-bit
Server MPM: Worker <------Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker" <- This same line will still exist.
A second way to check, again from the bin directory:
#./ httpd -l
Compiled in modules:
core.c
prefork.c <---- Prefork
http_core.c
mod_so.c
./httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_logio.c
mod_env.c
mod_setenvif.c
worker.c <-----Worker
>>>>>>>>>>>
How do I change the default value on RHEL (Red Hat Enterprise Release)?
Edit the /etc/sysconfig/httpd file.
Change #HTTPD=/usr/sbin/httpd.worker
to
HTTPD=/usr/sbin/httpd.worker
and stop/start the apache service.
>>>>>>>>>>>
Solaris or most unix like operating systems.
When I download the code from apache.org and use certain flags to compile apache, what flag do I use for worker mode?
./configure --with-mpm=worker
For all compile options, please reference www.apache.org
Apache Bench results for prefork:
Requests per second: 20.91 [#/sec] (mean)
Apache Bench results for prefork:
Requests per second: 40.94 [#/sec] (mean)
How to install Worker MPM:
http://kmaiti.blogspot.in/2012/02/how-to-start-apache-uisng-worker-mpm.html
http://articles.slicehost.com/2010/5/19/configuring-the-apache-mpm-on-centos
http://www.virtualmin.com/node/15046
http://articles.slicehost.com/2010/5/19/apache-configuration-files-on-centos
http://articles.slicehost.com/2010/5/19/configuring-the-apache-mpm-on-centos
Apache Prefork VS Worker MPM
https://communities.ca.com/web/ca-identity-and-access-mgmt-distributed-global-user-community/message-board/-/message_boards/view_message/98290538
Thursday, 4 October 2012
Write simple Rest API with Java and Spring
http://eugenedvorkin.com/how-to-code-rest-api-with-java-and-spring-3-0/
Wednesday, 19 September 2012
Tuesday, 14 August 2012
Monday, 25 June 2012
Vim editor for timestamp
vim editor regex to update timestamp in jmeter results file
:%s/2012-\d\d-25/2012-02-25/g
:%s/2012-\d\d-25/2012-02-25/g
Wednesday, 6 June 2012
sqlplus output to file with out display and trims on
http://blog.niklasottosson.com/?p=761
http://stackoverflow.com/questions/6813210/oracle-sqlplus-saving-output-in-a-file-but-dont-show-on-screen
set Termout off
http://stackoverflow.com/questions/6813210/oracle-sqlplus-saving-output-in-a-file-but-dont-show-on-screen
SET echo off |
02 | SET feedback off |
03 | SET linesize 100 |
04 | SET pagesize 0 |
05 | SET sqlprompt '' |
06 | SET trimspool on |
07 | SPOOL filename.csv |
08 |
09 | SELECT field1 || ',' || field2 || ',' || field3 FROM tablename; |
10 |
11 | SPOOL off |
12 | exit |
Wednesday, 30 May 2012
Tuesday, 29 May 2012
TCP Network analysis
http://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html
Determine Threads with High CPU usage
http://blogs.manageengine.com/appmanager/2011/02/09/identify-java-code-consuming-high-cpu-in-linux-linking-jvm-thread-and-linux-pid/
Convert Decimal to hexaecimal:
http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html
Convert Decimal to hexaecimal:
http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html
Friday, 25 May 2012
Webserver precompress static files
http://mark.aufflick.com/blog/2007/12/06/serve-pre-compressed-content-with-apache
Saturday, 5 May 2012
Wednesday, 2 May 2012
Linux Admin Essentials performance and more
http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
Tuesday, 17 April 2012
Thread Analysis
grep "\- waiting on" filename | awk '{print $4;}'|sort | uniq -c
cat API_100_0417_1|grep java.lang.Thread.State| awk '{print $2;}'|sort | uniq -c
cat API_100_0417_1|grep java.lang.Thread.State| awk '{print $2;}'|sort | uniq -c
Monday, 16 April 2012
Thursday, 29 March 2012
responsetime from webserverlogs
cat access_log.2012-03-29|awk '{print $7, $20}'| sed 's/\/[^a-z]/ /g'
Sunday, 18 March 2012
Monday, 12 March 2012
sqlplus install error resolution
http://www.yoursearchbuddy.com/sqlplus-error-loading-shared-libraries-libsqlplusso
the above solution is for the following error:
./sqlplus: error while loading shared libraries: libsqlplus.so
the above solution is for the following error:
./sqlplus: error while loading shared libraries: libsqlplus.so
Wednesday, 7 March 2012
awk print coulmns from last of a line
awk ' { print ( $(NF) ) }' --> Last column
awk ' { print ( $(NF-3) ) }' --> 3rd from Last column
awk ' { print ( $(NF-3) ) }' --> 3rd from Last column
Sunday, 4 March 2012
awk command to get max value from a file
cat filename |awk 'max=="" || $1 > max {max=$1} END{ print max}'
concurrency from webserver access logs
cat access_log.******* |awk '{print $1,$4,$5,$6,$7}'|awk '{print $2}'|sort | uniq -c
Saturday, 3 March 2012
TCP_DUMP
http://www.alexonlinux.com/tcpdump-for-dummies
tcpdump -ni eth1 -w file.cap -s 0 -c 1000 not port 22
tcpdump -ni eth1 -w file.cap -s 0 -c 1000 not port 22
Sunday, 19 February 2012
Thread Contentions
http://www.ibm.com/developerworks/java/library/j-threads2/index.html
http://www.concentric.net/~ttwang/tech/syncbottle.htm
http://dev.blogs.nuxeo.com/2011/07/detecting-threads-contention.html
Well Eplained in Detail:
https://community.dynatrace.com/community/display/PUB/Identify+Thread+Contention+-+Guest+Article+by+Lucy+Monahan
http://www.concentric.net/~ttwang/tech/syncbottle.htm
http://dev.blogs.nuxeo.com/2011/07/detecting-threads-contention.html
Well Eplained in Detail:
https://community.dynatrace.com/community/display/PUB/Identify+Thread+Contention+-+Guest+Article+by+Lucy+Monahan
Free Memory in Linux
Actual Free Memory in Linux = Free+ Buffer+Cache
Linux uses RAM to load the Disk data in RAM (emory) as reading data from memory is faster. As the needs for memory to other process increases it shrinks the cahced data accordingly.
http://blog.scoutapp.com/articles/2010/10/06/determining-free-memory-on-linux
Linux uses RAM to load the Disk data in RAM (emory) as reading data from memory is faster. As the needs for memory to other process increases it shrinks the cahced data accordingly.
http://blog.scoutapp.com/articles/2010/10/06/determining-free-memory-on-linux
Wednesday, 15 February 2012
Saturday, 11 February 2012
calculate avg and 90th percentile from awk command
Average:
cat <filename> |grep HOME|grep "Number of samples"|awk -F "," '{sum+=$2} END { print "Average = ",sum/NR}'
95th Percentile:
cat <filename> |grep HOME|grep "Number of samples"|awk -F "," '{print $2}' |sort -n|awk 'BEGIN{i=0} {s[i]=$1; i++;} END{print s[int(NR*0.95-0.5)]}'
Friday, 10 February 2012
calculate avg of a column
awk '{ s += $1 } END { print "sum: ", s, " average: ", s/NR, " samples: ", NR }' rails_production_log_or_whatever.logFriday, 3 February 2012
AWk command to cut a big file into small files at a repeatative word
awk '/selected./{n++}{print >"out" n ".txt" }' partitionbased_cc_acc_ids.txt
here "selected." is the repeatative word..
here "selected." is the repeatative word..
Tuesday, 31 January 2012
Data_partitioning for scale
http://java-persistence-performance.blogspot.in/2011/05/data-partitioning-scaling-database.html
http://databasewisdom.com/partit_ora1.shtml
Awesome:
http://www.shutdownabort.com/dbaqueries/Structure_Partitions.php
http://databasewisdom.com/partit_ora1.shtml
Awesome:
http://www.shutdownabort.com/dbaqueries/Structure_Partitions.php
Monday, 30 January 2012
Oracle sql tuning
http://www.credmond.net/oracle/tuning/
http://www.myoracleguide.com/s/OracleTips.htm
How to get the list of sqls that are CPU intensive and Waiting
http://uhesse.wordpress.com/2010/07/08/performance-monitoring-active-session-history-at-work/
http://www.myoracleguide.com/s/OracleTips.htm
How to get the list of sqls that are CPU intensive and Waiting
http://uhesse.wordpress.com/2010/07/08/performance-monitoring-active-session-history-at-work/
Monday, 16 January 2012
remove lines in a file in Linux
sed '1,10d' server.log
command to remove lines between the line numbers 1 and 10..
http://en.kioskea.net/faq/1451-sed-delete-one-or-more-lines-from-a-file
command to remove lines between the line numbers 1 and 10..
http://en.kioskea.net/faq/1451-sed-delete-one-or-more-lines-from-a-file
Extract rows from a file unique w.r.t column
awk '!_[$1]++' filename
Here rows are extracted w.r.t unique values from column 1.
Thursday, 12 January 2012
Monday, 9 January 2012
Quartz cron job scheduling in properties
http://sanjaal.com/java/tag/cron-expression-quartz-schedulers/
Thursday, 5 January 2012
Jmeter JDBC Configuration for oracle,sqlserver,mysql,postgresql,apachederby,ingres
http://jmeter.apache.org/usermanual/component_reference.html#JDBC_Connection_Configuration
Tuesday, 3 January 2012
GEt Dbname in oracle
SQL> SELECT VALUE FROM V$PARAMETER WHERE NAME='db_name';
VALUE
--------------------------------------------------------------------------------
XXXXXXX
Oracle Connect as sysdba error..
SQL> conn / as sysdba
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SQL> exit
[qysprffinwkdb01:/home/oracle](Perf)% export ORACLE_SID=xxxxxx
[qysprffinwkdb01:/home/oracle](Perf)% echo $ORACLE_SID
xxxxxx
[qysprffinwkdb01:/home/oracle](Perf)% sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.5.0 - Production on .........
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL>
Monday, 2 January 2012
AWk command for .csv files
http://stackoverflow.com/questions/7857090/awk-extract-specific-columns-from-delimited-file
Subscribe to:
Posts (Atom)