Home

Zhang Wei

a flexible serial logging tool, runs on GNU/Linux, which can be useful for timing analysis and logging capture of embedded system development.


Project Members:


Discussion

  • Zhang Wei

    Zhang Wei - 2013-11-30

    Features

    1. runs under command line console, not rely on GUI environment;
    2. least dependency (only ncurses is needed);
    3. configurable timeouts for idle-lines, an empty line with time stamp will be printed once there are no new content received. This can be used to indicate the time is elapsing.
    4. local echo or not;
    5. terminal emulator, current only part of VT100 feature is supported;
    6. mask byte/character can be used to replace those unprintable characters on the screen;
    7. time stamp style can be customized, supports 5 kinds of styles;
    8. time stamp format can be customized, supports various time fields;
    9. support various start/stop condition, logging to file can be started/stopped according to different conditions. There are 3 conditions supported: time, line, pattern.
    10. support customizable hotkeys: when the hotkey is pressed, it's predefined text/command will be sent to the remote host. If you are running a shell on the embedded system, you need to put a “\r” at the end of the text to make it be executed.
    11. hotkeys can also be used to execute built-in commands, currently only “quit” is supported, this will quit the program.
    12. automation mode is supported, this feature is based on hotkeys. The hotkey actions will be executed with the given interval. Closed-loop automation is possible.
    13. the log file is saved to a given target directory, with the name in such a format “YYYYMMDDhhmmss.log”, where:
      “YYYY” is the year;
      “MM” is the month;
      “DD” is the day of the month;
      “hh” is the hour;
      “mm” is the minute;
      “ss” is the second;

    How to get help
    1. run “serlogger -h” or “serlogger –help”;
    2. read config file for available options;
    3. a sample config file is provided in the package, whose name is “sample.serlogger”;
    4. after the tool is built and already installed on system (“sudo make install”), you can also type “man serlogger” to get some help information.

    How to config
    1. this tool needs a config file;
    2. this config file can be specified with an option “--config” or “-c”, for example
    serlogger -c sample.serlogger
    3. if no such option provided, the default config file will be used, it should be “$HOME/.serlogger”.
    4. if the default config file does not exist, the tool can still proceed, all the parameters are using default values, which is meaningless.
    5. most of command line options have its corresponding entry in config file, if both of them are provided, the command line option value will be used.
    6. each config entry has its description in the config template file (sample.serlogger), please read this file for available options.

    How to run this program
    1. if you have a rather stable configuration
    just modify the config template file (sample.serlogger);
    copy it to the home directory;
    and rename it to “.serlogger”;
    later simply type the command “serlogger”, then everything is done;
    2. if you have different config files, which vary a lot, you can create different config files, and specify it when starting the tool, such as:
    serlogger -c config1.serlogger.
    3. if you have a stable config, but sometimes you need a minor change, you can specify the new setting on the command line, which can override the one in config file, for example:
    serlogger -t 10
    this command will use a idle timeout value of 10 seconds, which replace the default value of 3 seconds.
    4. if you want to use a specific config file, but want to change a setting, the command can be:
    serlogger -c config1.serlogger -t 10

    How to quit
    1. config hotkeys which has name “quit”;
    2. press triple ESC;
    3. input “quit” command in the window;

    the option 1 is preferred, because the other two options will also send those characters to the embedded system, that would cause some problem under certain conditions.

    How to enable automation mode
    1. the automation mode can only be activated on command line (for example “serlogger -a”).
    2. the automation actions can only be defined in config file;
    3. each action has a pre-padding time and post-padding time (which is in the unit of second).
    4. if the last action ever appeared in previous steps, this means a closed-loop automation is defined: when the last action is finished, the control will transfer to the next step of the first appearance of that action.

    How to define a hot-key
    1. if you want o define a hot key, the first step is to find out the key tag value;
    2. you can execute this command “serlogger -y”, then press the target key, the key tag value will be printed out;
    3. in config file, add a hot-key entry, which includes the key name, key tags, and the text/commands;
    4. when this key is pressed, the text/command will be sent to the remote emebedded system;
    5. if this text/command should be executed right away, you need to put a “\r” at the end of this string, to simulate a CR;
    6. the supported escape sequence is “\r”, “\n”, “\”, and “\””.

    How to build
    1. obtain the package;
    2. extract the package;
    3. change to the root directory of this package, run “./autogen.sh”;
    4. run “make” to build the tool;
    5. the binary will be in “./src/serlogger”;
    6. you can also “sudo make install” to install this software to system;

     
  • Zhang Wei

    Zhang Wei - 2013-12-14

    Features
    1. runs under command line console, not rely on GUI environment;
    2. least dependency (only ncurses is needed);
    3. configurable timeouts for idle-lines, an empty line with time stamp will be printed once there are no new content received. This can be used to indicate the time is elapsing.
    4. local echo or not;
    5. terminal emulator, current only part of VT100 feature is supported;
    6. mask byte/character can be used to replace those unprintable characters on the screen;
    7. time stamp style can be customized, supports 5 kinds of styles;
    8. time stamp format can be customized, supports various time fields;
    9. support various start/stop condition, logging to file can be started/stopped according to different conditions. There are 3 conditions supported: time, line, pattern.
    10. support customizable hotkeys: when the hotkey is pressed, it's predefined text/command will be sent to the remote host. If you are running a shell on the embedded system, you need to put a “\r” at the end of the text to make it be executed.
    11. hotkeys can also be used to execute built-in commands, currently only “quit” is supported, this will quit the program.
    12. automation mode is supported, this feature is based on hotkeys. The hotkey actions will be executed with the given interval. Closed-loop automation is possible.
    13. the log file is saved to a given target directory, with the name in such a format “YYYYMMDDhhmmss.log”, where:

    “YYYY” is the year;
    “MM” is the month;
    “DD” is the day of the month;
    “hh” is the hour;
    “mm” is the minute;
    “ss” is the second;

    How to get help
    1. run “serlogger -h” or “serlogger –help”;
    2. read config file for available options;
    3. a sample config file is provided in the package, whose name is “sample.serlogger”;
    4. after the tool is built and already installed on system (“sudo make install”), you can also type “man serlogger” to get some help information.

    How to config
    1. this tool needs a config file;
    2. this config file can be specified with an option “--config” or “-c”, for example

    serlogger -c sample.serlogger
    3. if no such option provided, the default config file will be used, it should be “$HOME/.serlogger”.
    4. if the default config file does not exist, the tool can still proceed, all the parameters are using default values, which is meaningless.
    5. most of command line options have its corresponding entry in config file, if both of them are provided, the command line option value will be used.
    6. each config entry has its description in the config template file (sample.serlogger), please read this file for available options.

    How to run this program
    1. if you have a rather stable configuration

    just modify the config template file (sample.serlogger);
    copy it to the home directory;
    and rename it to “.serlogger”;
    later simply type the command “serlogger”, then everything is done;
    2. if you have different config files, which vary a lot, you can create different config files, and specify it when starting the tool, such as:
    serlogger -c config1.serlogger.
    3. if you have a stable config, but sometimes you need a minor change, you can specify the new setting on the command line, which can override the one in config file, for example:
    serlogger -t 10
    this command will use a idle timeout value of 10 seconds, which replace the default value of 3 seconds.
    4. if you want to use a specific config file, but want to change a setting, the command can be:
    serlogger -c config1.serlogger -t 10

    How to quit
    1. config hotkeys which has name “quit”;
    2. press triple ESC;
    3. input “quit” command in the window;

    the option 1 is preferred, because the other two options will also send those characters to the embedded system, that would cause some problem under certain conditions.

    How to enable automation mode
    1. the automation mode can only be activated on command line (for example “serlogger -a”).
    2. the automation actions can only be defined in config file;
    3. each action has a pre-padding time and post-padding time (which is in the unit of second).
    4. if the last action ever appeared in previous steps, this means a closed-loop automation is defined: when the last action is finished, the control will transfer to the next step of the first appearance of that action.

    How to define a hot-key
    1. if you want o define a hot key, the first step is to find out the key tag value;
    2. you can execute this command “serlogger -y”, then press the target key, the key tag value will be printed out;
    3. in config file, add a hot-key entry, which includes the key name, key tags, and the text/commands;
    4. when this key is pressed, the text/command will be sent to the remote emebedded system;
    5. if this text/command should be executed right away, you need to put a “\r” at the end of this string, to simulate a CR;
    6. the supported escape sequence is “\r”, “\n”, “\”, and “\””.

    How to build
    1. obtain the package;
    2. extract the package;
    3. change to the root directory of this package, run “./autogen.sh”;
    4. run “make” to build the tool;
    5. the binary will be in “./src/serlogger”;
    6. you can also “sudo make install” to install this software to system;

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks