ssh using php
I have setup an intranet of 10 machines(all running Ubuntu).One of them is the server hosting lets say Example Web Page. I use the other 9 machines to load test the server.Also intend to set up one PC as the master.So I have a master with 8 slaves testing www.example.com.The test scripts are installed on all the 9 machines & I have a browser form interface on my master node....
The form looks like
So i could do a test like ->
load server(Example Web Page) using 3 client machines; stressing vector 'webserver' (//one of the many testing programs installed on the client machines)
A sample php code would look (this is only for 3 machines)
No of Client MAchines : 1
The code ssh into 192.168.11.30 and runs the script.
However i still got 'ip' => "192.168.11.19" and 'ip' => "192.168.11.32" available and I may wish to use that after a certain time delay...
So i wish i could create some code that would enable the browser interface to give a message something like
"you got 2 more machines available!" Would you like to add more?:thumbs:
I would add one more field in the form
More Client MAchines: <input type="text" name="machines" /><br />
Eg.User selects 1, when they click submit,the PHP code should ssh into the next machine available which is "192.168.11.19"....and then report back,"you got 1 more machine available!" and so on.......
How would i do that?
Re: ssh using php
I don't know how much possible it is with PHP, but in Perl there are lot of modules at http://cpan.org to help you out.
|All times are GMT +5.5. The time now is 15:51.|