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
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.
- sits idle
- starts a browser
- loads urls
- stops the browser
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
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.
- Create a user called "test" using either the gnome user manager or the
- cd ~test
- sudo tar -xvzf /path/to/simulate_user-0.001.tar.gz
- Log the test user in, either by autologin or manually.
If you just want to try it out on your laptop/destop without logging out,
Bugs/Comments/Corrections to gmccullagh [AT] gmail [dot] com
- press [ctrl][alt][F1]
- login as test
- run startx -- :1
- switch back to your desktop with [ctrl][alt][F7]