Saturday, 20 December 2008

Diary: 20th December 2008

pCampBot for Fun and Romance
Opensim now includes your very own bot, called pCampBot, which you can use for load testing of your region or grid, and anything else you can think of ;-)

To get pCampBot download the latest binary from the OSGrid website, but you do not need to upgrade if you do not wish to, you can still use pCampBot. In the bin folder you will see some new files:


To run pCampBot you need to open a command console (Start, Run..., and type 'cmd' in the Open text box). You then need to navigate to the bin folder containing pCampBot.exe.

Once you are in the bin folder just typing 'pCampBot' at the prompt will display Help:

usage: pCampBot <-loginuri loginuri> [OPTIONS]
Spawns a set of bots to test an OpenSim region

-l, -loginuri loginuri for sim to log into (required)
-n, -botcount number of bots to start (default: 1)
-firstname first name for the bot(s) (default: random string)
-lastname lastname for the bot(s) (default: random string)
-password password for the bots(s) (default: random string)
-h, -help show this message

I found the easiest way to use pCampBot was to write a simple batch file in Notepad, and save it as CampBot01.bat

The script I used was as follows:

cd c:\Users\Administrator\Desktop\bin 7708\
start pCampBot.exe -l -firstname Test -lastname User -password test

The first line above is simply the path to the folder containing pCampBot (I always rename my bin folder to include the revision number, in this case: \bin 7708\)

The second line starts pCampBot, and gives the url of your region or grid, and the firstname, lastname and password of an existing user. If you want to test with a lot of bots, you will need to create user accounts for them first. I suggest Test1 User test, Test2 User test, etc.

You can then copy this batch file for as many bots as you want to login in, and rename them to CampBot02.bat, CampBot03.bat etc, and you only have to change the number in the firstname, in each file, i.e. Test1 to Test2 etc.

pCampBot does not keep still. He will leap about and walk around all over your sim, sometimes running off the edge of region boundary out into the void, so keep an eye on them on the mini-map!

You can type Help into the console at any time while pCampBot is logged in, and you will see some more commands:

Region# :
shutdown - graceful shutdown
addbots - adds n bots to the test
quit - forcequits, dangerous if you have not already run shutdown
Region# :

I tried using the addbots command, (addbots 2) but it just closed pCampBot down and closed the console window.

I also tried typing in some sentences to the pCampBotSentences.txt file, hoping that the bot would randomly utter some of the sentences I put in there, but alas he was completely mute.

I will look into pCampBot a little further, and update the Diary entry accordingly.

Merry Christmas to Everyone