version script

Richard L. Hamilton rlhamil at
Thu Aug 9 23:22:58 UTC 2018

Here's something I put together that spits out most of the information about a system (other than e.g. the build log for a port that failed to install/update) that might be of interest when problems arise.  Sample output:

sh-3.2$ vers
Hardware Version: MacBook Pro (15-inch, 2017)
Model Identifier: MacBookPro14,3
Mac OS X 10.13.6 17G65 (High Sierra)
Server Version: 5.6.1
System Integrity Protection status: disabled.
Xcode 9.4.1 9F2000
MacPorts Version: 2.5.3
warning: /usr/local exists

Some of those lines only appear if applicable, i.e. those starting with Server Version.

I may have posted this before, but it's had some updates.  The URL to fetch the marketing model name ("Hardware Version" above) now has to be https.  Added Mojave for conversion of OS version number to name.  I think that's most of the recent changes.

Just rename to "vers", and set the permissions to be executable; that should be all that's needed.  It should work whether or not Server or MacPorts is installed, although of course it won't say anything about them if they aren't there, and won't warn about /usr/local if MacPorts isn't installed.  Fetching the marketing model name does require being online, and passes the last four characters of the system's serial number to Apple.

If you can think of something else that might be interesting to add, let me know, keeping in mind that it's intended to cover the basics but not be a comprehensive hardware, OS, or application report; there are other tools, which the script mostly uses, that will provide more in one or another of those areas; bringing together just the right bits was what I wanted.  Having at least a GB or two free space in / would probably be good, but I'd hope people would have noticed that by other means.  Unless they've disabled swap or are very tight on disk space, RAM shouldn't be that relevant save for performance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vers.txt
URL: <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 874 bytes
Desc: Message signed with OpenPGP
URL: <>

More information about the macports-users mailing list