Cannot Find oltp test on sysbench
From the output, it looks like you have installed latest sysbench 1.0. So, you can try prepare command as below -
sysbench --db-driver=mysql --mysql-user=root --mysql-password=<pwd> \ --mysql-socket=<mysql.sock path> --mysql-db=foo --range_size=100 \ --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 \ --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua prepare
Before running the prepare command, open the mysql console and create a database foo - create database foo. If you have mysql installation is in standard location, path of mysql.sock is not required.
8 tables are created inside database foo using the above command, you can check them on mysql console using following command - use database foo, show tables etc.
Then you can run the benchmark as follows -
sysbench --db-driver=mysql --mysql-user=root --mysql-password=<pwd> \ --mysql-socket=<mysql.sock path> --mysql-db=foo --range_size=100 \ --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 \ --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua run
Note: there are many workload inside share folder of sysbench, apart from oltp_read_only, you can play around them. There is enough documentation provide on the github link - https://github.com/akopytov/sysbench
The dpkg
tool is handy to show where files for an installed package are stored on the system. I used it when locating the test scripts for sysbench 1.0.14. See the man page for more options
# dpkg --listfiles sysbench.../usr/share/sysbench/bulk_insert.lua/usr/share/sysbench/select_random_ranges.lua/usr/share/sysbench/oltp_update_non_index.lua/usr/share/sysbench/oltp_delete.lua/usr/share/sysbench/oltp_update_index.lua/usr/share/sysbench/oltp_read_write.lua/usr/share/sysbench/oltp_point_select.lua...