A Quick 'n' Dirty User Simulator

This is just a simple set of scripts which attempt to simulate the load created by a desktop user on an Ubuntu system. It probably works on some/most other linux distributions, but I certainly haven't tested that.

At the minute, the script simply starts gnome, and then for a given duration,

at random weighted intervals. It is hoped that this can be made more complex, possibly using AT-SPI (dogtail, ldtp) or some such stuff but for now, this will hopefully give us a start.

The script is intended to be run multiple times concurrently to give an idea of how many users a multi-user system (eg an LTSP system) can be expected to take. Each firefox instance therefore runs in a separate space in the home directory (based on the existence of $SSH_CLIENT). However, GNOME doesn't seem to pay attention to $HOME so there may be some issues with it. It's not dangerous, it's just the gnome sessions in the test might get a little confused. They can always just be deleted anyway.


You can download the script set from here:

Quick Start Instructions

  1. Create a user called "test" using either the gnome user manager or the adduser command.
  2. cd ~test
  3. sudo tar -xvzf /path/to/simulate_user-0.001.tar.gz
  4. Log the test user in, either by autologin or manually.
Once you have it working, you might want to edit /home/test/simulate_user/config to change the duration and the weight of the functions and /home/test/simulate_user/urls.txt to add a more diverse, realistic set of URLs to browse to, eg actual youtube video pages with sound, flash animations, etc.

If you just want to try it out on your laptop/destop without logging out, you can

  1. press [ctrl][alt][F1]
  2. login as test
  3. run startx -- :1
  4. switch back to your desktop with [ctrl][alt][F7]
Bugs/Comments/Corrections to gmccullagh [AT] gmail [dot] com