Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
cbac2d11
Commit
cbac2d11
authored
Mar 16, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: add -z for print current CPU MHz
parent
f78250b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
distr_info
bin/distr_info
+10
-1
No files found.
bin/distr_info
View file @
cbac2d11
...
...
@@ -615,6 +615,11 @@ get_core_count()
echo
$detected
}
get_core_mhz
()
{
cat
/proc/cpuinfo |
grep
"cpu MHz"
|
head
-n1
|
cut
-d
':'
-f2
|
cut
-d
' '
-f2
|
cut
-d
'.'
-f1
}
get_virt
()
{
...
...
@@ -668,7 +673,7 @@ Pretty distro name (--pretty): $(print_pretty_name)
Package manager/type (-g/-p):
$(
pkgmanager
)
/
$(
pkgtype
)
Running service manager (-y):
$(
get_service_manager
)
Virtualization (-i):
$(
get_virt
)
CPU Cores (-c):
$(
get_core_count
)
CPU Cores/MHz (-c/-z):
$(
get_core_count
)
/
$(
get_core_mhz
)
MHz
CPU Architecture (-a):
$(
get_arch
)
CPU norm register size (-b):
$(
get_bit_size
)
System memory size (MB) (-m):
$(
get_memory_size
)
...
...
@@ -689,6 +694,7 @@ case $1 in
echo
" -a - print hardware architecture (--distro-arch for distro depended name)"
echo
" -b - print size of arch bit (32/64)"
echo
" -c - print number of CPU cores"
echo
" -z - print current CPU MHz"
echo
" -d - print distro name"
echo
" -e - print full name of distro with version"
echo
" -i - print virtualization type"
...
...
@@ -745,6 +751,9 @@ case $1 in
-c
)
get_core_count
;;
-z
)
get_core_mhz
;;
-i
)
get_virt
;;
...
...
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