(very old incomplete draft)
How much energy does Australia consume and where is it used?
According to the Australian Bureau of Statistics ABS, Australia used 5,525 petajoules (PJ) in 2004-2005. A Peta Joule is 1,000,000,000,000,000 Joules (which isn't that helpful is it?)
1 PJ is 1,000,000,000 MJ. 3.6 MJ is 1kWHr so 1 PJ is 278 Million kWHr.
The transport sector (including household transport) is the largest end-user of energy, using 1,340 ... The manufacturing sector was the second highest user of energy (1,247 PJ ...). The transport and manufacturing sectors together accounted for 68% of total energy end-use.
Domestic energy consumption is 433 PJ (electricity, gas, etc.)
So, if we want to make a difference in terms of our energy consumption - and therefore CO2 emissions - shouldn't we focus on transport and manufacturing rather than
(very old draft - may not be complete)
I wanted to be able to query SNMP data from a device and turn it into XML so that it can be queried with XPath or XQuery.
The idea is to be able to script something like this:
snmpbulkwalk works just as well to convert the whole MIB to XML.
I have tested this script with Apple Time-Capsule, Nortel 425 switch, MacBook Pro, and a Billion 7404 ADSL router.
I had to pre-process the MacBook Pro and Billion router output to remove newline characters and duplicate output respectively.
I wrote the SNMP to XML script in AWK because I thought AWK's pattern matching and parsing would simplify the task. I'm not convinced, but it was a good learning exercise.
This is the clean-up script.
#!awk
# This converts snmp output like this:
# .iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunName[4592] = Hex-STRING: 6A 61 76 61 00 00 00 00 00 00 00 00 00 00 00 00
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
# into this:
# .iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunName[4592] = Hex-STRING: 6A 61 76 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00
# where multiple lines of data are converted into a single line by eliminating the new-line characters
# process expected OID lines that start with .
/^(\.).*/{
if ( FNR > 1 ) printf "\n" # terminate last OID bu not the first line
printf "%s", $0 # start this OID but don't write a new-line yet
next
}
# process other lines that we assume are actually part of previous OID
{
printf "%s", $0 # continue previous line
}
# terminate the last OID
END{
printf "\n" # terminate last OID
}
My goal is to run Linux on my new MacBook Pro 9,1.
Whilst I can sort-of can run Linux, it is not really usable until all this new hardware is understood and drivers built to manage it.
So, next best is to run Linux in a VM. I like FOSS so I will use VirtualBox.
Unfortunately, this seems hard to do, so I have document my approach for others to improve upon.
Requirements
1. Run Linux in a VM using VirtualBox running on OS-X
2. Use real/physical disk partitions so that when this laptop is better supported, I will be able to boot into these physical partitions and drop my VirtualBox and OS-X layers
Procedure
Before proceeding, you need to understand that if you or I make a mistake, OS-X partitions, EFI partitions, and any other recovery data on our hard drives could be lost or a pain to recover.
Your setup is likely to be different to mine so don't simply copy my detail and expect your system to work.
I have re-partitioned my hard drive as follows:
rex:~ phil$ diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.1 GB disk0 1: EFI 209.7 MB disk0s1 2: Apple_HFS Macintosh HD 70.0 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 4: 21686148-6449-6E6F-744E-656564454649 200.0 MB disk0s4 5: Microsoft Basic Data 20.0 GB disk0s5 6: Microsoft Basic Data 20.0 GB disk0s6 7: Microsoft Basic Data 350.0 GB disk0s7 8: Linux Swap 19.8 GB disk0s8
Partition 1 is my EFI partition - I don't want to touch this.
Partition 2 is my shrunk OS-X partition - again, I'd like to keep this in good working order.
Partition 3 is OS-X recovery files - probably a CD/DVD image that I also need to keep safe.
Partition 4 is something that OS-X disk manager created - I'll leave that alone too.
Partition 5 already has a mostly-working Linux root file system - I don't want to mess with this.
Partition 6 will be my new Virtual Machine root file system (and possibly swap area).
Partition 7 already is formatted ext4 and has my /home file system - I want to keep this.
Partition 8 is a Linux swap area I will look at using a bit later.
This makes 2 VMDK files in my current VM directory.
rex:phys phil$ ls -la total 56 drwxr-xr-x 8 phil staff 272 26 Jul 21:31 . drwxr-xr-x 7 phil staff 238 26 Jul 22:44 .. -rw-r--r-- 1 phil staff 153 23 Jul 01:21 HOWTO.txt drwx------ 6 phil staff 204 26 Jul 21:32 Logs -rw------- 1 phil staff 633 26 Jul 22:47 d0s6.vmdk -rw------- 1 phil staff 634 26 Jul 21:50 d0s7.vmdk -rw------- 1 phil staff 7524 26 Jul 21:31 phys.vbox -rw------- 1 phil staff 7524 26 Jul 21:28 phys.vbox-prev
Now I added these two physical disk descriptions to my VM.
You do this in Settings - Storage, select SATA, click 'Add Attachment' icon, select Hard Disk, and select your VMDK file. I did this for each VMDK file.
You will also need to add your Linux distribution ISO either using a real CD/DVD or using an ISO stored on your file system somewhere.
Don't forget to make your VM boot from CD/DVD first.
I have been terse here since those actions should be known by anyone who is experienced at creating VMs in VirtualBox.
You can make other changes to your VM if you like, or you can do it later.
You can now boot your VM.
This is where I ran into problems: I could not get Ubuntu to format my d0s6.vmdk partition during install. Instead, I ran Ubuntu's live CD and launched Ubuntu's Disk Utility. It showed 2 disks as expected. I added a GUID partition table to d0s6.vmdk, created a 4000 MB swap partition and a 16 GB ext4 root file system. I then formatted the file system.
Now I installed Ubuntu: I told it to use the swap partition, and to use my 16 GB partition for root. To do this I told Ubuntu NOT to format it again since I formatted it earlier.
I also told Ubuntu to use my existing home drive and again, to NOT format it since I want to keep its data.
After almost 4 weeks, our blue-green stain has not returned.
The addition of 500 mL of lime raised the pH to nearly 11. Over time this has reduced to below 10 since about 10,000 L of new rain has been collected.
I also noted that the rain water had a pH of about 6. This was a little surprising since our tank water was pH 4.5.
In monitoring the treated tank water I have found that the alkalinity of the water decreases to nearly 7 when left for 24 hours or more. I suspect that this is due to the water absorbing CO2 from the air and this may also explain why rain water has a higher pH compared to our tank water - if left, the pH increases as the water absorbs CO2.
To help confirm this theory, I left two containers of treated tank water to stand. One was over 300mL (pH=9.94) and the other was less than 60 mL (pH=9.83). Both containers had similar surface areas. The idea is that given the same surface area, the two systems would absorb CO2 at the same rate but due to the different amounts of water, the larger body would change pH more slowly. This is what I observed: the smaller decreased pH to 7.15 in less than 24 hours. The larger body had a pH of 7.49.
Note: Although the two samples should have started with the same pH I suspect the smaller sample had already absorbed significant CO2 before I measured it. I delayed measurement for 15 minutes.
1) Edit apt sources to use "old releases" repositories. sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list But your sources.list file may contain other repositories that have, for me, prevented this process from working.
a) Manually edit /etc/apt/sources.list and comment out these entries
deb-src ... deb http://archive.canonical.com... deb http://extras.ubuntu.com...
and comment out any other repositories that were not converted to old-releases.ubuntu.com
b) Change any country specific URLs to 'US' versions
eg. au.old-releases.ubuntu.com to old-releases.ubuntu.com
2 computers in 1. Keyboard is a dual core i5 and tablet is an intel Z2560 (x86)
#Android and 8 and and whatever else you can install on a x86 PC.
Using android you don't need a cable.
Once you manage to boot from USB, 14.10 is trivial to install.
UPDATE: I upgraded kernel to 3.18 and then 3.19.
Fast switching between Android and Linux (or Windows). Both run at same time or you can shut down one and use other.
Chargers are small and well designed Asus plug-packs - not bricks.
Easy to open Keyboard to change HDD.
Under Linux, everything seems to work. Screen brightness is not working properly, but it does work.
UPDATE: Thanks to Viktar Vaŭčkievič and #ArchLinux, I compiled and installed an ALS module which automatically adjusts screen backlight. See https://github.com/victorenator/als.git
Running linux in mode.
GOOD:
11.6" screen. Could be an inch bigger based on bezel. Tablet and keyboard have WiFi and Bluetooth.
Tablet is possible. http://forum.xda-developers.com/showpost.php?p=57341475&postcount=27
SD card on tablet mounts in Windows/Linux. But Ubuntu keeps opening a file manager every time I switch back from Android.
UPDATE: Fixed by Control Panel - Details - Removable Media - Tick 'Never prompt or start programs on media insertion'
Linux kernel modules to support device.
Aluminium tablet and keyboard backs.
BAD:
Matt screen might be better.
No 3G or LTE.
Can not connect 3G modem to tablet (so far).
No Android update from Asus.
No keyboard backlight nor fluorescent key labels.
When screen is open, tablet/screen hinge opens lower than base of keyboard which makes it uncomfortable as a lap-top.
A bit heavy for it's size at 1.7 kg (tablet and keyboard)
Only 2.4GHz WiFi.
UPDATE: But syslog indicates PC might support 5 GHz.
Rear camera does not work on PC.
WiFi (RTL8821) occasionally locks-up. To fix, remove module, put keyboard to sleep (Fn+f2), wake (power button) and load module. Module is rtl8821ae in my case. UPDATE: This only seems to happen (now) when I tether to an iPhone 5s. UPDATE: #ArchLinux also had a solution to this - too early for me to confirm that it is fixed. Does not seem to fix.
Got a spare Netgear DG834 or DG834G? Want to try OpenWRT? Want an easy process?
This assume you are running Ubuntu.
Try this:
0. Before you start...
0.1 Ensure router power plug is secure.
0.2 Ensure LAN cable is clicked into both router and computer.
0.3 Ensure your router is working by opening http://192.168.0.1 (or whatever IP address you have changed it to)
1. Backup router config in case you want to restore factory firmware.
2. Factory default router to ensure it's IP address is 192.168.0.1
2.1 Power on router.
2.2 Hold in reset button until test light (tick) flashes.
2.3 Wait for router to reboot (I think - might have to power cycle it).
3. Run my script to turn on telnet, backup partitions, extract environment file, patch ADAM2 to turn off checksum test, download OpenWRT, split into 2 parts, install patched ADAM2 and OpenWRT parts...
Note: This is not conventional and may not work. But unless you have some hardware fault or power failure, you can fairly easily recover your Netgear using a Netgear image and a small C program called nftp. I'll add instructions below.
3.1 mkdir
3.2 cd
3.3 save my script here
3.4 Run my script like this:
bash ./pc-setup-wrt-v2.bash
... and follow my instructions.
4. Boot into OpenWRT
4.1 Power cycle router.
4.2 Connect ethernet port - may take 1-2 minutes first time.
I dug out an old hard disk. I was curious: what gems are stored here?
Turns out there was nothing, but it was in interesting exercise in converting a single disk partition into a VM - something that is not trivial.
I
plugged my old drive into a USB hard disk docking station and had a look. It contained Windows
XP and Linux from an old PC dating from 2004-2007 I believe.
"Hey!" I thought. I could virtualize this for no good reason and show how easy it is using free and open source software.
Ubuntu Packages
I installed VirtualBox and mbr.
Create VirtualBox VM
Select New
Name your VM (say TEST)
Select Windows and Windows XP
Set memory size (default is ok)
Select 'do not add a virtual hard drive' - we will create this later in tis VM's directory.
Create Virtual Disk Drive
Open a terminal and change to your ~/VirtualBox\ VM/TEST directory for this example.
RAW host disk access VMDK file ./disk.vmdk created successfully.
Done
Modify VMDK files to use disk partition image...
Done
If you ls -la, you should see some new files:
phil@del:~/VirtualBox VMs/test$ ls -la total 4257296 drwxr-xr-x 2 phil phil 4096 Jan 12 17:41 . drwxr-xr-x 6 phil phil 4096 Jan 12 17:30 .. -rw-r--r-- 1 phil phil 650 Jan 12 17:41 diskimage.vmdk -rw------- 1 phil phil 64512 Jan 12 17:41 disk-pt.vmdk -rw-r--r-- 1 root root 512 Jan 12 17:36 mbr.img -rw-r--r-- 1 phil phil 4359366144 Jan 12 17:41 part1.img -rw------- 1 phil phil 6190 Jan 12 17:32 test.vbox -rw------- 1 phil phil 6087 Jan 12 17:32 test.vbox-prev
test* files are you VB VM config files.
mbr.img is your virtual disk MBR (probably not needed anymore).
partX.img is an image of your windows (in this case) partition.
disk-pt.vmdk seems to be your new MBR, partition table and possibly 60-odd sectors pulled from your hard disk.
diskimage.vmdk is a vmdk definition file that makes a virtual hard drive from all these bits.
Add Virtual Disk Drive to VM
Edit settings on your VM again.
Under Storage, select your IDE controller, and add and attachment.
Add a hard disk and select 'choose and existing disk'
Select your diskimage.vmdk file.
Power on your VM.
It will eventually display MBR (and possibly some characters) but after 2 seconds it should start booting your Windows XP VM.
For
me, once I clicked into VM's window, it took XP about 2 minutes to
workout how to use my keyboard and mouse so you need to wait.
Later you can install VB guest additions and things should work better.