OutoSoft

Odd Software for Odd Jobs

Activating the syslog server on my Mac

A few months ago we finally were able to switch over from ADSL2 to NBN's fibre-to-the-node (FTTN) VDSL. We'd had ADSL2 since 2005 and never managed to break 6Mbps downstream.

So when NBN became available, we jumped at the chance. Of course, we have no chance of getting 100Mbps but we're happy with the 50Mbps possibility (around midnight, about 44Mbps). Anything is better than the piddly 4Mbps we were getting in the last days of ADSL2.

However the NBN product is a magnitude more unreliable … constant drop outs. To get some idea, I thought I'd start sending the modem's logs to a syslog server. Did some research on how to get the syslogd daemon to accept these logs - didn't appear to be anything in simple step-by-step format, and Apple had changed things over the years so the information wasn't necessarily up-to-date, but I figured it out. I know, I'm lazy … I spend my work day fixing problems in mobile phone networks - at home, I just want my shit to work (hence why fixing my Mac Pro took so long).

Anyway, this is how I got syslogd to accept my modem's logs, using the scraps of info from other, cleverer souls than I - Mac Pro running macOS High Sierra 10.13.4:

[1] Disable SIP:
[a] Restart Mac in Recovery Mode (CMD+R)
[b] Disable SIP in Terminal
csrutil disable
[c] Restart Mac

[2] Change directory permissions of /System/Library/LaunchDaemons
cd /System/Library/
sudo chmod 777 LaunchDaemons/

[3] Also changed permissions of the syslog daemon PLIST
cd /System/Library/LaunchDaemons/
sudo chmod 777 com.apple.syslogd.plist

[4] In Finder, navigated to /System/Library/LaunchDaemons and double-clicked the com.apple.syslogd.plist file. This opens the PLIST editor in Xcode.

[5] Add a new Sockets dictionary item - there's just BSDSystemLogger initially.
[a] On the Sockets line, press the +
NetworkListener = dictionary
[c] On the NetworkListener line, need to + two Strings
SockServiceName = syslog
SockType = dgram


The result should look something like below - doesn't matter if NetworkListener is before or after the existing BSDSystemLogger entry.

Pasted Graphic

[6] I was able to save the updated PLIST file because of the permission changes in [2] and [3]:
-rw-rw-rw-@ 1 brett wheel 612 13 Apr 09:40 com.apple.syslogd.plist

[7] Change the permissions back to what macOS expects:
cd /System/Library/
sudo chmod 755 LaunchDaemons/
cd /System/Library/LaunchDaemons/
sudo chmod 644 com.apple.syslogd.plist

[8] The file ownership also changed from root to brett, so I had to fix that too, otherwise restarting the daemon will fail with:
/System/Library/LaunchDaemons/com.apple.syslogd.plist: Path had bad ownership/permissions

This is done with the chown command:
sudo chown -v root com.apple.syslogd.plist

[9] Finally, I could restart the daemon:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist


[10] I then opened the Console application and also monitored incoming UDP packets on the command line - I could see the syslog entries arriving, and also Console updating!
sudo tcpdump -i en0 host 192.168.1.1 and udp port 514

[11] Filtering in Console for when the link went down … "link down" … wow, it dropped 14 times from when I started capturing the logs to syslog and this morning:

Apr 13 10:46:19 kernel: Line 0: xDSL link down
Apr 13 10:46:31 kernel: Line 0: xDSL link down
Apr 13 11:16:27 kernel: Line 0: xDSL link down
Apr 13 11:16:38 kernel: Line 0: xDSL link down
Apr 13 11:16:59 kernel: Line 0: xDSL link down
Apr 13 11:17:12 kernel: Line 0: xDSL link down
Apr 13 11:17:41 kernel: Line 0: xDSL link down
Apr 13 11:17:48 kernel: Line 0: xDSL link down
Apr 13 19:06:21 kernel: Line 0: xDSL link down
Apr 13 19:06:37 kernel: Line 0: xDSL link down
Apr 13 22:30:43 kernel: Line 0: xDSL link down
Apr 13 22:30:55 kernel: Line 0: xDSL link down
Apr 13 22:32:17 kernel: Line 0: xDSL link down
Apr 13 22:32:28 kernel: Line 0: xDSL link down


I can also see logs when the link rate is changed … "rate change" … loads of entries, a small sample:

Apr 13 22:25:34 kernel: Line 0: Rate Change, us=15063, ds=30368
Apr 13 22:35:11 kernel: Line 0: Rate Change, us=19904, ds=20192
Apr 13 22:35:57 kernel: Line 0: Rate Change, us=10101, ds=20192
Apr 13 22:35:57 kernel: Line 0: Rate Change, us=9956, ds=20192


[12] Oh, don't forget to re-enable SIP by restarting in Recovery Mode, executing csrutil enable, then restarting



Finally got my Mac Pro working again

After a long absence due to my Mac Pro being unstable, I'm back.

I found that my poor Mac would spontaneously restart. With so much other stuff going on, I just left it in the too-hard basket. It seemed to me to be temperature related - it'll run fine first thing in the morning for a while, restart, run fine for a little bit more, then just give up … like some component was over-temp. I did setup my phone to record video of the temperatures when it restarted, but the CPU temps didn't seem unusual.

I did discuss the issue with the US eBay seller that I had bought the 6-core Xeons from, who suggested a few things, but went quiet when I asked about warranty.

I managed to get the Mac running with just CPU-A … as CPU-B was missing the fans ran constantly. But it allowed me to a full backup finally! As the eBay seller had gone quiet, I bought a single Xeon locally - seemed to fix the problem … enough to do the macOPS High Sierra firmware & software update … but then it returned.

So I then thought it could be the processor tray itself. I ended up buying another Mac Pro 2009, just for the tray. And what do you know … the problem was resolved! So it turned out to be the processor tray.

I ran the Mac Pro I bought for parts with the suspect processor tray and the stock 4-core 2.26GHz Xeons it came with (my Mac Pro had the 2.66GHz Xeons, in storage somewhere). It seemed to be fine - bargain, two Mac Pros! But then it started having the same issues. So definitely the processor tray. I could only find one tray by itself on eBay in Australia … AU$175 … fair enough … but it's "water damaged, signs of rust, but works fine!" … nah, that's okay. There's a bunch in the US but these are all upgraded, which I'm not really fussed with. Even if I could get a single CPU tray, I'd be happy.

I'm going to see if I can repair the tray so I have a second Mac Pro I can use - this article on xlr8yourmac.com seems a good starting point.

Upgrading my Early 2009 Mac Pro's CPUs

Now that my old 2009 MacPro4,1 now looks like a slightly-less old 2010 MacPro5,1 I can replace the original 2 x 2.66GHz quad-core Xeons (X5550) with 2 x 3.46GHz hex-core Xeons (X5690):

Original stock CPUs:

Intel Xeon X5550 @ 2.66 GHz
2 Processors, 8 Cores, 16 Threads

Upgraded CPUs:

Intel Xeon X5690 @ 3.46 GHz
2 Processors, 12 Cores, 24 Threads

With the new CPUs it is also possible to use faster memory - I currently have DDR3 1066MHz (PC3-8500) but can now use DDR3 1333MHz (PC3-10600). Unfortunately that'll be another upgrade.

Anyway, I lumped for a complete kit on eBay (user ID: friendlycomputersusa) rather than just the bare CPUs. I didn't want to muck around. The kit I got was perfect - everything that was required including instructions.

As I'd already done the firmware upgrade for the macOS Sierra upgrade, all I needed to do was replace the CPUs.

This took me about 15min in total. Pretty easy.

The first thing to do was remove the massive heatsink/fan units.

2016-11-02 12.41.20

The X5550s were stuck on the bottom of the heatsinks but these came off pretty easily - remember which heatsink was for which CPU!!!

2016-11-02 12.52.24

Here's the CPU daughterboard with the heatsinks and CPUs removed, ready to pop the new CPUs in.

MacPro Motherboard with CPUs removed

First I need to blow out seven years of crud …

2016-11-02 12.51.55

Pop the new CPUs in … and importantly, because they have their 'hats' on still … put three brass washers on each screw post so that they are not crushed when the heatsinks are replaced!

2016-11-02 13.09.10

Put everything back together … aaaaaaand, yes, the start-up sound indicating all is well with the Mac!

The result:

MacPro upgraded

(note - the memory is still 1066MHz)

I tried out GeekBench4, running a benchmark before and after.

With the stock 2.66GHz quad-core CPUs:

Single-Core Score
2310
Multi-Core Score
12142


And with the new 3.46GHz hex-core CPUs:

Single-Core Score
2821
Multi-Core Score
16168

A decent improvement! If I replace the memory with the faster modules I should see a further bump in the scores.

My trusty Mac Pro should have a few more years of life in her now (seven so far) … barring Apple deliberately obsoleting her like they tried to with macOS Sierra …

Upgrading my Early 2009 Mac Pro to macOS Sierra, part 2

Okay, so I didn't bother doing a backup first. I've had terrible problems with OS X upgrades in the past, usually screwing up some how.

But I took the plunge - I'd already upgraded two Mac Minis successfully.

And … it went without a hitch. I don't think I've ever had an OS X upgrade go so smoothly, especially on my Mac Pro.

But I'm now running macOS Sierra on my (obsoleted) Early 2009 Mac Pro!

Firmware3

Next up … swapping the two quad-core CPUs (Intel Xeon W3520 Nehalems running at 2.66GHz) for a pair of hex-cored CPUs?

Upgrading my Early 2009 Mac Pro to macOS Sierra, part 1

So macOS Sierra was released. Went to download it on my trusty Mac Pro that i've tinkered & upgraded over the years … no dice! Apple has deliberately obsoleted my perfectly good Mac! Not such a big deal but it means that I can't install the latest Xcode.

Some searching around the Web and I found it is actually possible with some hackery.

First step was to hack the firmware so it was running the 2010 Mac Pro firmware. My Mac Pro will now report as MacPro5,1 instead of MacPro4,1 which should allow me to run the macOS Sierra installer.

Someone released a tool in 2011 to do this. It didn't work - gave a 5570 error. More searching showed this was solved simply by downloading the EFI firmware update from Apple ("Mac Pro EFI Firmware Update 1.5", DL1321) and then mounting the DMG. Running the firmware hack tool again was successful as it found the files.

However, the firmware wasn't updated - my Mac Pro still reported as MacPro4,1 after rebooting.

Further searching found the answer. As I am running OS X 10.11 El Capitan it has System Integrity Protection (SIP) enabled which restricts the root account and thus was likely preventing the firmware hack tool from working.

I disabled it as per the instructions - restarted my Mac in recovery mode (holding cmd+R during restart), opening Terminal and executing csrutil.

Rebooting my Mac again and trying the firmware hack tool - success!

My Early 2009 Mac Pro is now reporting as MacPro5,1.

Firmware1

Firmware2

In addition to being able to install macOS Sierra, I can also apparently run hex-core CPUs (so she can keep going for a few years yet!).

I haven't tried running the Sierra installer yet - I want to do a full backup first (need to replace a couple of drives in my external back RAID).


Mazda3 MPS upgrades, part 3

Almost done …

[7] COBB Rear Motor Mount
The MPS has always had a scary amount of torque steer … but replacing the stock RMM has made a massive difference. I can now accelerate hard … and still drive in a straight line! Wow Winking The torque steer is gone as far as I can tell. The drawback is there's vibration in the cabin at low revs/idling, but it's a small price to pay!

Here's the stock RMM in place:

2016-06-08 12.58.51

It was quite hard removing the bottom bolt on the subframe bracket … but I got it done. Make sure you've got a torque wrench and jack stands (I only had my scissor jack at the time).

Comparison of the stock and COBB mounts:

2016-06-08 13.18.59

Here's the COBB RMM in place, ready to swing the subframe bracket back into place:

2016-06-08 13.21.59

All done!

2016-06-08 13.31.40

[8] Upgraded spark plugs
I replaced the stock Mazda spark plugs with Denso ITV22 plugs as suggested by COBB. I don't know if I can notice a difference, but the main thing is that I didn't screw anything up!

2016-07-17 15.56.00

Mazda3 MPS upgrades, part 2

I've also done some under-the-bonnet upgrades on my 2006 MPS - wow! Very happy with the results.

[3] COBB Gear Shift Weight
Wasn't sure what the result of this was going to be … was it going to make the gear shift feel sloppier rather than a nice, solid shift? But I'm very happy - it's made shifting much nicer!

This is the stock shift weight …

2016-05-21 10.07.30

And here is the shiny new COBB weight. Changing the weight to a smaller, lighter one was worthwhile for a later mod I did …

2016-05-21 11.53.53

[4] COBB Turbo Inlet
Here's the stock Mazda turbo inlet (black, right) and intake (left) in situ …

2016-05-21 10.43.27

It was quite difficult to get out, in that I had to remove the battery box (which I had to do for the gear shift weight anyway). Here's a comparison of the stock (left) and COBB Blue inlets:

2016-05-21 11.03.07-1

If you're going to do this as well as the COBB turbo intake, I recommend doing them at the same time.

This is the COBB turbo inlet with the stock air box all back together

2016-06-17 14.58.19

[5] COBB Turbo Intake
As I was doing the upgrades as I could afford them (i.e. after each monthly pay), I upgraded the turbo intake the following month which meant pulling the battery box out again. This was the hardest install as trying to get the intake to slip onto the turbo inlet pipe was extremely difficult (a *very* tight fit). It's much easier, I think, to do both the inlet and intake at the same time, fitting them together outside the engine bay.

2016-06-17 15.28.31

But I managed to get it on … I ended up using a thin flathead screwdriver to ease the intake pipe onto the inlet. Here's the final result:

2016-06-17 16.08.11

You can definitely hear it as the turbo sucks air in! Cool.

Here's a side-by-side comparison:

2016-06-17 19.19.36

There's only one small problem … where I live (NSW, Australia) the intake has to be boxed. I asked my Highway Patrol police officer friend why and the conclusion was "because that's the rules". Unfortunately COBB no longer make the complementing air box for my Gen. 1 MPS so its day were numbered. According to my police friend, it's highly unlikely that a cop would ask to inspect my engine (true, in ten years it has never happened when I've been pulled over for breath testing) because I don't "fit the profile" (i.e. teeny bop P-plater with an obviously souped up Skyline, etc.). But I'm too much of a goody-goody to knowingly break the law.

[6] COBB Knob
A very simple upgrade … and I love it too. Feels very nice in the hand and looks much better than the scratch (from my wedding ring) stock knob!

2016-06-17 18.42.34

Mazda3 MPS upgrades, part 1

My beloved 2006 Mazda3 MPS is approaching ten years old (December).

So I've finally done some modifications … and I'm loving driving it all over again.

This is probably as much as I'll do - I'd like to upgrade the fuel pump as well but I can't really justify it as we are being forced to emigrate and so I'll need to sell my car Sad

[1] Painted the exhaust tip black
I used a ceramic high-heat spray paint to change the colour from chrome as it's always being coated in carbon build-up. I'm supposed to cure it in an oven at 200 degrees afterwards but that's not really practical. It seems to be okay so far, although it does get a little soft after driving - let's see.

Here is before (cleaned) and after

2016-06-24 17.48.31

[2] Painted my wheels black too!
For these I used acrylic paints.

2016-06-26 10.26.09

I took each wheel off and gave them a good wash. I then used some sandpaper to smooth out any scuffs on the alloys and to also 'rough' them up a bit so the paint will stick better (I guess).

Wheel before

Obviously I taped them up to prevent any paint getting on the tyres … slipped some masking tape in between the alloy and the tyre and then used some newspaper to properly cover the rest of the tyre. And, obviously, I also taped over the valve stem.

2016-06-25 12.53.46

I then gave them three coats of primer filler

2016-06-25 13.04.06

I followed this with five coats of black …

2016-06-25 15.13.33

And then finished off with 3-4 coats of clear

2016-06-25 16.30.23

And the final result!

2016-06-26 09.04.17

The paint took a while to harden completely (even after drying overnight, my fingernail could still make an indentation). But after several weeks of driving they are still looking great (IMHO)!

2016-07-05 05.25.12-2

I did also consider painting the brake callipers black but couldn't be bothered - might've looked cool too … ?

In part 2 I'll show the engine upgrades I've done.

Our story on "A Current Affair"

Our family's story was featured on A Current Affair.

Unfortunately, on the same day the Dept. of Immigration and Border Protection (DIBP) we got a letter from a lovely bureaucrat in the department named "Chona" that we didn't meet the criteria for the Minister, Mr Dutton, to give a crap about us.

So my mum-in-law is going to have to leave her only family here in Australia, she is essentially being made homeless by the government, being kicked out from her family.

This in turn means that my family, three of us born in Australia, will now need to emigrate … somewhere … to support her. Until then we'll need to send her about $1000/month to help with her rent & bills.

All because Peter Dutton couldn't give a shit about his fellow Australians. Amazing fellow.

Our eldest son, nine years old, now hates the government. He can't understand why they are doing this. Needless to say that our kids will be life-long anyone-but-Liberal-Party voters.

I'll be taking my Masters degree in engineering with me. And as the government can't be bothered to help us remain in our country, I certainly can't see why I should help them in my job (minor that it is). They will need to get used to not having me around anyway.

Excellent!

Day-off after working Sunday night so doing some chores. Of course, the starter cable on the lawn mower breaks … one more chore added to the list.

2016-02-22 10.53.20

Found a replacement cable at the hardware shop easily enough - it's about 30cm shorter than the original.

Was pretty easy replacing it … until I tried to figure out how to put it all back together.

2016-02-22 16.09.21

Finally figured out the trick - you need to give it a few turns to tension the spring BEFORE you feed the cable back out and attach the handle. Duh!

Don't let go!

2016-02-22 16.15.16

Just like new!

2016-02-22 16.17.27