Back when I worked with Xsan a lot more than I do now, one of the things we spent a lot of time doing was working with metadata and journal data on Xsan volumes. You can also view journal data for non-Xsan volumes. The hfs.util binary is used to view journal data about volumes. In this example, we’ll look at the journal size and location the boot volume of our system:
/System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -I /Volumes/Macintosh\ HD
The output shows the size of the journal and the location, as follows:
/Volumes/Macintosh HD : journal size 40960 k at offset 0x1a38b000
krypted November 25th, 2015
The hostinfo command displays information about your host; namely your kernel version, the number of processors the kernel is configured for, the number of physical processors active, the number of logical processors active, the type of those processors, which ones are active, the amount of memory available, tasks, threads, and average load.
Run hosting without any arguments or options:
The output would be as follows (ymmv per system):
Mach kernel version:
Darwin Kernel Version 15.0.0: Wed Aug 26 19:41:34 PDT 2015; root:xnu-3247.1.106~5/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 395 tasks, 1711 threads, 4 processors
Load average: 1.78, Mach factor: 2.21
There are a bunch of other commands that can provide far more detailed information about your system. However, hostinfo has remained basically unchanged for 13 years, so if I can get something there, I can trust it’s fairly future-proofed in my scripts.
krypted November 23rd, 2015
Posted In: Mac OS X
Repair permissions was unceremoniously removed from OS X in El Capitan. This staple of the Mac gurus toolkit disappeared. There was no 21 gun salute, there was no flaming casket sent out to sea and there was no sweet, sweet wake to get drunk at. Instead, there was pain. There was pain, because when the button disappeared, the need did not. Need proof? If you haven’t yet run it, let’s check your system to verify the permissions of the standard packages:
sudo /usr/libexec/repair_packages --verify --standard-pkgs --volume /
In the above command, we used the repair_packages binary, which has not changed in awhile. We then feed that the –verify option and the –standard-pkgs option, finally providing the volume of the current boot volume using –volume followed by the /. Pretty straight forward. Assuming there’s something to repair, the below will actually run that repair operation:
sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /
Where’s the sweet, sweet button? The rest of the screen is so darn lonely without it.
And now that you know the command, feel free to throw it in your self service. That way users can do it without opening terminal or using an admin password!
krypted November 22nd, 2015
When I was doing a lot of hiring, the pool of Mac Admins was smaller. And it was in a way easier for me to recruit people, because I knew a lot of them. As the pool has grown and a lot of the talent has matured, keeping your finger on the pulse of the hiring market around Apple has become much more challenging. Also, I’ve recruited far more developers and marketing professionals than Apple engineers in the past couple of years. But, there are still a number of places that you can look to find good Mac and iOS engineers looking for a gig. Here’s a quick and dirty list (which can be used to find jobs as well, I suppose) of a few of the better places to look for people you might choose to try and hire:
Good luck. Good people make your company and you more successful. A bad hire has the opposite impact. Choose wisely! And if you found a job and think you have a good add, post a comment. I’m always interested in how people found their gigs!
krypted November 18th, 2015
This is my 3,000th post on Krypted.com. The past 3,000 posts have primarily been about OS X Server, Mac automation, Mac deployment, scripting, iOS deployments, troubleshooting, Xsan, Windows Servers, Exchange Server, Powershell, security, and other technical things that I have done in my career. I started the site in response to a request from my first publisher. But it took on a mind of its own. And I’m happy with the way it’s turned out.
My life has changed a lot over these past 11 years. I got married and then I got divorced. I now have a wonderful daughter. I became a partner and the Chief Technology Officer of 318 and helped to shape it into what was the largest provider of Apple services, I left Los Angeles and moved to Minnesota, left 318 to help start up a new MDM for small businesses at JAMF Software called Bushel, and now I have become the Consulting Engineering Manager at JAMF. In these 11 years, I have made a lot of friends along the way. Friends who helped me so much. I have written 14 more books, spoken at over a hundred conferences, watched the Apple community flourish, and watched the emergence of the Post-PC era.
In these 11 years, a lot has happened. Twitter and Facebook have emerged. Microsoft has hit hard times. Apple has risen like a phoenix from those dark ashes. Unix has proved a constant. Open Source has come into the Mac world. The Linux gurus are still waiting for Linux on the desktop to take over the world. Apps. iOS. iPad. Mobility. Android. Wearables. Less certifications. More admins. And you can see these trends in the traffic for the site. For example, the top post I’ve ever written is now a list of Fitbit badges. The second top post is a list of crosh commands. My list of my favorite hacking movies is the third top post. None of these have to do with scripting, Apple, or any of the articles that I’ve spent the most time writing.
That’s the first 3,000 posts. What’s next? 3,000 more posts? Documenting the unfolding of the Post-PC era? Documenting the rise and fall of more technologies? I will keep writing, that’s for sure. I will continue doing everything I can to help build out the Apple community. And I will enjoy it. I’ve learned a lot about writing along this path. But I have a lot more to learn.
The past 3,000 posts have mostly been technical in nature. I’ve shown few of my opinions, choosing to keep things how-to oriented and very technical. Sure, there’s the occasional movie trailer when I have a “squee” moment. But pretty technical, overall. I’ve been lucky to have been honored to speak at many conferences around the world. One thing I’ve noticed over the past few years is that when people ask me to speak at conferences, they ask me to speak about broader topics. They don’t want me doing a technical deep dive. People use the term thought leader. And while I don’t necessarily agree, maybe it’s time I step up and write more of those kinds of articles here and there.
I’ve learned so much from you these 11 years. But I feel like I’ve barely scratched the surface. I look forward to learning together over the course of the next 3,000 posts! Thank you for your support. Without it, I’d have probably stopped at 10 articles!
krypted November 16th, 2015
Blueprints are a new option in Apple Configurator 2. Blueprints allow you setup a template of settings, options, apps, and restore data, and then apply those Blueprints on iOS devices. For example, if you have 1,000 iOS devices, you can create a Blueprint with a restore item, an enrollment profile, a default wallpaper, skip all of the activation steps, install 4 apps, and then enabling encrypted backups. The Blueprint will provide all of these features to any device that the Blueprint is applied to.
But then why not call it a group? Why call it a Blueprint? Because the word template is boring. And you’re not dynamically making changes to devices over the air. Instead you’re making changes to devices when you apply that Blueprint, or template to the device. And you’re building a device out based on the items in the Blueprint, so not entirely a template. But whatever on semantics.
To get started, open Apple Configurator 2.
Click on the Blueprints button and click on Edit Blueprints.
Notice that when you’re working on Blueprints, you’ll always have a blue bar towards the bottom of the screen. Blueprints are tiled on the screen, although as you get more and more of them, you can view them in a list.
Right-click on the Blueprint. Here, you’ll have a number of options. As you can see below, you can then Add Apps. For more on adding Apps, see this page.
You can also change the name of devices en masse, using variables, which I explore in this article.
For supervised devices, you can also use your Blueprints to change the wallpaper of devices, which I explore here.
Blueprints also support using Profiles that you save to your drive and then apply to the Blueprints.
Blueprints also support restoring saved backups onto devices, as I explore here.
For kiosk and single purpose systems, you can also enter into Single App Mode programmatically.
You can also configure automated enrollment, as described here. Overall, Blueprints make a great new option in Apple Configurator 2. These allow you to more easily save a collection of settings that were previously manually configured in Apple Configurator 1. Manually configuring settings left room for error, so Blueprints should keep that from happening.
krypted November 11th, 2015
When you join a wireless network on a Mac, the information for that network is cached into the com.apple.airport.preferences property list. You can access this information using the following command, constraining output to the LastConnected field and the next 7 lines:
<code>defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences | grep LastConnected -A 7</code>
krypted November 11th, 2015
I remember way back, long ago, before the iPad, and before the iPhone, Apple had official certification training for OS X Server. I think I got my first certification around 10.3. Over time, additional courses appeared. There was an Xsan course, there was an OS X Server course, and there were plans for more. At the height of the Apple certification program, you could get the following for a full on systems administration plethora of acronyms, including ACDT, ACTC, ACSA, and ACMA:
You could also go further and get an Apple Certified Trainer designation (ACT) and be able to teach these classes. Certifications aren’t everything, so it was certainly possible to get certified without having the skills, or to get l33t without getting the certs. However, they were a good guidepost for me when hiring and there were certain activities I engaged in with Apple that having the certifications was either required or extremely helpful.
But over time, Apple shifted its focus elsewhere. After the release of the iPad (and subsequent gangbuster sales of the product), the number of services and the viability of using some of those services in large environments (e.g. due to the death of the Xserve and Xserve RAID), have both decreased sharply. Meanwhile, the ease of use of the services has sharply increased. A simpler product required less training, so the ACSA went away. Additionally, Final Cut Server as a product was removed from Apple’s portfolio and so the ACMA certification disappeared. By 10.10, there were two courses for OS X and OS X Server (ACTC) and another for hardware that’s much more specific to hardware repair.
But as with the Highlander, for 10.11, there can be only one. OS X Server no longer has a course. So today, I’ll say adios, Server certs. I spent a lot of time on you. I will miss you. Or notsomuch. TBD. It’s a different world…
The book for the OS X Server 10.11/Server 5 course is still being made. I’ve heard it should be out in January. And I’ll keep writing articles and books about this stuff for as long as it’s viable. So there’s content. And I’m sure (like really sure) that there will be a third party that introduces a certification for OS X Server. So stay tuned for more on that! And be assured that the end of one era usually represents the beginning of a new era. Those on that boat to the new era usually do well!
krypted November 10th, 2015
Did you know that bash supports emojis? So do SSIDs. Let’s run a quick and easy command so that bash can enjoy the same holiday that you’re enjoying. Let’s say the name of an emoji. To do so, open the Terminal.app and paste this command in:
You can also easily edit your .bash_profile. To do so, run the `vi .bash_profile` command and paste this line in:
Note that I put a few spaces here, after the smiling pile of poo (which I really just like to type and verbalize while sitting next to people on airplanes). The reason for the spaces is that otherwise your text might overlap with the emoji. The $ allows me to know I’m at a prompt rather than just looking at an otherwise smiling pile of poo. Anyway, save and open a new Terminal prompt. Boom. Poo. In the Edit menu of the Terminal app, there’s an “Emoji & Symbols” option, which lets you pick many, many more emojis. So you’re not just stuck with the poo I left for you here. Although I could have set it on fire and left it on your doorstep; then you’d be stuck with it…😘
krypted October 31st, 2015
Posted In: Mac OS X