mach_info
Provides a wrapper api for the mach info calls available on darwin
Installation
-
Add the dependency to your
shard.yml
:dependencies: libc_mach: github: washu/mach_info
-
Run
shards install
Usage
require "mach_info"
m = MachInfo.basic_host_info
total_cpus = m.max_cpus
This library adds the following Mach Info functions bindings
- host_self
- host_priv_self
- host_page_size
- host_info
- host_statistics
- host_statistics64
- kernel_version
- processor_set_default
- host_processor_info
- processor_set_info
The Core Module adds several static lookup methods to fetch the different flavors of host_info, host_processor_info, and processor_set_info functions.
Development
Install crystal, get cracking.
Contributing
- Fork it (https://github.com/washu/mach_info/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Sal Scotto - creator and maintainer