linux1

linux1Sometimes it is necessary for the load test to send a linux command to verify the content/file exists in the remote linux server. Every time it is not a fair idea to connect remote server by file server browsers like winscp ,putty etc… as it is a load test. In such situations JMETER offers a sampler called ‘SSH sampler’ . This sampler is introduced to communicate with the linux server over ssh shell . It will be definitely useful for both Functional and Performance Testers.

Apache Jmeter’s SSH Sampler:

Sampler which will connect to linux server and execute linux commands

Steps in detail:

1) Download SSH Sampler plugin from google’s website
https://code.google.com/p/jmeter-ssh-sampler/
2) Copy the jar to your local Apache Jmeter’s “lib/ext” folder.

3) Download “jsch-0.1.51.jar” and place it in your local Apache Jmeter’s “lib/” folder.

4) Open Jmeter-> ThreadGroup->Samplers-> SSH Command

5) Give hostname,username, password and the linux command to be executed

6) Run Jmeter

7) Capture results in ‘View Results Tree’

 

Here is the image for your reference:

test