Posts tagged with “powerpc”

Jan 23, 2019

Reading the serial number of a POWER server from Linux

From time to time, I have to identify which physical server I'm connected to. That usually involves reading the manufacturer serial number of the server.

That information is provided to Linux by the device tree, which is exported via procfs at /proc/device-tree/.

However, the file that hosts the serial number of your server may vary according to the virtualization mechanism in place, e.g. bare-metal and LPARs use the file system-id, while KVM guests use the file host-serial.

With that said, we can read the serial number of our server with the following command:

find /proc/device-tree/ -name host-serial -o -name system-id | xargs cat; echo

Dec 1, 2018

Updated tutorial on Optimized libraries for Linux on Power

A while ago, David Flaherty wrote a nice tutorial about writing optimized libraries for Linux on Power.

As time passed, parts of the tutorial became obsolete and needed some love.

Earlier in November I completed this update and removed all the obsolete parts, added new sections mentioning glibc's getauxval() and GCC's __builtin_cpu_is() and attribute ifunc.