Re: How can I make different threads use different values?
Hi, Use counter and increment the variable. -Prakash On 07-Mar-2016 11:48 pm, "Sheetal Jharia Baru"wrote: > Hi Prakash , > > Using getThreadNum , I could get the thread number. I am running my threads > in loop. Is there a way I can get the loop number also ? > Thanks. > > On Thu, Mar 3, 2016 at 6:30 AM, Prakash Palnati < > prakash.paln...@snapwiz.com > > wrote: > > > You can use ctx.getThreadNum which will return the current thread number > > and use that variable to differentiate which image to point/download. > > > > -Prakash > > On 03-Mar-2016 1:40 am, "Sheetal Jharia Baru" > wrote: > > > > > I am using OS Sampler to execute a shell script on my local ubuntu > > system. > > > This script in turn downloads a image from remote repository. As > > expected , > > > when the script is run multiple times, same image is downloaded. Is > > there a > > > way that each thread can download a different image (can image become > > some > > > sort of variable and I can give different image name via this variable > to > > > each thread ? > > > Any help is appreciated. > > > Thanks ! > > > > > >
Re: How can I make different threads use different values?
Hi Prakash , Using getThreadNum , I could get the thread number. I am running my threads in loop. Is there a way I can get the loop number also ? Thanks. On Thu, Mar 3, 2016 at 6:30 AM, Prakash Palnatiwrote: > You can use ctx.getThreadNum which will return the current thread number > and use that variable to differentiate which image to point/download. > > -Prakash > On 03-Mar-2016 1:40 am, "Sheetal Jharia Baru" wrote: > > > I am using OS Sampler to execute a shell script on my local ubuntu > system. > > This script in turn downloads a image from remote repository. As > expected , > > when the script is run multiple times, same image is downloaded. Is > there a > > way that each thread can download a different image (can image become > some > > sort of variable and I can give different image name via this variable to > > each thread ? > > Any help is appreciated. > > Thanks ! > > >
Re: How can I make different threads use different values?
Here is the relevant documentation for distributed mode http://jmeter.apache.org/usermanual/remote-test.html On Thu, Mar 3, 2016 at 11:45 AM, Deepak Shettywrote: > >I believe JMeter has feature to simulate such scenario by invoking > multiple threads on different machines ? > You can distribute JMeter so that it runs on different machines - but you > really dont want each jmeter machine to only run one thread. > Its easier to run your request through a tunnel or proxy , see what the > command line is really sending to your server and then simulate that in > JMeter (there may be something like custom authentication schemes or binary > stuff that might prevent this approach) > > > > On Thu, Mar 3, 2016 at 11:19 AM, Sheetal Jharia Baru > wrote: > >> Deepak , >> You have a valid point. Running multiple OS processes may not simulate it >> accurately. In ideal case, we will have different users running the >> same *command >> line *requesting images from our single server (this server is load >> balanced obviously). >> I believe JMeter has feature to simulate such scenario by invoking >> multiple >> threads on different machines ? >> >> On Thu, Mar 3, 2016 at 3:14 AM, Deepak Shetty wrote: >> >> > >Even though it is http protocol , I have to use product specific >> commands >> > to download and upload the image to the URL. >> > And when real users are uploading/downloading images , they will all do >> so >> > from the same physical server - if not then you might not be able to >> > simulate this accurately - as running multiple OS processes on the same >> > server can be quite different than running the same process on different >> > servers (HTTP fares better in that respect) >> > >> > On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baru < >> sheeta...@gmail.com> >> > wrote: >> > >> > > Thanks for the links, I will go through them. >> > > Even though it is http protocol , I have to use product specific >> commands >> > > to download and upload the image to the URL. >> > > >> > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty >> wrote: >> > > >> > > > hi >> > > > yes this is pretty much standard for Jmeter. You can use variables >> > > > ${variableName} and you only need to setup how this variable gets >> > > > populated. The most common element used is CSV data set config - but >> > > there >> > > > are others too (read the component reference) >> > > > >> > > > See - >> > > > >> > > > >> > > >> > >> http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config >> > > > And you can google for tutorials >> > > > >> > > > >> > > >> > >> https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial=utf-8=utf-8 >> > > > >> > > > >> > > > Im curious why you are using an OS Sampler for the purpose of >> > downloading >> > > > an image ? is the protocol not HTTP ? >> > > > regards >> > > > deepak >> > > > >> > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < >> > > sheeta...@gmail.com> >> > > > wrote: >> > > > >> > > > > I am using OS Sampler to execute a shell script on my local ubuntu >> > > > system. >> > > > > This script in turn downloads a image from remote repository. As >> > > > expected , >> > > > > when the script is run multiple times, same image is downloaded. >> Is >> > > > there a >> > > > > way that each thread can download a different image (can image >> become >> > > > some >> > > > > sort of variable and I can give different image name via this >> > variable >> > > to >> > > > > each thread ? >> > > > > Any help is appreciated. >> > > > > Thanks ! >> > > > > >> > > > >> > > >> > >> > >
Re: How can I make different threads use different values?
>I believe JMeter has feature to simulate such scenario by invoking multiple threads on different machines ? You can distribute JMeter so that it runs on different machines - but you really dont want each jmeter machine to only run one thread. Its easier to run your request through a tunnel or proxy , see what the command line is really sending to your server and then simulate that in JMeter (there may be something like custom authentication schemes or binary stuff that might prevent this approach) On Thu, Mar 3, 2016 at 11:19 AM, Sheetal Jharia Baruwrote: > Deepak , > You have a valid point. Running multiple OS processes may not simulate it > accurately. In ideal case, we will have different users running the > same *command > line *requesting images from our single server (this server is load > balanced obviously). > I believe JMeter has feature to simulate such scenario by invoking multiple > threads on different machines ? > > On Thu, Mar 3, 2016 at 3:14 AM, Deepak Shetty wrote: > > > >Even though it is http protocol , I have to use product specific > commands > > to download and upload the image to the URL. > > And when real users are uploading/downloading images , they will all do > so > > from the same physical server - if not then you might not be able to > > simulate this accurately - as running multiple OS processes on the same > > server can be quite different than running the same process on different > > servers (HTTP fares better in that respect) > > > > On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baru > > > wrote: > > > > > Thanks for the links, I will go through them. > > > Even though it is http protocol , I have to use product specific > commands > > > to download and upload the image to the URL. > > > > > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty > wrote: > > > > > > > hi > > > > yes this is pretty much standard for Jmeter. You can use variables > > > > ${variableName} and you only need to setup how this variable gets > > > > populated. The most common element used is CSV data set config - but > > > there > > > > are others too (read the component reference) > > > > > > > > See - > > > > > > > > > > > > > > http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config > > > > And you can google for tutorials > > > > > > > > > > > > > > https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial=utf-8=utf-8 > > > > > > > > > > > > Im curious why you are using an OS Sampler for the purpose of > > downloading > > > > an image ? is the protocol not HTTP ? > > > > regards > > > > deepak > > > > > > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < > > > sheeta...@gmail.com> > > > > wrote: > > > > > > > > > I am using OS Sampler to execute a shell script on my local ubuntu > > > > system. > > > > > This script in turn downloads a image from remote repository. As > > > > expected , > > > > > when the script is run multiple times, same image is downloaded. Is > > > > there a > > > > > way that each thread can download a different image (can image > become > > > > some > > > > > sort of variable and I can give different image name via this > > variable > > > to > > > > > each thread ? > > > > > Any help is appreciated. > > > > > Thanks ! > > > > > > > > > > > > > > >
Re: How can I make different threads use different values?
Deepak , You have a valid point. Running multiple OS processes may not simulate it accurately. In ideal case, we will have different users running the same *command line *requesting images from our single server (this server is load balanced obviously). I believe JMeter has feature to simulate such scenario by invoking multiple threads on different machines ? On Thu, Mar 3, 2016 at 3:14 AM, Deepak Shettywrote: > >Even though it is http protocol , I have to use product specific commands > to download and upload the image to the URL. > And when real users are uploading/downloading images , they will all do so > from the same physical server - if not then you might not be able to > simulate this accurately - as running multiple OS processes on the same > server can be quite different than running the same process on different > servers (HTTP fares better in that respect) > > On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baru > wrote: > > > Thanks for the links, I will go through them. > > Even though it is http protocol , I have to use product specific commands > > to download and upload the image to the URL. > > > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty wrote: > > > > > hi > > > yes this is pretty much standard for Jmeter. You can use variables > > > ${variableName} and you only need to setup how this variable gets > > > populated. The most common element used is CSV data set config - but > > there > > > are others too (read the component reference) > > > > > > See - > > > > > > > > > http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config > > > And you can google for tutorials > > > > > > > > > https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial=utf-8=utf-8 > > > > > > > > > Im curious why you are using an OS Sampler for the purpose of > downloading > > > an image ? is the protocol not HTTP ? > > > regards > > > deepak > > > > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < > > sheeta...@gmail.com> > > > wrote: > > > > > > > I am using OS Sampler to execute a shell script on my local ubuntu > > > system. > > > > This script in turn downloads a image from remote repository. As > > > expected , > > > > when the script is run multiple times, same image is downloaded. Is > > > there a > > > > way that each thread can download a different image (can image become > > > some > > > > sort of variable and I can give different image name via this > variable > > to > > > > each thread ? > > > > Any help is appreciated. > > > > Thanks ! > > > > > > > > > >
Re: How can I make different threads use different values?
Hi Deepak, Prakash, Thanks a lot for your help. Both CSV Data Set config and ctx.getThreadNum solved my problem. I am new to JMeter and finding this small piece of info in vast documentation was difficult. Thanks! On Thu, Mar 3, 2016 at 6:30 AM, Prakash Palnatiwrote: > You can use ctx.getThreadNum which will return the current thread number > and use that variable to differentiate which image to point/download. > > -Prakash > On 03-Mar-2016 1:40 am, "Sheetal Jharia Baru" wrote: > > > I am using OS Sampler to execute a shell script on my local ubuntu > system. > > This script in turn downloads a image from remote repository. As > expected , > > when the script is run multiple times, same image is downloaded. Is > there a > > way that each thread can download a different image (can image become > some > > sort of variable and I can give different image name via this variable to > > each thread ? > > Any help is appreciated. > > Thanks ! > > >
Re: How can I make different threads use different values?
You can use ctx.getThreadNum which will return the current thread number and use that variable to differentiate which image to point/download. -Prakash On 03-Mar-2016 1:40 am, "Sheetal Jharia Baru"wrote: > I am using OS Sampler to execute a shell script on my local ubuntu system. > This script in turn downloads a image from remote repository. As expected , > when the script is run multiple times, same image is downloaded. Is there a > way that each thread can download a different image (can image become some > sort of variable and I can give different image name via this variable to > each thread ? > Any help is appreciated. > Thanks ! >
Re: How can I make different threads use different values?
>Even though it is http protocol , I have to use product specific commands to download and upload the image to the URL. And when real users are uploading/downloading images , they will all do so from the same physical server - if not then you might not be able to simulate this accurately - as running multiple OS processes on the same server can be quite different than running the same process on different servers (HTTP fares better in that respect) On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baruwrote: > Thanks for the links, I will go through them. > Even though it is http protocol , I have to use product specific commands > to download and upload the image to the URL. > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty wrote: > > > hi > > yes this is pretty much standard for Jmeter. You can use variables > > ${variableName} and you only need to setup how this variable gets > > populated. The most common element used is CSV data set config - but > there > > are others too (read the component reference) > > > > See - > > > > > http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config > > And you can google for tutorials > > > > > https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial=utf-8=utf-8 > > > > > > Im curious why you are using an OS Sampler for the purpose of downloading > > an image ? is the protocol not HTTP ? > > regards > > deepak > > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < > sheeta...@gmail.com> > > wrote: > > > > > I am using OS Sampler to execute a shell script on my local ubuntu > > system. > > > This script in turn downloads a image from remote repository. As > > expected , > > > when the script is run multiple times, same image is downloaded. Is > > there a > > > way that each thread can download a different image (can image become > > some > > > sort of variable and I can give different image name via this variable > to > > > each thread ? > > > Any help is appreciated. > > > Thanks ! > > > > > >
Re: How can I make different threads use different values?
Thanks for the links, I will go through them. Even though it is http protocol , I have to use product specific commands to download and upload the image to the URL. On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shettywrote: > hi > yes this is pretty much standard for Jmeter. You can use variables > ${variableName} and you only need to setup how this variable gets > populated. The most common element used is CSV data set config - but there > are others too (read the component reference) > > See - > > http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config > And you can google for tutorials > > https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial=utf-8=utf-8 > > > Im curious why you are using an OS Sampler for the purpose of downloading > an image ? is the protocol not HTTP ? > regards > deepak > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru > wrote: > > > I am using OS Sampler to execute a shell script on my local ubuntu > system. > > This script in turn downloads a image from remote repository. As > expected , > > when the script is run multiple times, same image is downloaded. Is > there a > > way that each thread can download a different image (can image become > some > > sort of variable and I can give different image name via this variable to > > each thread ? > > Any help is appreciated. > > Thanks ! > > >
Re: How can I make different threads use different values?
hi yes this is pretty much standard for Jmeter. You can use variables ${variableName} and you only need to setup how this variable gets populated. The most common element used is CSV data set config - but there are others too (read the component reference) See - http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config And you can google for tutorials https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial=utf-8=utf-8 Im curious why you are using an OS Sampler for the purpose of downloading an image ? is the protocol not HTTP ? regards deepak On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baruwrote: > I am using OS Sampler to execute a shell script on my local ubuntu system. > This script in turn downloads a image from remote repository. As expected , > when the script is run multiple times, same image is downloaded. Is there a > way that each thread can download a different image (can image become some > sort of variable and I can give different image name via this variable to > each thread ? > Any help is appreciated. > Thanks ! >
How can I make different threads use different values?
I am using OS Sampler to execute a shell script on my local ubuntu system. This script in turn downloads a image from remote repository. As expected , when the script is run multiple times, same image is downloaded. Is there a way that each thread can download a different image (can image become some sort of variable and I can give different image name via this variable to each thread ? Any help is appreciated. Thanks !