Post

Replies

Boosts

Views

Activity

Memory used does not add up on M1 mac in activity monitor
We are working on a tool that gives stats about the system such as total used memory. It looks at the output of vm_stat to get the app memory, wired memory and compressed memory to report on total memory used. This matches the value shown in activity monitor. This works very well for older macs running on the intel processors. However on a newer mac running the M1 processor, the number obtained by adding the App Memory, Wired memory and compressed memory seems to be smaller than the Memory used field. Where is the remaining memory being used and can it be seen by looking at the vm_stat command? Example numbers on Intel mac: App memory: 9.92GB, Wired memory: 3.31GB, Compressed Memory: 2.22GB, Sum = 15.45GB Memory Used: 15.47GB Example numbers on M1 mac: App memory: 4.21GB, Wired memory: 983.4MB, Compressed memory: 137.3 MB, Sum = 5.3GB Memory Used: 5.88GB Followup question - is there a better way to get used memory for the device?
0
1
325
Mar ’22
What is recommended way to pass config into the macOS installer?
We have an installer pkg for macOS that can be installed using the command line and that works pretty well. We want to add the ability to set a few options at install time. Based on the man page of the installer, it does not look like we can pass any arguments into the installer command. Is there a recommended way to pass a config file/user options when installing using an installer pkg?
1
0
1.9k
Feb ’21
Packaging daemon and user level app in single installer
Currently I have a user level app written in Java with an installer that only supports "Install for me only" option. Now I want to add a system daemon that runs as root and would like to be installed as part of the same package. Is this a bad idea or are there better ways to support this? One way I was thinking of achieving this was to copy the plist file for the system daemon to /Library/LaunchDaemons and then load and start the daemon as part of the post-install script. However, since I want to run the daemon as root, that would mean using sudo to copy and running the launchctl commands. Is there a way to ask for admin privileges as part of the post install script? If the user does not have admin privileges, report it and not run the daemon. The user level app would still run but with lesser functionality.
0
0
269
Oct ’20
Running downloaded user script securely in macOS app
I am looking for guidance on how to run a user script downloaded from a server in a secure fashion. The script itself will be signed to ensure that it has not been modified. Can we run the script (bash, perl, zsh, etc) from memory in Swift or do we need to write it to a file and then use NSUserUnixTask to run the script? If we write it to the file, how can we ensure that the script has not been modified between writing to disk and running it?
5
0
712
Jul ’20
macos installer skipping over destination select panel in 10.15.5
I am working on a basic installer that has only option - "Install for me only". However, when I try to run the installer, it skips the Destination Select panel and goes directly from Introduction to Installation Type. I assumed that it was happening since I have only enabled a single domain in the distribution.xml. Snippet:<domains enable_localSystem="false" enable_currentUserHome="true" enable_anywhere="false" />However, when I click install it asks for admin password and tries to install under /Library instead of ~/Library.If I click on "Change install location", I see only one option active which is "Install for me only" but it is not selected. As a result of this, the install procedure is very confusing. Is there an option in distribution.xml to eithera. Force to not skip the destination select stepb. If only one option is available, that is the one selected for the next step (I tried setting customLocation to "~" and "$HOME" but that did not help)An an experiment, I also tried enabling the option to "Install for all users on this computer" and I still see the destination select being skipped. I am trying this on 10.15.5 version of macOS.
1
0
1.5k
Jun ’20