Automatic Inventory
Now I have four machines. Keeping them in sync is the challenge. Worse yet, knowing whether they are in sync or out of sync is a challenge. So the first step is to make a tool to inventory each machine. In order to use the inventory utility in a scalable way, I want to design it to produce machine-readable results so that I can easily incorporate them into whatever I need. What I want is a representation that is both friendly to humans and to computers. This suggests a self-describing text representation like XML or JSON. After a little thought I picked JSON. What sorts of things do I want to know about the machine? Well, let's start with the hardware and the operating system software plus things like the quantity of RAM and other system resources. Some of that information is available from uname and other is availble from the sysinfo(2) function. To get the information from the sysinfo(2) function I had to do several things: Install sysinfo on each machine sudo apt-get ...