<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-50275021492157231</id><updated>2024-11-14T10:53:46.591-08:00</updated><title type='text'>For Performance Engineers</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-2393016151229128077</id><published>2014-06-04T03:15:00.001-07:00</published><updated>2014-06-04T03:21:35.519-07:00</updated><title type='text'>Access S3 files meta data and other details using Python Boto using Assume Role </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is the code&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
import boto&lt;br /&gt;
from boto.sts import STSConnection&lt;br /&gt;
from boto.s3.connection import S3Connection&lt;br /&gt;
from boto.s3.key import Key&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sts_connection = STSConnection()&lt;br /&gt;
assumedRoleObject = sts_connection.assume_role(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; role_arn=&quot;arn:aws:iam::0000000000:role/xxxx/xxxx-yyyy-zzz&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; role_session_name=&quot;AssumeRoleSession1&quot;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
s3_connection = S3Connection(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; aws_access_key_id=assumedRoleObject.credentials.access_key,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; aws_secret_access_key=assumedRoleObject.credentials.secret_key,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; security_token=assumedRoleObject.credentials.session_token&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
bname=&quot;BUCKETNAME&quot;&lt;br /&gt;
fname=&quot;FILENAME&quot;&lt;br /&gt;
bucket = s3_connection.get_bucket(bname)&lt;br /&gt;
files=bucket.list(prefix=fname)&lt;br /&gt;
&lt;br /&gt;
for file in files:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; k=bucket.get_key(file)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print k.get_metadata(&#39;key-name&#39;&lt;keyname&gt;)&lt;/keyname&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print file.name&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print file.size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print file.last_modified&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print file.get_acl()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1: Lets assume your key name is&amp;nbsp;x-amz-meta-keyname then in the code pass your keyname as &quot;keyname&quot;. No need to mention x-amz-meta&lt;br /&gt;
&lt;br /&gt;
Let me know in comments section if his works/doesn&#39;t work for you&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/2393016151229128077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2014/06/access-s3-files-meta-data-and-other.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/2393016151229128077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/2393016151229128077'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2014/06/access-s3-files-meta-data-and-other.html' title='Access S3 files meta data and other details using Python Boto using Assume Role '/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-2830685508506617684</id><published>2013-09-18T06:43:00.003-07:00</published><updated>2013-09-18T06:43:31.241-07:00</updated><title type='text'>&quot;Unable to execute HTTP request: Connection to https://ec2.amazonaws.com refused&quot;  error while executing AWS Java SDK Sample projects</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you are behind proxy then these sample projects will not read proxy from eclipse proxy settings.&lt;br /&gt;
&lt;br /&gt;
to fix this issue you have to add some extra lines of code into your sample projects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a object of&amp;nbsp;ClientConfiguration class and set proxyhost and proxyport properties and then pass this object while creating client (ec2,S3 &amp;nbsp;or sdb etc)&lt;br /&gt;
&lt;br /&gt;
so your init method should look something like this after modification&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;private static void init() throws Exception {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/*&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; * This credentials provider implementation loads your AWS credentials&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; * from a properties file at the root of your classpath.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; *&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;b&gt;ClientConfiguration clientCfg = new ClientConfiguration();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clientCfg.setProtocol(Protocol.HTTP);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //setup proxy connection:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clientCfg.setProxyHost(&quot;HTTP_PROXY_IP&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clientCfg.setProxyPort(8080);&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AWSCredentialsProvider credentialsProvider = new ClasspathPropertiesFileCredentialsProvider();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ec2 = new AmazonEC2Client(credentialsProvider&lt;b&gt;,clientCfg&lt;/b&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s3 &amp;nbsp;= new AmazonS3Client(credentialsProvider&lt;b&gt;,clientCfg&lt;/b&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdb = new AmazonSimpleDBClient(credentialsProvider&lt;b&gt;,clientCfg&lt;/b&gt;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/2830685508506617684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2013/09/unable-to-execute-http-request.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/2830685508506617684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/2830685508506617684'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2013/09/unable-to-execute-http-request.html' title='&quot;Unable to execute HTTP request: Connection to https://ec2.amazonaws.com refused&quot;  error while executing AWS Java SDK Sample projects'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-6989437512876258366</id><published>2013-09-18T05:55:00.000-07:00</published><updated>2013-09-18T05:55:24.782-07:00</updated><title type='text'>&quot;Missing requirement: Eclipse Data Tools Platform Amazon SimpleDB UI Plug-in 1.0.0.v201308121803&quot; Error while installing AWS Toolkit for Eclipse</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In Eclipse follow below steps to fix this&lt;br /&gt;
&lt;br /&gt;
1: Help -&amp;gt; install new software&lt;br /&gt;
2: Type &quot;http://download.eclipse.org/releases/kepler&quot; in the url field&lt;br /&gt;
3: Select &quot;Database Development&quot; &amp;nbsp;and install from the list.&lt;br /&gt;
4: &amp;nbsp;Try to re install &amp;nbsp;AWS Toolkit, it will work.. &amp;nbsp; :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/6989437512876258366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2013/09/missing-requirement-eclipse-data-tools.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/6989437512876258366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/6989437512876258366'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2013/09/missing-requirement-eclipse-data-tools.html' title='&quot;Missing requirement: Eclipse Data Tools Platform Amazon SimpleDB UI Plug-in 1.0.0.v201308121803&quot; Error while installing AWS Toolkit for Eclipse'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-4383335349491546813</id><published>2011-03-30T23:11:00.000-07:00</published><updated>2011-03-30T23:15:05.330-07:00</updated><title type='text'>Get count of messages in a jboss message queue from command prompt</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;You can also retrieve message count in a particular message queue of jboss, from command prompt, without accessing jmx console.&lt;br /&gt;&lt;br /&gt;With command prompt you can automate and send alerts in case message count is above your application threshold&lt;br /&gt;&lt;br /&gt;The command to do this is&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;./twiddle.sh -s localhost:1099 get jboss.messaging.destination:service=Queue,name=ResponseQueue MessageCount&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Run this command from jboss bin directory and you can change queue name (in above example it is ResponseQueue) to your application specific queue name</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/4383335349491546813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2011/03/get-count-of-messages-in-jboss-message.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/4383335349491546813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/4383335349491546813'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2011/03/get-count-of-messages-in-jboss-message.html' title='Get count of messages in a jboss message queue from command prompt'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-4834853777200210144</id><published>2011-02-25T04:15:00.000-08:00</published><updated>2011-02-25T04:18:06.924-08:00</updated><title type='text'>Run Multiple Jboss on Same server</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;Its very easy to run multiple jboss on same server.&lt;br /&gt;&lt;br /&gt;You just need to add one parameter wen you are starting your jboss.&lt;br /&gt;&lt;br /&gt;the paramter is &lt;br /&gt;&lt;br /&gt;-Djboss.service.binding.set=ports-01&lt;br /&gt;&lt;br /&gt;example&lt;br /&gt;&lt;br /&gt;./run.sh -c myproj -Djboss.service.binding.set=ports-01 &amp;&lt;br /&gt;&lt;br /&gt;to start another jboss on same server use&lt;br /&gt;&lt;br /&gt;./run.sh -c myproject -Djboss.service.binding.set=ports-02 &amp;&lt;br /&gt;&lt;br /&gt;Just change  -Djboss.service.binding.set parameter and you can start many jboss on same server, without any changes in any conf file.</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/4834853777200210144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2011/02/run-multiple-jboss-on-same-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/4834853777200210144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/4834853777200210144'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2011/02/run-multiple-jboss-on-same-server.html' title='Run Multiple Jboss on Same server'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-732371584920998109</id><published>2010-12-14T04:13:00.001-08:00</published><updated>2010-12-14T04:15:09.978-08:00</updated><title type='text'>Install perl GD module</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;If you are getting below error while instaling perl GD module module &lt;br /&gt;&lt;br /&gt;Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Follow the below steps&lt;br /&gt;&lt;br /&gt;1:do  yum install gd gd-devel&lt;br /&gt;2: go to cpan&lt;br /&gt;3:then fire install GD&lt;br /&gt;&lt;br /&gt;You are all set to go, your GD module should install now</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/732371584920998109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/12/install-perl-gd-module.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/732371584920998109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/732371584920998109'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/12/install-perl-gd-module.html' title='Install perl GD module'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-958600047342565463</id><published>2010-07-07T02:41:00.000-07:00</published><updated>2010-07-07T02:52:03.745-07:00</updated><title type='text'>How to Log slow queries in postgresql database</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;Postgresql db can log  sql queries that takes more time to execute then specified time limit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Suppose you want to log sql queries that takes more than 100ms to execute.&lt;br /&gt;&lt;br /&gt;Follow the below steps&lt;br /&gt;&lt;br /&gt;1: Open postgresql.conf file. You will find this file in data folder of postgres.&lt;br /&gt;2: Modify the below paratmeters&lt;br /&gt;&lt;br /&gt;              a:logging_collector = on&lt;br /&gt;              b:log_min_duration_statement = 100&lt;br /&gt;              c:log_duration = on&lt;br /&gt;&lt;br /&gt;3: Save and close this file.&lt;br /&gt;4: Restart the DB&lt;br /&gt;&lt;br /&gt;Now execute the queries again. P{ostgres will log all the queries in pg_log folder&lt;br /&gt;pg_log folder will be inside your data folder of postgresql.&lt;br /&gt;Name of log file will be in the following format&lt;br /&gt;&lt;br /&gt;postgresql-%Y-%m-%d_%H%M%S.log&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to change log directory and log file name, just modify these parameters to desired value&lt;br /&gt;&lt;br /&gt;#log_directory = &#39;pg_log&#39;  # directory where log files are written,&lt;br /&gt;     # can be absolute or relative to PGDATA&lt;br /&gt;#log_filename = &#39;postgresql-%Y-%m-%d_%H%M%S.log&#39; # log file name pattern,</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/958600047342565463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/07/how-to-log-slow-queries-in-postgresql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/958600047342565463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/958600047342565463'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/07/how-to-log-slow-queries-in-postgresql.html' title='How to Log slow queries in postgresql database'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-1908362416367689050</id><published>2010-07-07T00:02:00.000-07:00</published><updated>2010-07-07T02:15:22.975-07:00</updated><title type='text'>Get Index statistics in Postgresql database</title><content type='html'>I always observed that around 30 to 40% indexes created on a database are never used by any queries.&lt;br /&gt;&lt;br /&gt;Having extra indexes on a DB, can degrade the performance (update and insert statements) , consumes lot of space and can increase the time of backup and restoring the DB.&lt;br /&gt;&lt;br /&gt;It make sense to check the index utilization.&lt;br /&gt;&lt;br /&gt;To check the same in Postgresql Database follow below steps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1: Open postgresql.conf file. This file is inside your data directory of postgres.&lt;br /&gt;2: Change following parameters&lt;br /&gt;&lt;br /&gt;         A: logging_collector = on&lt;br /&gt;         B:track_activities = on&lt;br /&gt;         C:track_counts = on&lt;br /&gt;3: save and close the file&lt;br /&gt;4: Restart the postgresql server&lt;br /&gt;&lt;br /&gt;Now do all possible operartions using application, just to make sure all possible queries got fired to database.&lt;br /&gt;&lt;br /&gt;Now just run the following query&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select * from pg_stat_all_indexes where schemaname= order by relname,idx_scan desc;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will find statistics of all indexes.</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/1908362416367689050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/07/get-index-statistics-in-postgres.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/1908362416367689050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/1908362416367689050'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/07/get-index-statistics-in-postgres.html' title='Get Index statistics in Postgresql database'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-1196616681842351269</id><published>2010-04-11T22:09:00.000-07:00</published><updated>2010-04-11T22:26:11.956-07:00</updated><title type='text'>Always make sure your JVM is runnig is SERVER mode not in client mode</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;JVM can run in many modes and selecting a proper mode can help improve your application performance&lt;br /&gt;&lt;br /&gt;In servers, make sure JVM is runnig in server mode . This activates the server hotspot JIT.&lt;br /&gt;It may need more time to start. But this delivers best performance.&lt;br /&gt;&lt;br /&gt;Other modes of JVM are   client and classic mode.&lt;br /&gt;&lt;br /&gt;make sure -server, should be the first argument to java</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/1196616681842351269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/04/always-make-sure-your-jvm-is-runnig-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/1196616681842351269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/1196616681842351269'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/04/always-make-sure-your-jvm-is-runnig-is.html' title='Always make sure your JVM is runnig is SERVER mode not in client mode'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-5492154784819328682</id><published>2010-03-28T23:12:00.000-07:00</published><updated>2010-03-28T23:54:42.139-07:00</updated><title type='text'>Too Many Open Files problem in Linux</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;Most of the time during stress testing on linux server, you may encounter the following problem&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;code-java&quot;&gt;SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=80] ignored exception: java.net.SocketException: Too many open files&lt;br /&gt;java.net.SocketException: Too many open files&lt;br /&gt;&lt;br /&gt;We get this error when system reaches the the max file limit set on your Linux OS&lt;br /&gt;&lt;br /&gt;first check the limit set on your OS with the following command&lt;br /&gt;cat /proc/sys/fs/file-max&lt;br /&gt;&lt;br /&gt;if you want to check the current open files .&lt;br /&gt;1:lsof |wc -l   ( to check number of all open files)&lt;br /&gt;2:lsof -p &lt;pid&gt; | wc -l  ( to check number of opened files by a process)&lt;br /&gt;&lt;br /&gt;in Ubuntu&lt;br /&gt;ulimit -n&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to change the value&lt;br /&gt;1 edit &lt;tt&gt;/etc/sysctl.conf&lt;/tt&gt; and set &lt;tt&gt;fs.file-max&lt;/tt&gt; to any desired value&lt;br /&gt;&lt;br /&gt;then run&lt;br /&gt;&lt;br /&gt;sysctl -p&lt;br /&gt;&lt;br /&gt;you may have to restart your system after this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/5492154784819328682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/03/too-many-open-files-problem-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/5492154784819328682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/5492154784819328682'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/03/too-many-open-files-problem-in-linux.html' title='Too Many Open Files problem in Linux'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-8981213362425739113</id><published>2010-03-22T01:20:00.000-07:00</published><updated>2010-03-22T01:52:41.997-07:00</updated><title type='text'>troubleshoot  mysql database connection pool problems</title><content type='html'>If you are getting following error messages, then its time to tune your mysql max_connection value&lt;br /&gt;&lt;br /&gt;1:User &#39;mysqldba&#39; has exceeded the &#39;max_user_connections&#39; resource&lt;br /&gt;2:Too many connections&lt;br /&gt;3:GenericJDBCException: Cannot open connection&lt;br /&gt;4:message from server: &quot;Too many connections&quot;&lt;br /&gt;&lt;br /&gt;Now once u got these messages, we need to change value of max_connection variable in mysql database.&lt;br /&gt;&lt;br /&gt;There are two ways to do this.&lt;br /&gt;&lt;br /&gt;Method 1:Without restarting the mysql DB.&lt;br /&gt;                   a;login to the mysql db.&lt;br /&gt;                   b: run the query    ----&lt;br /&gt;                               show variables like &quot;max_connections&quot;;&lt;br /&gt;                   c: this will display the current value to max_connections.&lt;br /&gt;                   d: Now to change the value of max_connection,  run this query&lt;br /&gt;                               set GLOBAL max_connections=&lt;desired_value_here&gt;NewValue;&lt;br /&gt;&lt;br /&gt;max_connection value is changed ,  now again run the query&lt;br /&gt;               &#39;show variables like &quot;max_connections&quot;;&#39;&lt;br /&gt;to check if the value is reflecting.&lt;br /&gt;&lt;br /&gt;But this value will be temporary, if you restart the mysql DB, max_connection value will again set to its default value&lt;br /&gt;&lt;br /&gt;Method 2: This requires restarting the DB, but this change  will be permanent and will not go even after restart of the db&lt;br /&gt;&lt;br /&gt;  a: For this you need to change the global setting file of mysql ie &quot;my.cnf&quot; file&lt;br /&gt;  b: By default, path of my.cnf will be under etc directory. If you dont know the path,  run the&lt;br /&gt;      following command to get the path of my.cnf file&lt;br /&gt;                               find / -name my.cnf&lt;br /&gt;  c: Once you got the path . open the file in vi editor.&lt;br /&gt;  d: You will find [mysqld] inside this file&lt;br /&gt;  e: Just add one line below this&lt;br /&gt;&lt;br /&gt;  max_connections=NewValue&lt;desired_value_here&gt;&lt;br /&gt;  f: restart the db.&lt;br /&gt;  g: login to the mysql and run the following query to check the value of max_connection&lt;br /&gt;&lt;br /&gt;             show variables like &quot;max_connections&quot;;&lt;/desired_value_here&gt;&lt;/desired_value_here&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/8981213362425739113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/03/troubleshoot-mysql-database-connection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/8981213362425739113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/8981213362425739113'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/03/troubleshoot-mysql-database-connection.html' title='troubleshoot  mysql database connection pool problems'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-7679822499304819783</id><published>2010-01-13T21:32:00.000-08:00</published><updated>2010-01-13T21:42:26.600-08:00</updated><title type='text'>Monitor cpu utilization of all threads in a process in windows</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;We can monitor cpu utilization of all threads for a process in windows using perfmon tool and this tool also writes logs to a file.&lt;br /&gt;We can also use process explorer for this but this tool can not write logs.&lt;br /&gt;&lt;br /&gt;To monitor threads in a process in windows,&lt;br /&gt;1: Launch perfmon&lt;br /&gt;2:Click Performance Logs and Alerts tree on left most window&lt;br /&gt;3:Select Counter Logs from tree structure&lt;br /&gt;4: Right click Counter Logs and select &quot;New Log setting&quot;&lt;br /&gt;5: Give any name for new logs.&lt;br /&gt;6: Click on Add general tab at top.&lt;br /&gt;7: click &quot;add counters&quot; button.&lt;br /&gt;8:From &quot;Performane objects&quot; drop down, select thread.&lt;br /&gt;9:At right hand side, it will display all currently executing threads in windows.&lt;br /&gt;10:Select the threads, you want to monitor and counter to monitor from lft hand side window.&lt;br /&gt;11:Click close and go to &quot;Log Files&quot; tab.&lt;br /&gt;12:Set the log file path and type.</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/7679822499304819783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/01/monitor-cpu-utilization-of-all-threads.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/7679822499304819783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/7679822499304819783'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2010/01/monitor-cpu-utilization-of-all-threads.html' title='Monitor cpu utilization of all threads in a process in windows'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-5085692647967365111</id><published>2009-09-22T02:21:00.000-07:00</published><updated>2009-09-22T02:50:27.602-07:00</updated><title type='text'>Tomcat Performance parameters</title><content type='html'>1:DNS Lookups&lt;br /&gt;&lt;br /&gt;When your webserver logs the information about the client, it can either log&lt;br /&gt;the client’s numeric IP address or look up the actual host name in the Domain Name&lt;br /&gt;Service. DNS lookups require network traffic, involving a round-trip response&lt;br /&gt;from multiple servers, possibly far away and possibly inoperative, resulting in delays.&lt;br /&gt;&lt;br /&gt;find this part of the server.xml file:&lt;br /&gt;&lt;br /&gt;&lt;!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --&gt;Connector port=&quot;8080&quot; maxHttpHeaderSize=&quot;8192&quot;&lt;br /&gt;maxThreads=&quot;150&quot; minSpareThreads=&quot;25&quot; maxSpareThreads=&quot;75&quot;&lt;br /&gt;enableLookups=&quot;true&quot; redirectPort=&quot;8443&quot; acceptCount=&quot;100&quot;&lt;br /&gt;connectionTimeout=&quot;20000&quot; disableUploadTimeout=&quot;true&quot; /&gt;&lt;br /&gt;&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;&lt;!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --&gt;&lt;br /&gt;&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;connector port=&quot;8888&quot; maxhttpheadersize=&quot;8888&quot; maxthreads=&quot;888&quot; minsparethreads=&quot;88&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;&lt;br /&gt;&lt;br /&gt;Just change the enableLookups value from &quot;true&quot; to &quot;false&quot;, and restart Tomcat. No&lt;br /&gt;more DNS lookups and their resulting delays!&lt;br /&gt;&lt;br /&gt;2: Number of threads&lt;br /&gt;&lt;br /&gt;We can control the number of threads that are allocated by changing a Connector’s&lt;br /&gt;minThreads and maxThreads values.This setting is totally depend upon traffic that your application handles.&lt;br /&gt;&lt;br /&gt;3: Precompile your JSP&lt;br /&gt;&lt;br /&gt;When a JSP is first accessed, it is converted into Java servlet source code, which must then be compiled into Java bytecode.&lt;br /&gt;&lt;br /&gt;For example, if you want index.jsp (in the root of your webapp’s directory) to always&lt;br /&gt;be precompiled at webapp startup time, you can add a &lt;servlet&gt; tag for this file in&lt;br /&gt;your web.xml file, like this:&lt;br /&gt;&lt;web-app xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;&gt;&lt;web-app xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; schemalocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/ javaee/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;&lt;/web-app&gt;&lt;/web-app&gt;&lt;/servlet&gt;&lt;/connector&gt;&lt;/connector&gt;&lt;br /&gt;&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;servlet?&lt;br /&gt;&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;servlet-name&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;index.jsp&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;/servlet-name&lt;/connector&gt;?&lt;br /&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;jsp-file&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;/index.jsp&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;/jsp-file&lt;/connector&gt;?&lt;br /&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;load-on-startup&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;0&lt;/connector&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;/load-on-startup&lt;/connector&gt;?&lt;br /&gt;?&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;/servlet&lt;/connector&gt;?&lt;br /&gt;&lt;connector port=&quot;8080&quot; maxhttpheadersize=&quot;8192&quot; maxthreads=&quot;150&quot; minsparethreads=&quot;25&quot; maxsparethreads=&quot;75&quot; enablelookups=&quot;true&quot; redirectport=&quot;8443&quot; acceptcount=&quot;100&quot; connectiontimeout=&quot;20000&quot; disableuploadtimeout=&quot;true&quot;&gt;&lt;br /&gt;&lt;br /&gt;Enjoy tomcat!!!!!!!!!&lt;/connector&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/5085692647967365111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/09/tomcat-performance-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/5085692647967365111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/5085692647967365111'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/09/tomcat-performance-parameters.html' title='Tomcat Performance parameters'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-7696753352563680058</id><published>2009-08-18T22:21:00.000-07:00</published><updated>2009-08-18T22:28:55.500-07:00</updated><title type='text'>run a command in solaris from winodw and output will save in window through batch file</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;some time we need to run some command in solaris or Unix machine and need to collect output in window.&lt;br /&gt;This all can be automated and directly we can invoke a shell scrpit in solaris from windows. You need putty to do this. Your shell script should be in windows machine.&lt;br /&gt;&lt;br /&gt;CODE:&lt;br /&gt;&lt;br /&gt;Create a batch file (suppose putty is saved in d: drive of windows and your shell script that you want to run is saved in d: drive).shell script name is &quot;shellscript.sh&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;D:\putty -ssh username@servername -pw mypassword -m &quot;D:\shellscript.sh&quot;&lt;br /&gt;ftp -i -s:&quot;D:\ftp.txt&quot; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now create a ftp.txt file in D: drive as follows&lt;br /&gt;&lt;br /&gt;OPEN servername&lt;br /&gt;username&lt;br /&gt;password&lt;br /&gt;get filename&lt;br /&gt;BYE &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Shashank</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/7696753352563680058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/08/run-command-in-solaris-from-winodw-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/7696753352563680058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/7696753352563680058'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/08/run-command-in-solaris-from-winodw-and.html' title='run a command in solaris from winodw and output will save in window through batch file'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-849278809320889826</id><published>2009-07-09T01:57:00.000-07:00</published><updated>2009-07-09T02:02:24.711-07:00</updated><title type='text'>Write a parameter to a text file in loadrunner script</title><content type='html'>char *filename = &quot;c:\\myfilename.txt&quot;; &lt;br /&gt;long file_stream;&lt;br /&gt;vuser_init()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;     if ((file_stream = fopen(filename, &quot;a+&quot;)) == NULL)   //open file in append mode&lt;br /&gt;              {           &lt;br /&gt;                   lr_error_message (&quot;Cannot open %s&quot;, filename);                  &lt;br /&gt;                   return -1; &lt;br /&gt;              }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   fprintf (file_stream, &quot;%s\n&quot;, lr_eval_string(&quot;THE PARAMETER IS :{Parameter}&quot;));   //Parameter is parameter name to be written in a file&lt;br /&gt;&lt;br /&gt;   Return 0;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;vuser_end()&lt;br /&gt;{&lt;br /&gt;fclose(file_stream);//dont forget to close file_stream in vuser_end scetion&lt;br /&gt;return 0;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/849278809320889826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/07/write-parameter-to-text-file-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/849278809320889826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/849278809320889826'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/07/write-parameter-to-text-file-in.html' title='Write a parameter to a text file in loadrunner script'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-4235170711453162747</id><published>2009-07-02T06:08:00.000-07:00</published><updated>2009-07-02T06:28:07.070-07:00</updated><title type='text'>monitor cpu and memory utilization of an individual process in windows</title><content type='html'>Sometime it is required to measure cpu utilization of a process instead to cpu utilization of whole machine in windows.&lt;br /&gt;This is very much possible with PerfMon tool in windows&lt;br /&gt;Steps to follow&lt;br /&gt;1: Launch perfmon&lt;br /&gt;2:Click Performance Logs and Alerts tree on left most window&lt;br /&gt;3:Select Counter Logs from tree structure&lt;br /&gt;4: Right click Counter Logs and select &quot;New Log setting&quot;&lt;br /&gt;5: Give any name for new logs.&lt;br /&gt;6: Click on Add objects tab.&lt;br /&gt;7:Select Process from the list then click on Add then close.&lt;br /&gt;8:Click &quot;Log Files&quot; tab at the top.&lt;br /&gt;9:Select Log File Type as csv or tsv,as per your requirement&lt;br /&gt;10: You are all set to go by default log file will be saved in c:\perfLogs folder</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/4235170711453162747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/07/monitor-cpu-and-memeory-utilization-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/4235170711453162747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/4235170711453162747'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/07/monitor-cpu-and-memeory-utilization-of.html' title='monitor cpu and memory utilization of an individual process in windows'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-974585868607633489</id><published>2009-06-09T23:14:00.000-07:00</published><updated>2009-06-09T23:18:54.549-07:00</updated><title type='text'>Code for puttting custome Pacing in script</title><content type='html'>Action()&lt;br /&gt;{&lt;br /&gt;  merc_timer_handle_t timer;&lt;br /&gt;  double duration;&lt;br /&gt;  double pacing_time;&lt;br /&gt;&lt;br /&gt;  // Read desired pacing timer from a text file.&lt;br /&gt;  pacing_time = (double)jds_read_pacing_time(&quot;C:\\TEMP\\vugen_pacing.txt&quot;);&lt;br /&gt;&lt;br /&gt;  // Start the timer.&lt;br /&gt;  timer = lr_start_timer();&lt;br /&gt;&lt;br /&gt;  //Your Action Code&lt;br /&gt;&lt;br /&gt;  // Stop the timer&lt;br /&gt;  duration = lr_end_timer(timer);&lt;br /&gt;&lt;br /&gt;  // Wait for the necessary number of seconds to elapse&lt;br /&gt;  if (duration &lt; pacing_time) {&lt;br /&gt;    lr_think_time(pacing_time - duration);&lt;br /&gt;  } else {&lt;br /&gt;    lr_error_message(&quot;Pacing time exceeded. Target: %G seconds. Actual: %g seconds&quot;, pacing_time, duration);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Read pacing time from a file. Returns time in seconds (whole seconds only).&lt;br /&gt;// Note that file can be on a shared network drive.&lt;br /&gt;int jds_read_pacing_time(char* file_name) {&lt;br /&gt;  long fs; // file stream&lt;br /&gt;  int number_from_file;&lt;br /&gt;&lt;br /&gt;  // Open the file for reading&lt;br /&gt;  fs = fopen(file_name, &quot;r+&quot;);&lt;br /&gt;  if (fs == NULL) {&lt;br /&gt;    lr_error_message(&quot;Error opening file: %s&quot;, file_name);&lt;br /&gt;    return -1;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  // Read number from file.&lt;br /&gt;  if (fscanf(fs, &quot;%d&quot;, &amp;amp;number_from_file) != 1) {&lt;br /&gt;    lr_error_message(&quot;Error reading number from file: %s&quot;, file_name);&lt;br /&gt;    return -1;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  fclose(fs);&lt;br /&gt;&lt;br /&gt;  return number_from_file;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/974585868607633489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/code-for-puttting-custome-pacing-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/974585868607633489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/974585868607633489'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/code-for-puttting-custome-pacing-in.html' title='Code for puttting custome Pacing in script'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-9084060189682822539</id><published>2009-06-09T01:59:00.000-07:00</published><updated>2009-06-09T02:00:00.797-07:00</updated><title type='text'>URL vs HTML recording mode</title><content type='html'>&lt;div class=&quot;lf secttl&quot;&gt;    &lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;HTML based mode, records script for every user action that is&lt;br /&gt;performed during recording, while URL based mode records each and&lt;br /&gt;every browser request to the server and resources received from the&lt;br /&gt;server.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;IN HTML recording mode the execution will be fast..as all&lt;br /&gt;the server responses will not be captured in the script.&lt;br /&gt;In URL all the server responses will be captured in the&lt;br /&gt;script and hence the execution will be slow &lt;/span&gt;&lt;br /&gt;  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/9084060189682822539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/url-vs-html-recording-mode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/9084060189682822539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/9084060189682822539'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/url-vs-html-recording-mode.html' title='URL vs HTML recording mode'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-5378288243220228362</id><published>2009-06-09T01:58:00.001-07:00</published><updated>2009-06-09T01:58:44.412-07:00</updated><title type='text'>how to monitor tomcat 6.0.16 with jconsole</title><content type='html'>&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;go to tomcat bin folder&lt;br /&gt;click on tomcat6w.exe&lt;br /&gt;go to java tab&lt;br /&gt;go to java options&lt;br /&gt;type :&lt;br /&gt;-Dcom.sun.management.jmxremote&lt;br /&gt;-Dcom.sun.management.jmxremote.port=8090&lt;br /&gt;-Dcom.sun.management.jmxremote.ssl=false&lt;br /&gt;-Dcom.sun.management.jmxremote.authenticate=false&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;you are all set to go&lt;br /&gt;now you can monitor your tomcat through jconsole and give port as 8090 &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/5378288243220228362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/how-to-monitor-tomcat-6016-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/5378288243220228362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/5378288243220228362'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/how-to-monitor-tomcat-6016-with.html' title='how to monitor tomcat 6.0.16 with jconsole'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-8009636161930425511</id><published>2009-06-09T01:57:00.001-07:00</published><updated>2009-06-09T01:57:53.212-07:00</updated><title type='text'>back or referesh error with siebel protocol in loadrunner</title><content type='html'>&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;hi  this is a very  common problem everyone facing while working on&lt;br /&gt;siebel protocol of loadrunner.&lt;br /&gt;this problem is coming from 2nd iteration .&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;solution is very simple&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;run the script and see in which web_url or web_submit, this problem is&lt;br /&gt;coming  soo  just change mode to http from html  and  resources from 0&lt;br /&gt;to 1.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;I hope this will  surely help you &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/8009636161930425511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/back-or-referesh-error-with-siebel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/8009636161930425511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/8009636161930425511'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/back-or-referesh-error-with-siebel.html' title='back or referesh error with siebel protocol in loadrunner'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-50275021492157231.post-3096045221121146374</id><published>2009-06-09T01:49:00.001-07:00</published><updated>2009-06-09T01:49:54.775-07:00</updated><title type='text'>How to convert Web based http Script to Java Vuser Script</title><content type='html'>&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;Hi All,&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;loadrunner has two file&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;1: sed.exe  (in loadrunner bin directory)&lt;br /&gt;2: web_to_java.sed (in loadrunner dat directory)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;with the help of above files we can convert a  WEB(http/html) script&lt;br /&gt;to java script&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;STEPS:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;1:Record your script using  WEB(HTML/HTTP) protocol.&lt;br /&gt;2:Add Loadrunner Bin directory to your PATH enviroment variable.&lt;br /&gt;3:Copy a part of your script to a text file (for example script.txt).&lt;br /&gt;4:Go to loadrunner DAT directory.&lt;br /&gt;5: run the following command&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;sed -f web_to_java.sed &quot;path of your script txt file&quot; &gt; &quot;Destination&lt;br /&gt;java file path&quot;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;ex:&lt;br /&gt;sed -f web_to_java.sed script.txt &gt;java.txt&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;Points to remember&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;1:  Java scrpit use &quot;&lt;&gt;&quot; parameter braces and httpl/html uses &quot;{ }&quot;.&lt;br /&gt;Above command will not replace this.  so manually we need to change&lt;br /&gt;this. Above command will put following warning before each line that&lt;br /&gt;uses parametrization&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;fixed_width&quot;  style=&quot;font-family:Courier, Monospaced;&quot;&gt;&quot;Suspected parameterization in next line. If true make sure to&lt;br /&gt;substitute {} with proper parameter braces on the parameter&quot;. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashank-khandelwal.blogspot.com/feeds/3096045221121146374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/how-to-convert-web-based-http-script-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/3096045221121146374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/50275021492157231/posts/default/3096045221121146374'/><link rel='alternate' type='text/html' href='http://shashank-khandelwal.blogspot.com/2009/06/how-to-convert-web-based-http-script-to.html' title='How to convert Web based http Script to Java Vuser Script'/><author><name>shashank</name><uri>http://www.blogger.com/profile/17827949893368736616</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_1FjmSnvbEp3JgivkoxwDVR5oun58CDVN7dnpV61I-2_2MDulu4-yB8isLw84JTa6ge4reHGSviwCDRFBIDvRQ8EpRZhXZFOfSngL5VcaISnf-MLoclvJrm4AdjNsLGg/s107/*'/></author><thr:total>1</thr:total></entry></feed>