Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
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
Ximper Linux
neofetch
Commits
4626349b
Commit
4626349b
authored
Jan 04, 2017
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Added initial support for AIX
parent
0cfe6f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
neofetch
neofetch
+20
-0
No files found.
neofetch
View file @
4626349b
...
@@ -278,6 +278,10 @@ get_model() {
...
@@ -278,6 +278,10 @@ get_model() {
"Solaris"
)
"Solaris"
)
model
=
"
$(
prtconf
-b
|
awk
-F
':'
'/banner-name/ {printf $2}'
)
"
model
=
"
$(
prtconf
-b
|
awk
-F
':'
'/banner-name/ {printf $2}'
)
"
;;
;;
"AIX"
)
model
=
"
$(
prtconf |
awk
-F
':'
'/System Model/ {printf $2}'
)
"
;;
esac
esac
# Remove dummy OEM info.
# Remove dummy OEM info.
...
@@ -911,6 +915,22 @@ get_cpu() {
...
@@ -911,6 +915,22 @@ get_cpu() {
# Get CPU cores.
# Get CPU cores.
cores=
"
$(
sysinfo
-cpu
|
grep
-c
-F
'CPU #'
)
"
cores=
"
$(
sysinfo
-cpu
|
grep
-c
-F
'CPU #'
)
"
;;
;;
"AIX"
)
# Get CPU name.
cpu=
"
$(
prtconf |
awk
-F
':'
'/Processor Type/ {printf $2}'
)
"
# Get CPU speed.
speed=
"
$(
prtconf |
awk
-F
':'
'/Processor Clock Speed/ {printf $2}'
)
"
speed=
"
${
speed
/MHz
}
"
speed=
"
$((
speed
/
100
))
"
# Get CPU cores.
case
"
$cpu_cores
"
in
"logical"
|
"on"
) cores=
"
$(
lparstat
-i
|
awk
-F
':'
'/Online Virtual CPUs/ {printf $2}'
)
"
;;
"physical"
) cores=
"
$(
lparstat
-i
|
awk
-F
':'
'/Active Physical CPUs/ {printf $2}'
)
"
esac
;;
esac
esac
# Fix for speeds under 1ghz.
# Fix for speeds under 1ghz.
...
...
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