CPU and Disk Usage to header pins?

I have a cluster (well, really a stack) of 8 PIs. Since the Unicorn pHAT is 8x4 I thought it would be cool to use it to monitor CPU, memory, disk, and something else usage (the x4 lines).

The pHat is on a separate zero. My initial thought is to run a script on each PI and have it do an http post to the zero. The zero could then interpret the post and change led based on the info. This would probably work for disk usage, but wouldn’t be “realtime” enough for CPU or memory usage.

Is there a way to output these to the header pins? I know the phat would get in the way a little, but I think this would be a fun project to play with.

Absolutely. There are many many ways to do it, however. I make some suggestions here: Share one Blinkt! with multiple RPi3

I think i2c to a host microcontroller, or host Pi, is possibly your best bet, but you could do crazy things like assign 8 pins to be an 8bit (0-255) output and read that.

The real trick is how you read the GPIO pins and display the result on the pHAT of course!

Another option would be to use MQTT (psmqtt someones already written the client side for you!) you would just need an MQTT server on the host pi and and a script to output the information to the unicorn.

These are both great suggestions! I like that one is mainly hardware and one is mainly software. I might need to try both…