0
votes

I have to make a jmeter script to connect putty and provide host name and click on connect which will open a cmd asking for user name and pwd. Post which I have to type slrum command that is sinfo and it will retrieve data and finally an exit. I have used plink to achieve the same. In command parameter of os sampler, /C Plink -ssh user@host -pw password

I am able to successfully connect to putty and reach till pwd entry. On typing slrum command in cmd manually,it is fetching result but the same sinfo when am trying to achieve through os process sampler it is giving error as sinfo command not found. How to provide sinfo command from os process sampler to fetch correct output.

1

1 Answers

0
votes

I don't know what is slrum or sinfo but I can think about some possible reasons:

  1. You're logging into a session which doesn't call shell scripts to set the relevant PATH environment variable, i.e. this issue suggests to add /usr/local/bin to your PATH. I'm not sure how your installation looks like but you could try to use the full path like:

    /usr/local/bin/sinfo 
    

    or whatever

  2. You might want to pass -ssh key to your plink to force to use SSH protocol

  3. And last but not the least, there is SSH Command plugin which don't require 3rd-party executables

Demo:

enter image description here

More information: How to Run External Commands and Programs Locally and Remotely from JMeter