Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
1618c9e6
Commit
1618c9e6
authored
Mar 13, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved the regex to match syslog lines and be easier to read.
parent
ba0147ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
rsyncstats
support/rsyncstats
+15
-2
No files found.
support/rsyncstats
View file @
1618c9e6
...
...
@@ -52,9 +52,22 @@ if ($only_section) {
line:
while
(
<
LOG
>
)
{
my
$syslog_prefix
=
'\w\w\w +\d+ \d\d:\d\d:\d\d \S+ rsyncd'
;
my
$rsyncd_prefix
=
'\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d '
;
next
unless
(
$day
,
$time
,
$op
,
$host
,
$module
,
$file
,
$bytes
)
=
m
#^ (\d+/\d\d/\d\d)\s+(\d\d:\d\d:\d\d)\s+\[\d+\]\s+(send|recv|[<>]f\S+)\s+
(
\
S
+
)
\
s
+\
[
\
d
+\.\
d
+\.\
d
+\.\
d
+\
]
\
s
+
(
\
S
+
)
\
s
+\
(
\
S
*\
)
\
s
+
(
.*
)
\
s
+
(
\
d
+
)
$
#
x
;
=
m{^
( \w\w\w\s+\d+ | \d+/\d\d/\d\d ) \s+ # day
(\d\d:\d\d:\d\d) \s+ # time
[^[]* \[\d+\]:? \s+ # pid (ignored)
(send|recv|[<>]f\S+) \s+ # op (%o or %i)
(\S+) \s+ # host
\[\d+\.\d+\.\d+\.\d+\] \s+ # IP (ignored)
(\S+) \s+ # module
\(\S*\) \s+ # user (ignored)
(.*) \s+ # file name
(\d+) # file length in bytes
$ }x
;
# TODO actually divide the data by into send/recv categories
if
(
$op
=~
/^>/
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment