PCampBot/de

From OpenSimulator

Revision as of 01:07, 11 November 2021 by Manni (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Verwendung von pCampbot ab OpenSimulator 0.7.6

pCampBot hat sich im OpenSimulator-Entwicklungscode erheblich geändert. Hier ist die aktuelle Verwendungsanweisung, die Sie erhalten, wenn Sie pCampBot.exe ab OpenSimulator 0.7.6 ausführen.

Verwendung: pCampBot <-loginuri loginuri> [OPTIONS]
Spawnt eine Reihe von Bots, um eine OpenSim-Region zu testen

  -l, -loginuri      - loginuri für Grid/Standalone (erforderlich)
  -s, -start         - Startposition für Bots (optional).  Kann "last", "home" oder ein bestimmter Ort mit oder ohne Koordinaten sein (zB "region1" oder "region2/50/30/90"
  -firstname         - Vorname für die Bots (erforderlich)
  -lastname          - Nachname für die Bots (erforderlich).  An jeden Nachnamen wird _<bot-number> angehängt, zB Ima Bot_0
  -password          - Passwort für die Bots (erforderlich)
  -n, -botcount      - Anzahl der zu startenden Bots (Standard: 1) (optional)
  -f, -from          - Startnummer für Login-Bot-Namen, zB 25 wird Ima Bot_25, Ima Bot_26 usw. anmelden (Standard: 0) (optional)
  -c, -connect       - alle Bots beim Start verbinden (optional)
  -b, behaviours     - Verhaltens für Bots.  Komma getrennt, zB p,g.  Standard ist p (erforderlich)
    aktuelle Optionen sind:
        p (Physik - Bots bewegen und springen ständig herum)
        g (grab - Bots klicken zufällig auf Prims, egal ob sie anklickbar sind oder nicht)
        n (keine - Bots tun nichts)
        t (teleportieren - Bots teleportieren sich regelmäßig zwischen Regionen im Netz)
  -wear              - Ordner, aus dem die Erscheinungsdaten geladen werden, "no", wenn kein solcher Ordner vorhanden ist (Standard: no) (optional)
  -h, -help          - diese Nachricht anzeigen.

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.

Because pCampbot connects bots using the libopenmetaverse library in the same manner that an ordinary viewer program would connect, you can use the pCampbot in 0.7.6 or later to test earlier versions of OpenSimulator.

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" at 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.

Caveats

  • A pCampBot synthetic bot load is still an extremely poor proxy for a 'real' connection (i.e. a real human being logging in with a viewer and doing all the things they expect to be able to do in a virtual world). Real connections are very likely to place different stresses on the simulator so real-world performance may be considerably different and poorer than synthetic load tests would suggest.
  • There are some things you can do to improve this in pCampbot. For instance, if you have RequestObjectTextures set in pCampbot.ini then pCampbot will request textures for all objects it sees. This is both much less stressful than a real scenario (since for a particular sets of bots textures are only requested once) and more stressful (since there is never any caching).
  • pCampbot does currently not work well if there are any surrounding regions. Avatars will currently just walk off into oblivion. You must either build fences or remove such regions. In testing so far, the presence of neighbouring regions does not have any great impact on performance in the region occupied by bots. However, these tests were performed with blank surrounding regions - surrounding regions containing objects will place more initial stress on the bot connections as object data is downloaded (and textures if this option is active).

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. Depending on your bandwidth and the bot settings you can connect quite a large number of bots but for this example we will stick with 5. Here are the steps to take.

Step 1: Create bot accounts

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 ( dead link ) 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.

Step 2: Start pCampbot

The next step is to start up pCampbot with the required connection parameters. Let us suppose that you want to test against a region called "r1" on a local grid with a loginuri of http://192.168.1.2:8002. Let us assume that you've given the bots the password "plentyofruth". The command to run is then

mono --debug pCampBot.exe -loginuri http://192.168.1.2:8002 -s r1 -firstname ima -lastname bot -password plentyofruth

This will start up pCampbot and you'll see a familiar console command line as you would on a simulator or Robust console. As with the other consoles, you can type "help" to get a list of commands.

As of OpenSimulator 0.7.6, pCampbot by default starts without automatically connecting the bots.

Step 3: Connect the bots

Once you're ready, type the command

conn

to start connecting the bots. You will see the connection messages on the console and if all goes well you'll see the bots appear on the region. The default bot behaviour is "physics", so the bots will start walking and jumping around to test and load up region physics.

A client connection is a complicated affair so you'll probably see many warnings and debug messages of different severity on the console. But as long as the bot it present in the region you can assume that the connection has succeeded.

Step 4: Assess performance

Now this is quite tricky, since there's currently no automated way of assessing simulator or connection performance. Manual ways to assess this include logging in a viewer to the same region to get a feel for avatar movement (e.g. is it jerky, is there rubberbanding, is chat delayed, etc.) and to see viewer statistics such as Ping Sim, Packet Loss, Physics Time (frame) and Spare Time (frame).

However, one needs to be extremely careful if logging in using a viewer on the same machine from which the bots are running. The bots should really be running from a different machine or ideally even from a different network in order to get a more accurate picture of current simulator performance.

One can also look at server side monitoring, particularly "show stats clientstack" which will show various client stack related statistics (this is the part of the OpenSimulator code that handles receiving and sending of UDP messages from viewers). In particular, the InboxPacketsCount should be constantly 0 or near 0 - a build up here means that your simulator is receiving UDP packets quicker than it can process them.

Step 5: Disconnect bots

Once you've finished, you can disconnect the bots in an orderly fashion with the command

disconn

Once all the bots are disconnected you can exit pCampbot with the command

quit

or reconnect the bots if you want. You can also see the current connection status of bots with the command

show bots

at any time.

Personal tools
General
About This Wiki