Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
98c8aaac
Commit
98c8aaac
authored
Oct 13, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b6a830d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
go/neo/t/neotest
go/neo/t/neotest
+15
-0
No files found.
go/neo/t/neotest
View file @
98c8aaac
...
@@ -142,6 +142,7 @@ $@
...
@@ -142,6 +142,7 @@ $@
# init_net - initialize networking
# init_net - initialize networking
init_net
()
{
init_net
()
{
# local our external address IPv4 or IPv6
# local our external address IPv4 or IPv6
# XXX better parse `ip addr`
myaddr
=
$(
getent hosts
`
hostname
`
|grep
-v
127.0 |awk
'{print $1}'
)
myaddr
=
$(
getent hosts
`
hostname
`
|grep
-v
127.0 |awk
'{print $1}'
)
test
-n
"
$myaddr
"
||
die
"init_net: cannot determine my network address"
test
-n
"
$myaddr
"
||
die
"init_net: cannot determine my network address"
...
@@ -507,9 +508,12 @@ system_info() {
...
@@ -507,9 +508,12 @@ system_info() {
mntdev
=
`
findmnt
-n
-o
source
$mntpt
`
# mountpoint -> device
mntdev
=
`
findmnt
-n
-o
source
$mntpt
`
# mountpoint -> device
blkdev
=
`
echo
$mntdev
|sed
-e
's/[0-9]*$//'
`
# /dev/sda3 -> /dev/sda
blkdev
=
`
echo
$mntdev
|sed
-e
's/[0-9]*$//'
`
# /dev/sda3 -> /dev/sda
blkdev1
=
`
basename
$blkdev
`
# /dev/sda -> sda
blkdev1
=
`
basename
$blkdev
`
# /dev/sda -> sda
# XXX lsblk: tmpfs: not a block device
# XXX lsblk: /dev/md: not a block device
echo
"#
$blkdev1
:
`
lsblk
-dn
-o
MODEL
$blkdev
`
rev
`
lsblk
-dn
-o
REV,SIZE
$blkdev
`
"
echo
"#
$blkdev1
:
`
lsblk
-dn
-o
MODEL
$blkdev
`
rev
`
lsblk
-dn
-o
REV,SIZE
$blkdev
`
"
# all NICs
# all NICs
# XXX warn if ethtool is not there
find /sys/class/net
-type
l
-not
-lname
'*virtual*'
|
\
find /sys/class/net
-type
l
-not
-lname
'*virtual*'
|
\
while
read
nic
;
do
while
read
nic
;
do
nicname
=
`
basename
$nic
`
# /sys/class/net/eth0 -> eth0
nicname
=
`
basename
$nic
`
# /sys/class/net/eth0 -> eth0
...
@@ -623,6 +627,8 @@ system_info() {
...
@@ -623,6 +627,8 @@ system_info() {
s+
=
", gro_flush_timeout=
`
python
-c
"print '%.3f' % (
$tgroflush_ns
/ 1E3)"
`
µs"
s+
=
", gro_flush_timeout=
`
python
-c
"print '%.3f' % (
$tgroflush_ns
/ 1E3)"
`
µs"
echo
"
$s
"
echo
"
$s
"
# XXX warn if gro_flush_timeout=0 ?
# emit NIC warnings
# emit NIC warnings
for
warn
in
"
${
nicwarnv
[@]
}
"
;
do
for
warn
in
"
${
nicwarnv
[@]
}
"
;
do
...
@@ -871,6 +877,15 @@ cmd_bench-cluster() {
...
@@ -871,6 +877,15 @@ cmd_bench-cluster() {
on
$url
"sudo -n ping -i0 -w3 -s
${
size
}
-q
\$
(echo
\$
{SSH_CONNECTION%% *}) || echo
\\\"
# skipped -> enable ping in sudo for
\`
whoami
\`
@
\`
hostname
\`\\\"
"
on
$url
"sudo -n ping -i0 -w3 -s
${
size
}
-q
\$
(echo
\$
{SSH_CONNECTION%% *}) || echo
\\\"
# skipped -> enable ping in sudo for
\`
whoami
\`
@
\`
hostname
\`\\\"
"
done
done
# TODO
# echo 1 > /proc/sys/net/ipv4/tcp_low_latency
# netstat -s
# /sys/class/net/ethX/gro_flush_timeout
# /proc/sys/net/ipv4/tcp_limit_output_bytes
# ( https://lwn.net/Articles/507065/ "The default value of this
# limit is 128KB; it could be set lower on systems where latency is the primary concern" )
# ? tcp pacing
# net.ipv4.tcp_autocorking (f54b3111 "tcp: auto corking")
echo
-e
"
\n
*** TCP latency:"
echo
-e
"
\n
*** TCP latency:"
# 1 = minimum TCP payload
# 1 = minimum TCP payload
# 1460 = 1500 (Ethernet MTU) - 20 (IPv4 header !options) - 20 (TCP header !options)
# 1460 = 1500 (Ethernet MTU) - 20 (IPv4 header !options) - 20 (TCP header !options)
...
...
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