Closed Dzhami-Jame-ALI closed 4 months ago
Duplicate of #1942
@exelban Hello, for #issue2, it might be related to root permission:
let result = withUnsafeMutablePointer(to: &usage) {
$0.withMemoryRebound(to: (rusage_info_t?.self), capacity: 1) {
proc_pid_rusage(pid, RUSAGE_INFO_CURRENT, $0)
}
}
guard result != -1 else { return }
If root permission is granted when building the program, those system processes like mds_stores
will get reulst 0
rather than -1
.
Is it possible to consider adding a root-based helper as an option to this tool, like fan-helper?
First, if the guard check does not pass it means that Stats cannot get usage info. Second, nope. I'm avoiding the root access. And for the feature like that I will not add it for sure.
Why are you running the app under the root?
No offense, I'm just trying to get the reason why iStat Menus can get those system processes' disk IO (probably it requires installing a root-based helper). Sometimes when seeing the huge disk IO numbers in menus bar, it's natural to want to click and see the details.
No worry, I'm ready to help with fixing that. Looks like you run the Stats from the source?
I have a few reports that users do not have processes for disk. But have no idea why and do not see that problem on any of my Macs.
Yes, I changed the scheme to debug the process as root.
If debugged as root, then system processes will appear after filter guard result != -1 else { return }
.
Describe the bug There are probably two issues in disk IO monitor:
update interval
settings (in Disk - Module - Update Interval) does not work. Whatever value I choose, the menu bar icon will always update the value for every 1 second.Top processes
's disk IO is not showing macOS system process likemds_stores
. The I/O from top processes is significant different than menu bar icon's value in that case, e.g. menu bar shows 60MB/100MB R/W (actually bymds_stores
), but drop down widget - top processes shows nothing.Details: