Browse Source

README

tags/0.2.0
boB Rudis 3 years ago
parent
commit
92cfeab1a9
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 20
      README.md
  2. 2
      archinfo.xcodeproj/project.pbxproj

20
README.md

@ -0,0 +1,20 @@
# archinfo
Returns a list of running processes and the architecture they are running under.
Apple M1/Apple Silicon/arm64 macOS can run x86_64 programs via Rosetta and most M1 systems currently (~March 2021) very likely run a mix of x86_64 and arm64 processes.
Activity Monitor can show the architecture, but command line tools such as `ps` and `top` do not due to Apple hiding the details of the proper `sysctl()` incantations necessary to get this info.
Patrick Wardle reverse engineered Activity Monitor— <https://www.patreon.com/posts/45121749> — and I slapped that hack together with some code from Sydney San Martin — https://gist.github.com/s4y/1173880/9ea0ed9b8a55c23f10ecb67ce288e09f08d9d1e5 — into a nascent, bare bones command line utility `archinfo`.
It will do more, soon, but for now it just returns a big JSON blog (that will work fine with `jq`) of running processes and their respective architectures.
Build from source or grab from the releases.
```
Rscript -e 'table(jsonlite::fromJSON(system("/usr/local/bin/archinfo", intern=TRUE))$arch)'
##
## arm64 x86_64
## 419 29
```

2
archinfo.xcodeproj/project.pbxproj

@ -26,6 +26,7 @@
/* Begin PBXFileReference section */
01B369A325FD35360064ACA1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
01B369A525FD391D0064ACA1 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
01C9200725FD06D20097CD09 /* archinfo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = archinfo; sourceTree = BUILT_PRODUCTS_DIR; };
01C9200A25FD06D20097CD09 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
01C9201125FD07000097CD09 /* archinfo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "archinfo-Bridging-Header.h"; sourceTree = "<group>"; };
@ -49,6 +50,7 @@
01C91FFE25FD06D20097CD09 = {
isa = PBXGroup;
children = (
01B369A525FD391D0064ACA1 /* README.md */,
01C9200925FD06D20097CD09 /* archinfo */,
01C9200825FD06D20097CD09 /* Products */,
01C9201825FD0A3B0097CD09 /* Frameworks */,

Loading…
Cancel
Save