Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
0aa0ace9
Commit
0aa0ace9
authored
Jun 23, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change load average to cpu/cores on system info.
parent
13ba3bd4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/controllers/admin/system_info_controller.rb
app/controllers/admin/system_info_controller.rb
+2
-1
app/views/admin/system_info/show.html.haml
app/views/admin/system_info/show.html.haml
+2
-2
No files found.
app/controllers/admin/system_info_controller.rb
View file @
0aa0ace9
class
Admin::SystemInfoController
<
Admin
::
ApplicationController
def
show
system_info
=
Vmstat
.
snapshot
@load
=
system_info
.
load_average
.
collect
{
|
v
|
v
.
round
(
2
)
}.
join
(
', '
)
@cpus
=
system_info
.
cpus
.
length
@mem_used
=
system_info
.
memory
.
active_bytes
@mem_total
=
system_info
.
memory
.
total_bytes
...
...
app/views/admin/system_info/show.html.haml
View file @
0aa0ace9
...
...
@@ -7,9 +7,9 @@
.row
.col-sm-4
.light-well
%h4
CPU
Load
%h4
CPU
.data
%h1
=
@load
%h1
=
"
#{
@cpus
}
cores"
.col-sm-4
.light-well
%h4
Memory
...
...
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