3.2. Target Helper Components

3.2.1. nicegroup.sh

Renice all latency-client (or specified) processes to max priority (-20) (or specified priority).
Usage: nicegroup.sh [options]
  options:
    -p <process name> is the name of all the processes to renice (default: latency-client)
    -n <priority>     is the new priority to give them (default: -20)
                      must be in range -20 to 20 inclusive (highest:-20 lowest:20 default:0)
    -h                this help screen
        

As part of the target setup set the priority of the processes along the critical path to the highest priority. Although this is probably irrelevant, this script sets all processes of a given name (latency-client by default) to a given nice level (-20 by default).

Use the -p option to specify the name of a different process. Use the -n option to provide a different niceness level.

3.2.2. chrtgroup.sh

chrt to SCHED_FIFO (default: 99) all processes by name (default latency-client)
Usage: chrtgroup.sh [options]
  options:
    -p <process name> is the name of all the processes to chrt (default: latency-client)
    -n <priority>     is the new priority to give them (default: 99)
                      must be in range 0 to 99 inclusive (highest:99 lowest:0 default:99)
    -h                this help screen
        

This script works very much like nicegroup.sh except that instead of renicing processes, this script changes their POSIX.1b (formerly POSIX.4) real-time priority level.

3.2.3. TS-target.sh

Setup a target machine for running latency tests.
Usage: TS-target.sh [options] <host IP> <latency serial device>
  where:
    <host IP> is the IP address of the host (collection) machine.
    <latency serial device> The name of the device with the specialized
                            latency serial driver which is connected to
                            the host machine. Specified as (for example)
                            "ttyS0", not "/dev/ttyS0".
  options:
    -h          Print this usage information and quit.
    -c <num>    The number of drones to run (default 10)
                0 <= num <= 100.
    -s <num>    The number of serial devices to serialblast (excluding the
                latency device). All serial devices on the machine are
                discovered, sorted numerically, then the first <num> will
                be used (without the special one).
                Default: take the first 1000 devices found.
        

This was the only script needed to be run on the target boards for setting up TS2; it was also used as part of the setup for TS3. Simply reboot the board into the correct kernel, then run this one script once the prompt came up. This script starts up all the other required processes and changes their priority levels as required.

This script requires the IP address of the host (it's the IP address the UDP packets will be addressed to) and the name of the serial device that is connected to the host to be provided. All other serial devices that are found on the system will have a data load. NOTE: the other serial devices are discovered by grepping dmesg so don't clear it out.

3.2.4. dolots.sh

This is a script which is used to create a lot of load on the target machine. Run it and specify the IP address of the host.