Get Your CustomerID From G Suite

There are a few ways to grab your CustomerID from G Suite. This is important when configuring SSO or when interfacing with G Suite programmatically (through their lovely API).

The first and easiest way is to look at the web interface. This isn’t the most intuitive. To find the key, open Google Admin and then browse to Security in the menu in the upper left-hand corner, clicking on Dashboard.

Click on Single Sign On and then scroll down until you see EntityID. The EntityID is going to be everything after the = such as C034minsz9330 as follows

You can also find it by visiting the GooglePlay at https://play.google.com/work/adminsettings?pli=1 where it’s listed as Organization ID.

I don’t think this key can be changed. Once you have the key, you can communicate with the Google API Gateway. For example:

curl 'https://www.googleapis.com/admin/directory/v1/customers/$CUSTOMERKEY' \
--header 'Authorization: Bearer [$ACCESSTOKEN]' \
--header 'Accept: application/json' \
--compressed

Disk Mount Conditioning In macOS

Here we go. The Disk Mount Conditioner “is a kernel provided service that can degrade the disk I/O being issued to specific mount points, providing the illusion that the I/O is executing on a slower device.” You won’t often find that the system decides to slow throughput to a device very often. But it happens, and equally as useful you can spoof a different type of device, quite helpful when troubleshooting. 

It’s like that. You can run the dmc command to control and view the status of the dmc service, at /usr/bin/dmc. To see how to use dmc, simply run dmc with the help verb:

/usr/bin/dmc help

Sucker M.C.s can see a list of mounts that can be controlled using the list verb:

  0: Faulty 5400 HDD

  1: 5400 HDD

  2: 7200 HDD

  3: Slow SSD

  4: SATA II SSD

  5: SATA III SSD

  6: PCIe 2 SSD

  7: PCIe 3 SSD

Is it live? Many of the above aren’t available, but if you look at your hard drive, you can check the status of it (or multiples if you have multiple supported controllers in your computer). To check the status simply use the list verb following the integer of your mount:

/usr/bin/dmc list

Pause. Once you have the list, you can check the status of each until you find the one you need. To check the status simply use the status verb following the integer of your mount:

/usr/bin/dmc status 1

If you run a status check against a mount that is not available (Peter Piper), you’ll get something similar to the following:

DISK_CONDITIONER_IOC_GET error: No such file or directory

If you run the status check on a supported mount (in my case rock box), you’ll get output similar to the following:

Disk Mount Conditioner: OFF

Profile: Custom

 Type: HDD

 Access time: 0 us

 Read throughput: 0 MB/s (unlimited)

 Write throughput: 0 MB/s (unlimited)

 I/O Queue Depth: 0

 Max Read Bytes: 0

 Max Write Bytes: 0

 Max Read Segments: 0

 Max Write Segments: 0

It’s tricky. Note that the Profile is listed as Custom. There’s a funky thing with this command, where if you want to see how the profile that is applied to a given device is configured – you use the characters  assigned to the list number:

/usr/bin/dmc show 1

Sorry, I talk too much. The output would be similar to the following:

Profile: 5400 HDD

 Type: HDD

 Access time: 26111 us

 Read throughput: 100 MB/s

 Write throughput: 100 MB/s

 I/O Queue Depth: 32

 Max Read Bytes: 33554432

 Max Write Bytes: 33554432

 Max Read Segments: 256

 Max Write Segments: 256

Walk this way – if you start the Disk Mount Conditioner for that device, you’d apply the profile of another in order to do so. So, let’s say you want to slow the device down with a given set of settings:

sudo dmc start 1

What’s it all about? Let’s say I wanted to spoof a PCIe 3 SSD. First I’d need to stop the conditioning service:

sudo dmc stop 1

Ooh, whatcha gonna do? Let’s run the start again with the mount followed by the profile index to invoke:

sudo dmc start 1 "PCIe 3 SSD"

Yah… And of course, to stop again, simply run the stop for the device again:

sudo dmc stop 1

But do be careful to revert back when you run dmc… Hard Times, right?

Happy 14th Birthday, krypted.com

Originally started at the request of a publisher to support the first book I wrote, I guess I just never stopped… 14 years and 3,662 posts later I’m now writing my 21st book and constantly grateful for the opportunity the Apple Community has given me. Thank you so much for visiting and staying with me all this time (or just landing here on Google here and there). You’re the best community.

So a Happy New Year to all, and thanks for the thousands of comments to keep me busy!

Simple Stats in macOS

There’s a gem called iStats. It shows you fan speeds, cpu temp, battery cycle stats, and battery temp. Reason this came up for me is that I was asked a question on what the highs and lows were for computers to stay healthy in a remote sensor capacity. I typically try to keep computers above 25 (around -5 Celcius) and while the computer will shit itself off at 212 Fahrenheit (actually between 85 and 100 Celcius), it’s a good idea to keep it below 95 degrees (see https://support.apple.com/en-us/HT201640 for more information on preferred operating temperatures).

So you can use iStats to pull a few temperatures and then automatically send yourself an alert when the computer is getting to an inappropriate temperature (or automatically turn the heat or air on in a space that the computer is in. Anyway, to install iStats:

sudo gem install istats

And to then invoke iStats simply run the istats command: