Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nginxtop
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Denis Roy
nginxtop
Merge requests
!2
Fix space bug finding interfaces
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix space bug finding interfaces
master-patch-6a3d
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Denis Roy
requested to merge
master-patch-6a3d
into
master
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
7e3862d1
1 commit,
1 year ago
1 file
+
2
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
nginxtop.sh
+
2
−
2
Options
@@ -153,9 +153,9 @@ get_nginx_topip_per_site() {
# Poll one-second interface stats from /proc/net/dev
get_onesecond_interface_data
()
{
ONE_SEC_IF_DATA_START
=
$(
cat
/proc/net/dev | egrep
"
\s
+?[a-zA-Z0-9][^lo]+:
[0123456789
\s
]+"
|
sort
)
ONE_SEC_IF_DATA_START
=
$(
cat
/proc/net/dev | egrep
"
\s
+?[a-zA-Z0-9][^lo]+:
\s
+
[0123456789
\s
]+"
|
sort
)
sleep
1s
ONE_SEC_IF_DATA_END
=
$(
cat
/proc/net/dev | egrep
"
\s
+?[a-zA-Z0-9][^lo]+:
[0123456789
\s
]+"
|
sort
)
ONE_SEC_IF_DATA_END
=
$(
cat
/proc/net/dev | egrep
"
\s
+?[a-zA-Z0-9][^lo]+:
\s
+
[0123456789
\s
]+"
|
sort
)
}
# Calculate interface throughput, given one interface
Loading