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
cf60ea9c
Commit
cf60ea9c
authored
Nov 11, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
General: Fix all Solaris bugs
parent
a208ddc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
neofetch
neofetch
+8
-6
No files found.
neofetch
View file @
cf60ea9c
...
...
@@ -235,7 +235,7 @@ get_distro() {
"Solaris"
)
case
"
$distro_shorthand
"
in
"on"
|
"tiny"
) distro=
"
$(
awk
'NR==1{print $1 " " $
2
;}'
/etc/release
)
"
;;
"on"
|
"tiny"
) distro=
"
$(
awk
'NR==1{print $1 " " $
3
;}'
/etc/release
)
"
;;
*) distro=
"
$(
awk
'NR==1{print $1 " " $2 " " $3;}'
/etc/release
)
"
;;
esac
distro=
"
${
distro
/\(*
}
"
...
...
@@ -694,6 +694,7 @@ get_cpu() {
speed=
"
$(
<
"
${
speed_dir
}
/cpuinfo_max_freq"
)
"
speed=
"
$((
speed
/
100000
))
"
echo
"
$speed
"
else
speed=
"
$(
awk
-F
': |\\.'
'/cpu MHz/ {printf $2; exit}'
/proc/cpuinfo
)
"
speed=
"
$((
speed
/
100
))
"
...
...
@@ -767,12 +768,13 @@ get_cpu() {
"Solaris"
)
# Get cpuname
cpu=
"
$(
psrinfo
-pv
|
tail
-1
)
"
cpu=
"
$(
psrinfo
-pv
)
"
cpu=
"
${
cpu
//*
$'
\n
'
}
"
cpu=
"
${
cpu
/[0-9]\.*
}
"
cpu=
"
${
cpu
/ @*
}
"
# Get cpu speed
speed=
"
$(
psrinfo
-v
|
awk
'/operates at/ {print $6}'
)
"
speed=
"
$(
psrinfo
-v
|
awk
'/operates at/ {print $6
; exit
}'
)
"
speed=
"
$((
speed
/
100
))
"
# Show/hide hyperthreaded cores
...
...
@@ -815,11 +817,11 @@ get_cpu() {
cpu=
"
${
cpu
//(R)
}
"
cpu=
"
${
cpu
//CPU
}
"
cpu=
"
${
cpu
//Processor
}
"
cpu=
"
${
cpu
//Core
}
"
cpu=
"
${
cpu
//Dual-Core
}
"
cpu=
"
${
cpu
//Quad-Core
}
"
cpu=
"
${
cpu
//Six-Core
}
"
cpu=
"
${
cpu
//Eight-Core
}
"
cpu=
"
${
cpu
//Core
}
"
cpu=
"
${
cpu
//with Radeon HD Graphics
}
"
# Add cpu cores to output
...
...
@@ -1046,8 +1048,8 @@ get_memory() {
;;
"Solaris"
)
memtotal
=
"
$(
prtconf |
grep
-F
"Memory"
|
head
-1
|
awk
'BEGIN {FS=" "}
{print $3}'
)
"
memfree
=
"
$(($(
sar
-r
1 1 |
tail
-1
|
awk
'BEGIN {FS=" "}
{print $2}'
)
/
1024
))
"
memtotal
=
"
$(
prtconf |
awk
'/Memory/
{print $3}'
)
"
memfree
=
"
$(($(
sar
-r
1 1 |
awk
'NR==5
{print $2}'
)
/
1024
))
"
memused
=
"
$((
memtotal
-
memfree
))
"
;;
...
...
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