dcsimg
Skip to end of metadata
Go to start of metadata

Grabserial

Install
sudo apt-get install python-setuptools
git clone https://github.com/tbird20d/grabserial.git
cd grabserial
sudo python setup.py install
voodoo@work-e6400:~$ grabserial --help
grabserial : Serial line reader
        Usage: grabserial [options] <config_file>
options:
    -h, --help             Print this message
    -d, --device=<devpath> Set the device to read (default '/dev/ttyS0')
    -b, --baudrate=<val>   Set the baudrate (default 115200)
    -w, --width=<val>      Set the data bit width (default 8)
    -p, --parity=<val>     Set the parity (default N)
    -s, --stopbits=<val>   Set the stopbits (default 1)
    -x, --xonxoff          Enable software flow control (default off)
    -r, --rtscts           Enable RTC/CTS flow control (default off)
    -e, --endtime=<secs>   End the program after the specified seconds have
                           elapsed.
    -c, --command=<cmd>    Send a command to the port before reading
    -t, --time             Print time for each line received.  The time is
                           when the first character of each line is
                           received by grabserial
    -m, --match=<pat>      Specify a regular expression pattern to match to
                           set a base time.  Time values for lines after the
                           line matching the pattern will be relative to
                           this base time.
    -i, --instantpat=<pat> Specify a regular expression pattern to have its time
                           reported at end of run.  Works mid-line.
    -q, --quitpat=<pat>    Specify a regular expression pattern to end the
                           program.  Works mid-line.
    -l, --launchtime       Set base time from launch of program.
    -v, --verbose          Show verbose runtime messages
    -V, --version          Show version number and exit
Ex: grabserial -e 30 -t -m "^Linux version.*"
This will grab serial input for 30 seconds, displaying the time for
each line, and re-setting the base time when the line starting with
"Linux version" is seen.
Usage
 grabserial -v -d '/dev/ttyUSB1' -e 30 -t -m "Starting kernel.*" 
  • No labels