Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
1ef20d1f
Commit
1ef20d1f
authored
Mar 22, 2018
by
Guy M. Broome
Committed by
Hisham Muhammad
Apr 06, 2018
Browse files
Solaris: Fix virt and resident memory sizes. Was using KiB, needed pages.
parent
1ab5afa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
solaris/SolarisProcessList.c
View file @
1ef20d1f
...
@@ -299,6 +299,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
...
@@ -299,6 +299,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
fread
(
&
_prusage
,
sizeof
(
prusage_t
),
1
,
fp
);
fread
(
&
_prusage
,
sizeof
(
prusage_t
),
1
,
fp
);
fclose
(
fp
);
fclose
(
fp
);
double
kb_per_page
=
((
double
)
PAGE_SIZE
/
(
double
)
1024
.
0
);
if
(
!
preExisting
)
{
if
(
!
preExisting
)
{
sproc
->
kernel
=
false
;
sproc
->
kernel
=
false
;
proc
->
pid
=
_psinfo
.
pr_pid
;
proc
->
pid
=
_psinfo
.
pr_pid
;
...
@@ -321,8 +323,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
...
@@ -321,8 +323,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
sproc
->
zname
=
SolarisProcessList_readZoneName
(
spl
->
kd
,
sproc
);
sproc
->
zname
=
SolarisProcessList_readZoneName
(
spl
->
kd
,
sproc
);
proc
->
majflt
=
_prusage
.
pr_majf
;
proc
->
majflt
=
_prusage
.
pr_majf
;
proc
->
minflt
=
_prusage
.
pr_minf
;
proc
->
minflt
=
_prusage
.
pr_minf
;
proc
->
m_resident
=
(
_psinfo
.
pr_rssize
)
/
8
;
proc
->
m_resident
=
(
long
)(((
double
)
_psinfo
.
pr_rssize
)
/
kb_per_page
)
;
proc
->
m_size
=
(
_psinfo
.
pr_size
)
/
8
;
proc
->
m_size
=
(
long
)(((
double
)
_psinfo
.
pr_size
)
/
kb_per_page
)
;
proc
->
priority
=
_psinfo
.
pr_lwp
.
pr_pri
;
proc
->
priority
=
_psinfo
.
pr_lwp
.
pr_pri
;
proc
->
nice
=
_psinfo
.
pr_lwp
.
pr_nice
;
proc
->
nice
=
_psinfo
.
pr_lwp
.
pr_nice
;
proc
->
processor
=
_psinfo
.
pr_lwp
.
pr_onpro
;
proc
->
processor
=
_psinfo
.
pr_lwp
.
pr_onpro
;
...
@@ -351,8 +353,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
...
@@ -351,8 +353,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
sproc
->
zname
=
SolarisProcessList_readZoneName
(
spl
->
kd
,
sproc
);
sproc
->
zname
=
SolarisProcessList_readZoneName
(
spl
->
kd
,
sproc
);
proc
->
majflt
=
_prusage
.
pr_majf
;
proc
->
majflt
=
_prusage
.
pr_majf
;
proc
->
minflt
=
_prusage
.
pr_minf
;
proc
->
minflt
=
_prusage
.
pr_minf
;
proc
->
m_resident
=
(
_psinfo
.
pr_rssize
)
/
8
;
proc
->
m_resident
=
(
long
)(((
double
)
_psinfo
.
pr_rssize
)
/
kb_per_page
);
proc
->
m_size
=
(
_psinfo
.
pr_size
)
/
8
;
proc
->
m_size
=
(
long
)(((
double
)
_psinfo
.
pr_size
)
/
kb_per_page
);
proc
->
priority
=
_psinfo
.
pr_lwp
.
pr_pri
;
proc
->
priority
=
_psinfo
.
pr_lwp
.
pr_pri
;
proc
->
nice
=
_psinfo
.
pr_lwp
.
pr_nice
;
proc
->
nice
=
_psinfo
.
pr_lwp
.
pr_nice
;
proc
->
processor
=
_psinfo
.
pr_lwp
.
pr_onpro
;
proc
->
processor
=
_psinfo
.
pr_lwp
.
pr_onpro
;
...
...
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