projects
/
vrDialog
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df49ba3
)
added time to output
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 26 Oct 2014 16:09:55 +0000
(17:09 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 26 Oct 2014 16:09:55 +0000
(17:09 +0100)
dumps/portmon-parse.pl
patch
|
blob
|
history
diff --git
a/dumps/portmon-parse.pl
b/dumps/portmon-parse.pl
index
5cc0706
..
9ab967a
100755
(executable)
--- a/
dumps/portmon-parse.pl
+++ b/
dumps/portmon-parse.pl
@@
-8,8
+8,12
@@
my $read = '';
while(<>) {
s/[\n\r]+$//;
+
+ my $time = $1 if /(\d+:\d+:\d+)/;
+ $time .= ' | ';
+
if ( /IRP_MJ_WRITE.*:\s*(.*)/ ) {
- print "> $1\n";
+ print ">
> $time
$1\n";
} elsif ( /(IRP_MJ_READ|IOCTL_SERIAL_WAIT_ON_MASK)/ ) {
$in_read++;
print "#[$in_read] $_\n";
@@
-19,7
+23,7
@@
while(<>) {
my $len = hex($1) if ( $read =~ m/^([0-9a-f]{2})/i );
print "#< $read [$len]\n";
if ( length($read) >= ( $len * 3 - 1 ) ) {
- print "< $read\n";
+ print "<
< $time
$read\n";
$in_read = 0;
$read = '';
}