Changes between Version 10 and Version 11 of PhalUserGuide

Show
Ignore:
Timestamp:
11/19/08 00:47:29 (17 years ago)
Author:
ismael (IP: 62.57.188.40)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PhalUserGuide

    v10 v11  
    1919 
    2020You will see that this directory as, among others, the following '''mandatory''' subdirectories: 
    21    * logs: Here waveform's modules will store their logs 
    22    * swman_execs: Here modules' binaries can be reached (can contain symbolic links) 
    23       * linux: Path for Linux modules' binaries 
     21   * logs: Here waveform's modules will store their logs, in per-waveform sub-directories. 
     22   * swman_execs: Here modules' binaries can be reached (can contain symbolic links), in per-platform sub-directories. 
    2423   * swman_apps: Path for application definitions (e.g.: wimax.app) 
    25    * statsman: Initialization parameter definitions, separated by application 
    26       * app_x: Parameters for app_x 
     24   * statsman: Initialization parameter definitions, in per-waveform sub-directories. 
    2725 
    2826If you follow this guide and plan to launch Wimax waveform (see next), you won't need to modify any of these files. 
     
    118116'''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: 
    119117 * ''path'': Path where the executable is. 
    120  * ''output'': File to redirect standard output (for loggin purposes) 
    121  
    122 In the CPU section, you can specify some default P-HAL configuration parameters. '''Note''': This parameters are overriden by the ones passed as arguments to the P-HAL Launcher. See section above for more details. 
     118 * ''output'': File to redirect standard output (for logging purposes) 
     119 
     120In the CPU section, you can specify some default P-HAL configuration parameters. '''Note''': This parameters are overridden by the ones passed as arguments to the P-HAL Launcher. See section above for more details. 
    123121 * ''mips'': Capacity in MIPS of your computer. 
    124122 * ''tslot'': Duration of the time slot, in microseconds. 
     
    127125 * ''report_file'': File where save hw info reports 
    128126 * ''debug_level'': Debug level 
    129  * ''priority'': Prioriry level for objects 
     127 * ''priority'': Priority level for objects 
    130128  
    131129'''External Interfaces Configuration File''': This files has one section for each external TCP interface of your platform. Before creating a network of P-HAL platforms, you should be very familiar with the P-HAL Environment concepts as it compromises selecting which daemons will run every platform, which depends on your network architecture. The format of the file is a set of sections (''[xitf]'') with the following mandatory fields: 
     
    136134 * ''address'': IP address of the interface. For input interfaces it will be the one to bind to, for output ones, it will be the remote one. 
    137135 * ''port'': IP port for the connection. 
    138  * ''mode'': Direction of the inteface, can be one of the following: 
     136 * ''mode'': Direction of the interface, can be one of the following: 
    139137  * in: Input interface (data only) 
    140138  * out: Output interface (data only) 
     
    146144== Launching P-HAL as a Daemon == 
    147145 
    148 Running P-HAL in background is often interesing when long time executions are going to be performed. In foreground executions, disconnecting user terminal (or ssh session) will kill P-HAL processes as they inherit from user session. This can be prevented to happen if the user launches P-HAL with the ''daemon'' option (as an argument or in the platform configuration file, see above) and appropiate selects an output for text messages. 
    149  
    150 When running in this mode, '''CMDMANAGER''' daemon must be also launched as daemon. It can't read commands from standard input anymore and a tcp socket should be created. Thus, another CMDMANAGER process (local or remote) can connect to it and send normal P-HAL commands (as if it was local). 
     146Running P-HAL 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 P-HAL processes as they inherit from user session. This can be prevented to happen if the user launches P-HAL with the ''daemon'' option (as an argument or in the platform configuration file, see above) and appropriate selects an output for text messages. 
     147 
     148When running in this mode, '''CMDMANAGER''' daemon must be also launched as daemon as it can't read commands from standard input anymore, and a tcp socket should be created for this purpose. Then, another CMDMANAGER process (local or remote) can connect to it and send normal P-HAL commands (as if it was local). 
    151149 
    152150To do so, make sure you follow these steps: 
     
    168166   path=cmdman -l -p 
    169167  }}} 
    170  4.Then, if you specified '''work_path''' field in your configuration file, you can launch P-HAL just by typing: 
     168 4.Then, if you specified '''work_path''' field in your configuration file, note that you can launch P-HAL without specifying a work directory, as it has already been defined. You can, thus, simply do: 
    171169  {{{ 
    172170  runph 
    173171  }}} 
    174   from any directory. This would launch P-HAL and send it to background. 
    175  5. Now to perform commands you must connect to it (from local or remote machine): 
     172  from any directory and P-HAL will be started at background. 
     173 5. Now to perform commands you must connect to it (from a local or remote machine): 
    176174  {{{ 
    177175  cmdman -c 192.168.1.1 
    178176  }}} 
    179   where 192.168.1.1 should obviously be replaced by the IP address where you launched the daemon. In this screen, you can type commands as usual and exit typing Ctrl+C. You will notice as you can re-connect with the same command and perform more commands. 
     177  where 192.168.1.1 should obviously be replaced by the IP address of the host where you launched the daemon. In this screen, you can type commands as usual and exit typing Ctrl+C. You will notice as you can re-connect with the same command and perform more commands. 
    180178  At this point, you can exit your ssh session normally. P-HAL will keep running at background. When you login again, connect again with the previous cmdman command. Also, keep track of the output files (specifiyed at the configuration file) for errors or unusual behaviour. 
    181179 6. Finally, you can kill PHAL by sending a INT signal. This can be done typing: