15 | | * logs: Here waveform's modules will store their logs, in per-waveform sub-directories. |
16 | | * reports: This is where statistics value reports are written |
17 | | * swman_execs: Here modules' binaries can be reached (can contain symbolic links), in per-platform sub-directories. |
18 | | * swman_apps: Path for application definitions (e.g.: wimax.app) |
19 | | * statsman: Initialization parameter definitions, in per-waveform sub-directories. |
20 | | |
21 | | '''NOTE''': Make sure that swman_execs/linux contains (or links to) your waveform binaries compiled for the platform you plan to launch them. In the case of the example waveforms, the executables at placed at /usr/local/bin during the installation then, this is where the ''linux'' folder should link to. |
22 | | |
23 | | Also during the installation, the default repository folder has been set to one provided in the source package, relative to the path where you untar'd it. |
24 | | |
25 | | So, launching ALOE is as easy as going to the source directory and type: |
| 15 | * logs: Module logs in a directory for each waveform. |
| 16 | * reports: Module statistic reports in a directory for each waveform. |
| 17 | * statsman: Module initialization parameters in a directory for each waveform. |
| 18 | * swman_execs: Module binaries in a directory for each platform. |
| 19 | * swman_apps: Application descriptions. |
| 20 | |
| 21 | '''NOTE''': Make sure that swman_execs/linux contains (or links to) your waveform binaries compiled for linux. Distributed objects are configured to be installed at /usr/local/bin, therefore, swman_execs/linux should link to that path. |
| 22 | |
| 23 | ALOE Linux needs to access this repository. Path can be selected permanently in a configuration file or as an argument in the launcher. By default, it is defined in a configuration file and points to 'example-repository/', relative to the current directory. Therefore, ALOE can be launched from the downloaded source directory by simply typing: |
44 | | * ''-r [repository_path]'': Location where cofiguration, executables and applications subdirectories are found (see before). |
45 | | * ''-c [platform_cfg_file]'': Configuration file for platform parameters and list of daemons to launch, see Customizing your Platform, below. ''Default'': /usr/local/etc/daemons.conf |
46 | | * ''-i [xitf_cfg_file]'': Configuration file for external interfaces, see Customizing your Platform. ''Default'': /usr/local/etc/xitf.conf |
47 | | * ''--daemon'': Run PHAL in background. You should specify an output file (for standard output) so you can track what's happening. Also '''cmdman''' daemon should be launched as a daemon preventing to read from input (see below, Launching ALOE as a Daemon). ''Default'': Foreground. |
48 | | * ''-o [output_file]'': File to redirect standard output. ''Default'': None, terminal stdout. |
49 | | |
50 | | |
51 | | [[BR]] |
52 | | |
53 | | == Running a waveform: Basic ALOE commands == |
54 | | |
55 | | ALOE can be controlled from a text console by typing commands. Basically, running a waveform compromises 3 steps: ''loading'', ''initializing'' and ''running''. You will do such by typing the appropriate commands in the input console. In the next example, we will load, initialise and run the example waveform. |
56 | | |
57 | | Once ALOE has been started (by default typing {{{ runph }}} from the source directory, we will load the waveform by typing in the prompt: |
58 | | {{{ |
59 | | runph$: phload example |
60 | | }}} |
61 | | |
62 | | then initialize: |
63 | | {{{ |
64 | | runph$: phinit example |
65 | | }}} |
66 | | |
67 | | and finally run: |
68 | | {{{ |
69 | | runph$: phrun example |
70 | | }}} |
71 | | |
72 | | Now the waveform is running. We can see current processes information typing: |
73 | | {{{ |
74 | | runph$: execinfo example |
75 | | }}} |
76 | | |
77 | | Or the available statistics |
78 | | {{{ |
79 | | runph$: statls example |
80 | | }}} |
81 | | |
82 | | You also can pause the execution or run a finite number of steps, type: |
83 | | {{{ |
84 | | runph$: phpause example |
85 | | runph$: phrun example 1000 |
86 | | }}} |
| 43 | * ''-r [repository_path]'': Path to the repository directory. |
| 44 | * ''-c [platform_cfg_file]'': Platform parameters configuration file. See [#CustomizingyourPlatform]. ''Default'': /usr/local/etc/daemons.conf |
| 45 | * ''-i [xitf_cfg_file]'': External interfaces configuration file. See [#CustomizingyourPlatform]. ''Default'': /usr/local/etc/xitf.conf |
| 46 | * ''--daemon'': Run PHAL in background. ''Default'': Foreground. |
| 47 | * ''--no-daemon'': Run PHAL in foreground. |
| 48 | * ''-o [output_file]'': File to redirect standard output when running as background. ''Default'': output.log |
| 49 | |
94 | | '''Platform Configuration File''': This file has one mandatory section, ''[cpu_info]'', and N optional sections, ''[daemon]''. The second selects which daemons (and their path) will be launched by runph. You can add or remove them according to which daemons you need in your platform (see PhalManual). This sections have two fields only: |
95 | | * ''path'': Path where the executable is. |
96 | | * ''output'': File to redirect standard output (for logging purposes) |
97 | | |
98 | | In the CPU section, you can specify some default ALOE configuration parameters. '''Note''': This parameters are overridden by the ones passed as arguments to the ALOE Launcher. See section above for more details. |
| 57 | '''Platform Configuration File''': This file has one mandatory section, ''[cpu_info]'', and N optional sections, ''[daemon]''. The second selects which daemons (and their path) will be launched by runph. You can add or remove them according to which daemons you need in your platform. By default, any platform should run the following daemons: |
| 58 | * frontend |
| 59 | * swload |
| 60 | * exec |
| 61 | * bridge |
| 62 | * sync |
| 63 | * stats |
| 64 | |
| 65 | Optionally, the following daemons can be set: |
| 66 | * swman |
| 67 | * hwman |
| 68 | * statsman |
| 69 | * sync_master |
| 70 | |
| 71 | A single-processor configuration should launch all the daemons except '''sync''' and '''sync_master''' (synchronization is not needed). See MultiProcessorGuide to learn how to work with multi-processors. |
| 72 | |
| 73 | In the CPU section, you can specify some default ALOE configuration parameters. '''Note''': This parameters are overridden by the ones passed as arguments to the ALOE Launcher. |
125 | | Running ALOE in background is often interesting when long time executions are going to be performed. In foreground executions, disconnecting user terminal (or ssh session) will kill ALOE processes. This can be avoided if the user launches ALOE with the ''daemon'' option (as an argument or in the platform configuration file, see above) and appropriate selects an output file. |
126 | | |
127 | | When running in this mode, '''CMDMANAGER''' daemon must be also launched as daemon as it can't read commands from standard input any more, and a tcp socket should be created for this purpose. Then, another CMDMANAGER process (local or remote) can connect to it and send normal ALOE commands (as if it was local). |
128 | | |
129 | | To do so, make sure you follow these steps: |
| 100 | Running ALOE in background is often interesting when long time executions are going to be performed. In foreground executions, disconnecting user terminal (or ssh session) will kill ALOE processes. This can be avoided if the user launches ALOE with the ''daemon'' option (as an argument or in the platform configuration file, see above). |
| 101 | |
| 102 | Running ALOE in background: |
| 124 | |
| 125 | == Running a waveform: Basic ALOE commands == |
| 126 | |
| 127 | ALOE can be controlled from a text console by typing commands. Basically, running a waveform compromises 3 steps: ''loading'', ''initializing'' and ''running''. You will do such by typing the appropriate commands in the input console. In the next example, we will load, initialise and run the example waveform. |
| 128 | |
| 129 | Once ALOE has been started we load the waveform typing in the prompt: |
| 130 | {{{ |
| 131 | runph$: phload example |
| 132 | }}} |
| 133 | |
| 134 | then initialize: |
| 135 | {{{ |
| 136 | runph$: phinit example |
| 137 | }}} |
| 138 | |
| 139 | and finally run: |
| 140 | {{{ |
| 141 | runph$: phrun example |
| 142 | }}} |
| 143 | |
| 144 | Now the waveform is running. We can see current processes information typing: |
| 145 | {{{ |
| 146 | runph$: execinfo example |
| 147 | }}} |
| 148 | |
| 149 | Or the available statistics |
| 150 | {{{ |
| 151 | runph$: statls example |
| 152 | }}} |
| 153 | |
| 154 | You also can pause the execution or run a finite number of steps, type: |
| 155 | {{{ |
| 156 | runph$: phpause example |
| 157 | runph$: phrun example 1000 |
| 158 | }}} |
| 159 | |
| 160 | [[BR]] |
| 161 | |
| 162 | |
| 163 | == List of ALOE commands == |
| 164 | |
| 165 | This is the list of all ALOE commands: |
| 166 | |
| 167 | * help: Display list of commands. |
| 168 | * phload: Load application. Args: phload app_name. |
| 169 | * phrun: Run application. Args: phrun app_name. |
| 170 | * phinit: Init application. Args: phinit app_name. |
| 171 | * phpause: Pause application. Args: phpause app_name. |
| 172 | * phstep: Step application. Args: phstep app_name. |
| 173 | * phstop: Stop application. Args: phstop app_name. |
| 174 | * statlist: List statistics. Args: statlist app_name [obj_name]. |
| 175 | * statset: Modify statistic. Args: statset app_name obj_name stat_name new_value. |
| 176 | * statget: Get a statistic value. Args: statget app_name obj_name stat_name. |
| 177 | * statreport: Start/stop report. Args: statreport start/stop app_name obj_name stat_name window_len period. |
| 178 | * applist: List applications. |
| 179 | * pelist: List PE in platform. |
| 180 | * execinfo: Exec information. Args: execinfo app_name [obj_name]. |
| 181 | * exit: Exit this program. |
| 182 | |
| 183 | [[BR]] |
| 184 | |
173 | | if you have a pentium/athlon processor with sse extensions. |
174 | | |
175 | | * '''Increase Kernel time resolution'''. Another measure you can adopt to achieve a higher performance can be increasing the kernel timer frequency. To do such you must recompile your kernel. How to do that is out of the scope of this document, however, if you use ''menuconfig'', the option you have to change is at '''Processor type and features->Timer frecuency'''. Setting that to 1000 Hz implies a resolution of 1ms which, with at 10ms slot duration should be enough. |
| 193 | if you have a pentium/athlon processor with sse extensions. Or: |
| 194 | {{{ |
| 195 | ./configure CFLAGS='-O3 -march=armv5te' |
| 196 | make clean && make && sudo make install |
| 197 | }}} |
| 198 | to optimize for the SheevaPlug. |
| 199 | |
| 200 | * '''Increase Kernel time resolution'''. Another measure you can adopt to achieve a higher performance is increasing the kernel timer frequency. To do so, you must recompile your kernel. How to do that is out of the scope of this document, however, if you use ''menuconfig'', the option you have to change is at '''Processor type and features->Timer frecuency''' (CONFIG_HZ). Setting that to 1000 Hz implies a resolution of 1ms which, with at 10ms slot duration should be enough. |