Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2ada156c
Commit
2ada156c
authored
Sep 15, 2024
by
Julius Goryavsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test...
parent
61670570
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
scripts/wsrep_sst_common.sh
scripts/wsrep_sst_common.sh
+5
-5
scripts/wsrep_sst_rsync.sh
scripts/wsrep_sst_rsync.sh
+6
-5
No files found.
scripts/wsrep_sst_common.sh
View file @
2ada156c
...
...
@@ -1233,6 +1233,7 @@ check_sockets_utils()
# sockstat in FreeBSD is different from other systems,
# let's denote it with a different value:
sockstat_available
=
2
sockstat_opts
=
'-46lq -P tcp -p'
fi
else
socket_utility
=
"
$(
commandex lsof
)
"
...
...
@@ -1284,10 +1285,9 @@ check_port()
grep
-q
-E
"[[:space:]]users:[[:space:]]?
\\
(.*
\\
(
\"
(
$utils
)[^[:space:]]*
\"
[^)]*,pid=
$pid
(,[^)]*)?
\\
)"
&&
rc
=
0
elif
[
$sockstat_available
-ne
0
]
;
then
if
[
$sockstat_available
-gt
1
]
;
then
# sockstat on FreeBSD does not return the connection
# state without special option that cancel filtering
# by the port, so we ignore the connection state for
# this system:
# The sockstat command on FreeBSD does not return
# the connection state without special option, but
# it supports filtering by connection state:
$socket_utility
$sockstat_opts
"
$port
"
2>/dev/null |
\
grep
-q
-E
"^[^[:space:]]+[[:space:]]+(
$utils
)[^[:space:]]*[[:space:]]+
$pid
([[:space:]]|
\$
)"
&&
rc
=
0
else
...
...
@@ -1569,7 +1569,7 @@ get_proc()
if [ "
$OS
" = 'Linux' ]; then
nproc=
$(
grep
-cw
-E
'^processor'
/proc/cpuinfo 2>/dev/null
||
:
)
elif [ "
$OS
" = 'Darwin' -o "
$OS
" = 'FreeBSD' ]; then
nproc=
$(
sysctl
-n
hw.ncpu
)
nproc=
$(
sysctl
-n
hw.ncpu
||
:
)
fi
set -e
if [ -z "
$nproc
" ] || [
$nproc
-eq 0 ]; then
...
...
scripts/wsrep_sst_rsync.sh
View file @
2ada156c
...
...
@@ -105,6 +105,7 @@ check_pid_and_port()
local
final
if
!
check_port
$pid
"
$port
"
"
$utils
"
;
then
if
[
$ss_available
-ne
0
-o
$sockstat_available
-ne
0
]
;
then
if
[
$ss_available
-ne
0
]
;
then
port_info
=
$(
$socket_utility
$ss_opts
-t
"( sport = :
$port
)"
2>/dev/null |
\
...
...
@@ -112,11 +113,11 @@ check_pid_and_port()
grep
-o
-E
"([^[:space:]]+[[:space:]]+){4}[^[:space:]]+"
||
:
)
else
if
[
$sockstat_available
-gt
1
]
;
then
#
sockstat on FreeBSD does not return the connectio
n
#
state without special option that cancel filtering
#
by the port, so we ignore the connection state for
#
this system, also on the FreeBSD sockstat utility
# produces an
additional
column:
#
The sockstat command on FreeBSD does not retur
n
#
the connection state without special option, but
#
it supports filtering by connection state.
#
Additionally, the sockstat utility on FreeBSD
# produces an
one extra
column:
port_info
=
$(
$socket_utility
$sockstat_opts
"
$port
"
2>/dev/null |
\
grep
-o
-E
"([^[:space:]]+[[:space:]]+){5}[^[:space:]]+"
||
:
)
else
...
...
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