Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
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
etersoft
etersoft-admin-essentials
Commits
dc7188f1
Commit
dc7188f1
authored
Feb 26, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grflog: fix, add truncate
parent
a45819ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
grflog
gluster/grflog
+8
-2
No files found.
gluster/grflog
View file @
dc7188f1
#!/bin/sh
#!/bin/sh
RES
=
pub
VOLUME
=
ftp-pub
VOLUME
=
ftp-
$RES
[
-n
"
$1
"
]
&&
VOLUME
=
"
$1
"
&&
shift
RES
=
${
VOLUME
/ftp-
}
LOCALPATH
=
/var/ftp/
$RES
LOCALPATH
=
/var/ftp/
$RES
GLUSTERLOG
=
/var/log/glusterfs/var-ftp-
$RES
.log
GLUSTERLOG
=
/var/log/glusterfs/var-ftp-
$RES
.log
# server hack
[
"
$RES
"
=
"pub"
]
&&
GLUSTERLOG
=
/var/log/glusterfs/var-ftppub-pub.log
[
"
$RES
"
=
"pub"
]
&&
GLUSTERLOG
=
/var/log/glusterfs/var-ftppub-pub.log
[
-n
"
$1
"
]
&&
GLUSTERLOG
=
"
$1
"
&&
shift
grep_dht_log
()
grep_dht_log
()
{
{
...
@@ -15,6 +20,7 @@ grep_dht_log()
...
@@ -15,6 +20,7 @@ grep_dht_log()
# use mount
# use mount
grep_dht_log
$GLUSTERLOG
|
sed
-e
"s|.*dht_lookup_everywhere_cbk
\]
0-
\(
$VOLUME
\)
-dht:
\(
.*
\)
|
\1
:
\2
|g"
>
$0
.
$VOLUME
.log
grep_dht_log
$GLUSTERLOG
|
sed
-e
"s|.*dht_lookup_everywhere_cbk
\]
0-
\(
$VOLUME
\)
-dht:
\(
.*
\)
|
\1
:
\2
|g"
>
$0
.
$VOLUME
.log
truncate
-c
-s0
$GLUSTERLOG
sort
-u
<
$0
.
$VOLUME
.log
>
$0
.
$VOLUME
.sorted.log
sort
-u
<
$0
.
$VOLUME
.log
>
$0
.
$VOLUME
.sorted.log
TASKFILE
=
$0
.task
TASKFILE
=
$0
.task
...
...
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