Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kyome22/systeminfokit
ActivityKit provides macOS system information (CPU usage, Memory performance, Battery state, Storage capacity, and Network connection).
https://github.com/kyome22/systeminfokit
macos swift
Last synced: about 2 months ago
JSON representation
ActivityKit provides macOS system information (CPU usage, Memory performance, Battery state, Storage capacity, and Network connection).
- Host: GitHub
- URL: https://github.com/kyome22/systeminfokit
- Owner: Kyome22
- License: other
- Created: 2020-02-01T08:54:02.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-20T14:53:05.000Z (8 months ago)
- Last Synced: 2024-10-16T02:12:21.153Z (2 months ago)
- Topics: macos, swift
- Language: Swift
- Homepage:
- Size: 218 KB
- Stars: 45
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SystemInfoKit
SystemInfoKit provides macOS system information.
- CPU usage
- Memory performance
- Storage capacity
- Battery state
- Network connection## Requirements
- Development with Xcode 15.2+
- Written in Swift 5.9
- swift-tools-version: 5.9
- Compatible with macOS 12.0+## Installation
SystemInfoKit supports Swift Package Manager.
## Usage
```swift
import SystemInfoKit
import Combine// Get all system info per 3 seconds
let observer = SystemInfoObserver.shared(monitorInterval: 3.0)
var cancellables = Set()observer.systemInfoPublisher
.sink { systemInfo in
Swift.print(systemInfo)
}
.store(in: &cancellables)observer.startMonitoring()
// Finish to get system info
observer.stopMonitoring()
```## Sample Output
```console
CPU: 7.5%
System: 2.9%
User: 4.6%
Idle: 92.5%
Memory: 72.9%
Pressure: 33.1%
App: 6.4 GB
Wired: 1.8 GB
Compressed: 3.5 GB
Storage: 58.7% used
584.13 GB / 994.66 GB
Battery: not installed
Power Source: Unknown
Max Capacity: 0.0%
Cycle Count: 0
Temperature: 0.0℃
Network: Ethernet
Local IP: 192.0.2.1
Upload: 50.7 KB/s
Download: 1.7 KB/s
```## Supported languages
- English (primary)
- Japanese
- Korean## Copyright and License
Copyright 2020 Takuto Nakamura
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0