PCampBot

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Instruction for pCampbot as of OpenSimulator 0.7.6)
Line 38: Line 38:
  
 
and change pCampbot.ini accordingly.
 
and change pCampbot.ini accordingly.
 +
 +
== Example ==
 +
Okay, let's suppose that we're on Linux and want to create a 5 bot synthetic load test on a region called myregion1.
 +
 +
The first step is to create 5 bot accounts, all with the same password.  Each bot account must have the same first name and the same last name prefix.  But each bot must also have its last name prefix appended with an underscore (_) and its bot number, starting from 0.  In this case, we want five bots, and lets suppose we will call them "ima bot".  Then the five accounts that we want are
 +
 +
ima bot_0
 +
ima bot_1
 +
ima bot_2
 +
ima bot_3
 +
ima bot_4
 +
 +
The classic way to create a user account is to do it by using the "create user" command on the OpenSimulator standalone or Robust service console, depending on whether one is running in standalone or grid mode.  However, this can be laborious, particularly if one needs hundreds of bot accounts.  There's a very basic python script at https://github.com/justincc/opensimulator-tools/blob/master/create-user-line-generator/src/culg.py which will generate the user lines needed, giving each account a non-random UUID for later debugging purposes.  The lines that this script generated can be pasted directly into the OpenSimulator console.
 +
  
 
= Old instructions =
 
= Old instructions =

Revision as of 13:51, 31 October 2013

Contents

Instructions for pCampbot as of OpenSimulator 0.7.6

pCampBot has changed considerably in OpenSimulator development code. Here is the current usage statement that you'll get if you execute pCampBot.exe as of OpenSimulator 0.7.6.

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

  -l, -loginuri      loginuri for grid/standalone (required)
  -s, -start         start location for bots (optional).  Can be "last", "home" or a specific location with or without co-ords (e.g. "region1" or "region2/50/30/90"
  -firstname         first name for the bots (required)
  -lastname          lastname for the bots (required).  Each lastname will have _<bot-number> appended, e.g. Ima Bot_0
  -password          password for the bots (required)
  -n, -botcount      number of bots to start (default: 1) (optional)
  -f, -from          starting number for login bot names, e.g. 25 will login Ima Bot_25, Ima Bot_26, etc.  (default: 0) (optional)
  -c, -connect       connect all bots at startup (optional)
  -b, behaviours     behaviours for bots.  Comma separated, e.g. p,g.  Default is p (required)
    current options are:
       p (physics  - bots constantly move and jump around)
       g (grab     - bots randomly click prims whether set clickable or not)
       n (none     - bots do nothing)
       t (teleport - bots regularly teleport between regions on the grid)
  -wear              folder from which to load appearance data, "no" if there is no such folder (default: no) (optional)
  -h, -help          show this message.

You must have already created all the necessary bot accounts in the simulator before using pCampbot. It does not create these accounts on the fly.

The -wear option almost certainly doesn't work. The others are operational.

On using this facility you'll get a console command line similar to the one in OpenSimulator and Robust. Type help on this prompt to see further commands.

Optional pCampbot.ini configuration

pCampbot has some further optional configuration options relating to detailed bot behaviour in pCampbot.ini.example. To change these from the defaults

cp pCampbot.ini.example pCampbot.ini

and change pCampbot.ini accordingly.

Example

Okay, let's suppose that we're on Linux and want to create a 5 bot synthetic load test on a region called myregion1.

The first step is to create 5 bot accounts, all with the same password. Each bot account must have the same first name and the same last name prefix. But each bot must also have its last name prefix appended with an underscore (_) and its bot number, starting from 0. In this case, we want five bots, and lets suppose we will call them "ima bot". Then the five accounts that we want are

ima bot_0
ima bot_1
ima bot_2
ima bot_3
ima bot_4

The classic way to create a user account is to do it by using the "create user" command on the OpenSimulator standalone or Robust service console, depending on whether one is running in standalone or grid mode. However, this can be laborious, particularly if one needs hundreds of bot accounts. There's a very basic python script at https://github.com/justincc/opensimulator-tools/blob/master/create-user-line-generator/src/culg.py which will generate the user lines needed, giving each account a non-random UUID for later debugging purposes. The lines that this script generated can be pasted directly into the OpenSimulator console.


Old instructions

These relate to OpenSimulator 0.7.2 and earlier but pCampBot may not have been operational for a couple of releases.


This is the PhysicsCamperbot libslBot tester.

This is designed to be run in standalone mode with authorize accounts turned off as a way to stress test the simulator. It creates <N> clients that log in, randomly jump/walk around, and say excuses from the BOFH.

      • WARNING ***

Using this bot on a public grid could get you banned permanently, so just say No! to griefing!


Setup -----

Linux: To build, in the main opensim directory, run:

 ./runprebuild.sh
 nant

Windows: Run the prebuild.bat in the main opensim directory and then open the created solution and compile it.

pCampBot.exe will end up in the regular opensim/bin folder


Running the bot -----

windows: pCampBot.exe -botcount <N> -loginuri <URI>

  • nix: mono pCampBot.exe -botcount <N> -loginuri <URI>

The names it produces are random by default, however, you can specify either a firstname or a lastname in the command line also.

ex: pCampBot.exe -botcount <N> -loginuri <URI> -lastname <lastname>

If you specify both a firstname *and* a lastname, you'll likely run into trouble unless you're only running a single bot. In that case, there's also a password option.

pCampBot.exe -botcount 1 -loginuri http://somegrid.com:8002 -firstname SomeDude -lastname SomeDude -password GobbleDeGook


Commands -----

The bot has console commands:

 help       - lists the console commands and what they do
 shutdown   - gracefully shuts down the bots
 quit       - forcefully shuts things down leaving stuff unclean
 addbots N  - adds N number of random bots. (replace 'N' with a number)

From the README.txt included with the source

Personal tools
General
About This Wiki