Highway Code Consultation

February 28, 2006

The consultation about the new Highway Code is out at last. It
came as no surprise that there appears to be nothing positive in it
for cyclists but what can you expect when it comes from the “Driving
standards agency”. My favourite addition is this in Rule
63:



  • be aware of traffic coming up behind you


and what are you supposed to do?
Vanish? I’m constantly aware of traffic coming up behind me mostly
when it can’t get passed safely (not that that always stops people
trying). I can understand looking behind before turning right or
filtering right or when approaching a junction where you may have to
stop as you have to position yourself so that you claim your road
space, but this just seems to be pointless advice. A cynic might
suggest it has been added to allow drivers to run over cyclists from
behind and then claim that the “cyclist was unaware of me”
so it was not their fault. While I don’t really think this is why
they have added this is shows the extent that this cyclist feels that
the rules of the road are not written to encourage cyclists, who need
more not less protection from other road users. However this is not
the worst.





The worst is this:





Use cycle
routes where practicable and
cycle facilities such as advanced stop lines, cycle boxes and toucan
crossings where they are provided, as
they can make
your journeys safer.





Note the can, not do. The thing about
this is that most cycle routes and facilities are actually more
dangerous for the cyclists, impractical to use unless you are ready
to dismount very regularly and accept the additional risks that they
pose. I’m sure there must be a good one somewhere I have however
yet to find it. Since 95% of accidents happen at junctions and cycle
routes and paths tend to increase the number of junctions amnd then
place the cyclists in a place where drivers don’t expect vehicles to
be this suddenly does not suprise. Again this will offer a get out
for motorists who run over cyclists simply say that they there was a
cycle “facility
that was available.





So I am completing the feedback using
StarOffice8 and will send it back to them as both a doc
and a Open Document.





Tags: topic:[Cycling] topic:[highway code]


Good Morning Build 34

February 27, 2006

Yet another build gets onto our Sun Ray server.


: estale.eu FSS 1 $; uname -a
SunOS estale 5.11 snv_34 sun4u sparc SUNW,Sun-Fire
: estale.eu FSS 2 $;


Tags: topic:[solaris] topic:[good morning build]


Give Cyclists Room

February 26, 2006

This www.givecyclistsroom.co.uk is just a great idea and I will be ordering a load of stickers for me, friends and family.

Get one, stick in the back window of you vehicle.


Tags: topic:[cycling]


It was not snowing when we left

February 26, 2006

As I have said before when cycling you have to get your excuses in
early and today I was completely prepared. Yesterday, being my
birthday, we had been out late so I had less sleep than is ideal.
Also the temperature and wind were less than ideal. Then it started
snowing. No one seemed the slightest bit interested in trying to ride
80 miles so we scaled back.


We headed off to Epson and up onto the Downs. Then down and up
again to Walton-on-the-Hill, giving us a run at Pebble Coombe. Then
down through Brockham, Newdigate, Capel, Ockley, Forest Green,
Holmbury St Mary, Abinger Hammer and then Shere for breakfast. We
saw plenty of riders riding the Redhill
CC
time trial which was riding the other way along the Holmbury
road. In the conditions, did I mention that it was snowing, I was
surprised by the number or riders using aero bars which would make
those fast turns on the descents more exciting.


From the cafe at Shere we went the usual way home for a 58 mile
ride.


Tags: topic:[cycling] topic:[molesey bbt]


More scsi dtrace

February 24, 2006

There was some interest in the scsi.d over in the dtrace forum on http://opensolaris.org which resulted in Joel cntributing the code to handle 12 and 16 byte CDBS, I have since added support for some of the variable CDBs, mainly to show how it can be done since we don’t use them.


I’ve uploaded it here to save people having to Cut’n'Paste it from the forum.


It would be really cool to have a scsi provider for this but I can see no real way to get the return packets that is not either impractical, like putting probes in every HBA’s interrupt routine or a hack like tracing scsi_destroy_pkt which is how the script works.


If only the SCSA framework had included a scsi_call_pkt_comp() function for the HBAs to call rather then letting them call them directly but it does not so we are where we are. I can’t see a justification for adding this now since it is on the performance path.

Still for most cases this does seem to work pretty well.


Tags: topic:[dtrace] topic:[scsi] topic:[Solaris] topic:[opensolaris]


Global core files for just one user

February 21, 2006

A coreadm question from yesterday:


How can I configure global core files for just one
application and just one user?

So assume I wish to get global core
files from user with UID 12345 and form the application
/usr/bin/sleep Here is how.


Set the global core pattern to be
“/var/cores/%u/%d/%f/core.%p”, then create the directory
“/var/cores/12345/usr/bin/sleep”. Any process not owned
by UID 12345 will not be able to dump core due to there not being a
directory for them. Then of user 12345’s processes only one named
“sleep” from the directory /usr/bin. So this becomes:





v4u-880c-gmp03 15 # coreadm -g /var/cores/%u/%d/%f/core.%p
v4u-880c-gmp03 16 # mkdir -p /var/cores/12345/usr/bin/sleep
v4u-880c-gmp03 17 # coreadm -e global





Now by careful creation of directories
you can capture core files with what ever granularity you like. If
you want all your cores to end up in the same place then symbolic
links can be used to achieve this.





Tags: topic:[coreadm] topic:[solaris]


Good Morning Build 33

February 20, 2006

I took a week off and returned to find my Sun Ray server running build 33 which seems to have a slightly new look and feed to JDS.


: enoexec.eu FSS 1 $; uname -a
SunOS enoexec 5.11 snv_33 sun4u sparc SUNW,Sun-Fire
: enoexec.eu FSS 2 $;


Tags: topic:[OpenSolaris] topic:[good morning build]


Back on the Bike

February 19, 2006

After a week away without my bike today I made it out with Molesey
BBT for at least 65 miles over Box Hill down to Henfold Lakes and
then home via Forest Green and Holmbury St Mary. The weather was
less than ideal with fog, rain and cold all making appearances but it
was still a pleasant ride. I was completely stuffed by a youngster
climbing the Zig Zags but youth paid the price later on on the ride.


I’m now at home trying to solve a great cycling problem. I have
new wheels for the Summer bike so obviously I need new tyres. What
colour? The choices are black or Red, I’m not sure I’m ready for Red
tyres but black could be too dull.


Tags: topic:[Molesey BBT] topic:[cycling]


scsi.d script

February 10, 2006

After some feedback about the format of
the output from my Dtrace script for looking at SCSI io I how have
added a timestamp which helps sorting the output. The output is now
cleaner and hopefully clearer though does not fit on a 80 column
screen.



00000.844267200 isp1:-> 0×2a (WRITE(10)) address 06:00, lba 0×0143a76e, len 0×000002, control 0×00 timeout 60 CDB 60031134488 SDB 60031134518
00000.844354400 isp1:-> 0×2a (WRITE(10)) address 00:00, lba 0×0143a76e, len 0×000002, control 0×00 timeout 60 CDB 3000cd59e78 SDB 3000cd59f08
00000.848251440 isp1:-> 0×2a (WRITE(10)) address 06:00, lba 0×0143ddd0, len 0×000002, control 0×00 timeout 60 CDB 6001dd1ba50 SDB 6001dd1bae0
00000.848310720 isp1:-> 0×2a (WRITE(10)) address 00:00, lba 0×0143ddd0, len 0×000002, control 0×00 timeout 60 CDB 3001da270f8 SDB 3001da27188
00000.850371280 isp1:<- 0×2a (WRITE(10)) address 00:00, lba 0×0143a76e, len 0×000002, control 0×00 timeout 60 CDB 3000cd59e78 SDB 3000cd59f08, reason 0×0 (COMPLETED) state 0×5f Time 6084us
00000.851151040 isp1:<- 0×2a (WRITE(10)) address 06:00, lba 0×0143a76e, len 0×000002, control 0×00 timeout 60 CDB 60031134488 SDB 60031134518, reason 0×0 (COMPLETED) state 0×5f Time 6927us
00000.853292800 isp1:<- 0×2a (WRITE(10)) address 00:00, lba 0×0143ddd0, len 0×000002, control 0×00 timeout 60 CDB 3001da270f8 SDB 3001da27188, reason 0×0 (COMPLETED) state 0×5f Time 5014us
00000.854442400 isp1:<- 0×2a (WRITE(10)) address 06:00, lba 0×0143ddd0, len 0×000002, control 0×00 timeout 60 CDB 6001dd1ba50 SDB 6001dd1bae0, reason 0×0 (COMPLETED) state 0×5f Time 6226us
00002.839392160 isp1:-> 0×2a (WRITE(10)) address 06:00, lba 0×0143e0b0, len 0×000004, control 0×00 timeout 60 CDB 3001da263c0 SDB 3001da26450
00002.839482480 isp1:-> 0×2a (WRITE(10)) address 00:00, lba 0×0143e0b0, len 0×000004, control 0×00 timeout 60 CDB 60002cb4538 SDB 60002cb45c8
00002.849052160 isp1:<- 0×2a (WRITE(10)) address 00:00, lba 0×0143e0b0, len 0×000004, control 0×00 timeout 60 CDB 60002cb4538 SDB 60002cb45c8, reason 0×0 (COMPLETED) state 0×5f Time 9630us
00002.850171840 isp1:<- 0×2a (WRITE(10)) address 06:00, lba 0×0143e0b0, len 0×000004, control 0×00 timeout 60 CDB 3001da263c0 SDB 3001da26450, reason 0×0 (COMPLETED) state 0×5f Time 10824us
00003.840019440 isp1:-> 0×2a (WRITE(10)) address 06:00, lba 0×0143e200, len 0×000004, control 0×00 timeout 60 CDB 3000cd59e78 SDB 3000cd59f08
00003.840110160 isp1:-> 0×2a (WRITE(10)) address 00:00, lba 0×0143e200, len 0×000004, control 0×00 timeout 60 CDB 30014c0c780 SDB 30014c0c810
00003.846265280 isp1:<- 0×2a (WRITE(10)) address 00:00, lba 0×0143e200, len 0×000004, control 0×00 timeout 60 CDB 30014c0c780 SDB 30014c0c810, reason 0×0 (COMPLETED) state 0×5f Time 6205us
00003.847439680 isp1:<- 0×2a (WRITE(10)) address 06:00, lba 0×0143e200, len 0×000004, control 0×00 timeout 60 CDB 3000cd59e78 SDB 3000cd59f08, reason 0×0 (COMPLETED) state 0×5f Time 7470us


Lots of “fun” games can be played with this, like the
above shows that this system has target 0 and target 6 forming a
mirror making isp1 a Single Point of failure. Although my favourite
is this one:





While running





# dd if=/dev/rdsk/c0t8d0s2 of=/dev/null oseek=1024 iseek=$(( 16#1fffff )) count=2
2+0 records in
2+0 records out
#


I get the following trace:


Th


00001.971470332 qus1:-> 0×00 (TEST UNIT READY) address 08:00, lba 0×00000000, len 0×000000, control 0×00 timeout 60 CDB 300016a94f0 SDB 300016a9520
00001.972324082 qus1:<- 0×00 (TEST UNIT READY) address 08:00, lba 0×00000000, len 0×000000, control 0×00 timeout 60 CDB 300016a94f0 SDB 300016a9520, reason 0×0 (COMPLETED) state 0×17 Time 937us
00001.972433832 qus1:-> 0×00 (TEST UNIT READY) address 08:00, lba 0×00000000, len 0×000000, control 0×00 timeout 60 CDB 300016a9d90 SDB 300016a9dc0
00001.973217082 qus1:<- 0×00 (TEST UNIT READY) address 08:00, lba 0×00000000, len 0×000000, control 0×00 timeout 60 CDB 300016a9d90 SDB 300016a9dc0, reason 0×0 (COMPLETED) state 0×17 Time 826us
00001.973324748 qus1:-> 0×1a (MODE SENSE(6)) address 08:00, lba 0×00000300, len 0×000024, control 0×00 timeout 60 CDB 300016a9380 SDB 300016a93b0
00001.976352165 qus1:<- 0×1a (MODE SENSE(6)) address 08:00, lba 0×00000300, len 0×000024, control 0×00 timeout 60 CDB 300016a9380 SDB 300016a93b0, reason 0×0 (COMPLETED) state 0×5f Time 3070us
00001.976443415 qus1:-> 0×1a (MODE SENSE(6)) address 08:00, lba 0×00000400, len 0×000024, control 0×00 timeout 60 CDB 300016a9ab0 SDB 300016a9ae0
00001.979359665 qus1:<- 0×1a (MODE SENSE(6)) address 08:00, lba 0×00000400, len 0×000024, control 0×00 timeout 60 CDB 300016a9ab0 SDB 300016a9ae0, reason 0×0 (COMPLETED) state 0×5f Time 2959us
00001.979453248 qus1:-> 0×08 ( READ(6)) address 08:00, lba 0×00000000, len 0×000001, control 0×00 timeout 60 CDB 300016a9c20 SDB 300016a9c50
00001.979814748 qus1:<- 0×08 ( READ(6)) address 08:00, lba 0×00000000, len 0×000001, control 0×00 timeout 60 CDB 300016a9c20 SDB 300016a9c50, reason 0×0 (COMPLETED) state 0×5f Time 403us
00001.979898415 qus1:-> 0×08 ( READ(6)) address 08:00, lba 0×00000000, len 0×000001, control 0×00 timeout 60 CDB 300016a90a0 SDB 300016a90d0
00001.980151165 qus1:<- 0×08 ( READ(6)) address 08:00, lba 0×00000000, len 0×000001, control 0×00 timeout 60 CDB 300016a90a0 SDB 300016a90d0, reason 0×0 (COMPLETED) state 0×5f Time 294us
00001.980507332 qus1:-> 0×08 ( READ(6)) address 08:00, lba 0×001fffff, len 0×000001, control 0×00 timeout 60 CDB 300016a9660 SDB 300016a9690
00001.993267665 qus1:<- 0×08 ( READ(6)) address 08:00, lba 0×001fffff, len 0×000001, control 0×00 timeout 60 CDB 300016a9660 SDB 300016a9690, reason 0×0 (COMPLETED) state 0×5f Time 12804us
00001.993382498 qus1:-> 0×28 ( READ(10)) address 08:00, lba 0×00200000, len 0×000001, control 0×00 timeout 60 CDB 300016a9940 SDB 300016a9970
00001.999256915 qus1:<- 0×28 ( READ(10)) address 08:00, lba 0×00200000, len 0×000001, control 0×00 timeout 60 CDB 300016a9940 SDB 300016a9970, reason 0×0 (COMPLETED) state 0×5f Time 5921us





I like it has you see the transition
from READ(6) to READ(10) as it moves from LBA 0×1fffff to 0×200000.
Did I mention needing to get out more?





You can get the script here.
Still do do is correct decoding of CDBs bigger than 10 bytes, which
is not a problem for my current systems and more detailed decoding of
CDBs that are not reads and writes.





Tags: topic:[dtrace] topic:[scsi]
topic:[opensolaris] topic:[solaris]


Dtracing SCSI

February 8, 2006

I’m currently working a bug and escalation that is all in the
closed source bit of Solaris which I find irritating however as part
of this I’ve been working on a D script to print out every scsi IO
that is done by the system, a sort of poor mans scsi snoop.


I’m not sure of the output format that I should used. Here is a
sample of how it currently looks. While this was running I did a dd
iseek=10 count=2 reading from target 8 on qus1 which was idle. You
can clearly see the label being
read,
though why we read it twice is a mystery and then the
pair of reads reading blocks 0xa
and 0xb
:


uata0:COMMAND 0×3 (REQUEST SENSE) address 2:0, lba 0, len 0×12, control 0 CDB 30001ac75f8 SDB 30001ac75f0
uata0:COMMAND 0 (TEST UNIT READY) address 2:0, lba 0, len 0, control 0 CDB 300050657d0 SDB 300050657b0
glm0:COMMAND 0×2a (WRITE(10)) address 2:0, lba 0×6a7603, len 0xe, control 0 cdbp 300011ce0a0 scb 300011ce060
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×6a, len 0×76, reason 0 (COMPLETED) state 0×1f Time 11, control 0×3 CDB 300011ce0a0 SDB 300011ce060
glm0:COMMAND 0xa (WRITE(6)) address 2:0, lba 0×87b8, len 0×24, control 0 CDB 300011ce0a0 SDB 300011ce060
glm0:RETURN 0xa (WRITE(6)) address 2:0, lba 0×87b8, len 0×24, reason 0 (COMPLETED) state 0×1f Time 6, control 0 CDB 300011ce0a0 SDB 300011ce060
qus1:RETURN 0 (TEST UNIT READY) address 8:0, lba 0, len 0, reason 0 (COMPLETED) state 0×17 Time 0, control 0 CDB 300016a9d90 SDB 300016a9dc0
qus1:RETURN 0 (TEST UNIT READY) address 8:0, lba 0, len 0, reason 0 (COMPLETED) state 0×17 Time 0, control 0 CDB 300016a9ab0 SDB 300016a9ae0
qus1:RETURN 0×1a (MODE SENSE(6)) address 8:0, lba 0×300, len 0×24, reason 0 (COMPLETED) state 0×5f Time 3, control 0 CDB 300016a94f0 SDB 300016a9520
qus1:RETURN 0×1a (MODE SENSE(6)) address 8:0, lba 0×400, len 0×24, reason 0 (COMPLETED) state 0×5f Time 2, control 0 CDB 300016a9940 SDB 300016a9970
qus1:RETURN 0×8 (READ(6)) address 8:0, lba 0, len 0×1, reason 0 (COMPLETED) state 0×5f Time 6, control 0 CDB 300016a9660 SDB 300016a9690
qus1:RETURN 0×8 (READ(6)) address 8:0, lba 0, len 0×1, reason 0 (COMPLETED) state 0×5f Time 0, control 0 CDB 300016a9c20 SDB 300016a9c50
qus1:RETURN 0×8 (READ(6)) address 8:0, lba 0xa, len 0×1, reason 0 (COMPLETED) state 0×5f Time 5, control 0 CDB 300016a9ab0 SDB 300016a9ae0
qus1:RETURN 0×8 (READ(6)) address 8:0, lba 0xb, len 0×1, reason 0 (COMPLETED) state 0×5f Time 0, control 0 CDB 300016a9d90 SDB 300016a9dc0
qus1:COMMAND 0 (TEST UNIT READY) address 8:0, lba 0, len 0, control 0 CDB 300016a9d90 SDB 300016a9dc0
qus1:COMMAND 0 (TEST UNIT READY) address 8:0, lba 0, len 0, control 0 CDB 300016a9ab0 SDB 300016a9ae0
qus1:COMMAND 0×1a (MODE SENSE(6)) address 8:0, lba 0×300, len 0×24, control 0 CDB 300016a94f0 SDB 300016a9520
qus1:COMMAND 0×1a (MODE SENSE(6)) address 8:0, lba 0×400, len 0×24, control 0 CDB 300016a9940 SDB 300016a9970
qus1:COMMAND 0×8 (READ(6)) address 8:0, lba 0, len 0×1, control 0 CDB 300016a9660 SDB 300016a9690
qus1:COMMAND 0×8 (READ(6)) address 8:0, lba 0, len 0×1, control 0 CDB 300016a9c20 SDB 300016a9c50
qus1:COMMAND 0×8 (READ(6)) address 8:0, lba 0xa, len 0×1, control 0 CDB 300016a9ab0 SDB 300016a9ae0
qus1:COMMAND 0×8 (READ(6)) address 8:0, lba 0xb, len 0×1, control 0 CDB 300016a9d90 SDB 300016a9dc0
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×33, len 0×40, reason 0 (COMPLETED) state 0×1f Time 6, control 0xb3 CDB 300011ce9d0 SDB 300011ce990
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×33, len 0×41, reason 0 (COMPLETED) state 0×1f Time 7, control 0×3d CDB 300002bc3b8 SDB 300002bc378
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×33, len 0×40, reason 0 (COMPLETED) state 0×1f Time 4, control 0×93 CDB 300011cece0 SDB 300011ceca0
glm0:COMMAND 0×2a (WRITE(10)) address 2:0, lba 0×3340b3, len 0×20, control 0 cdbp 300011ce9d0 scb 300011ce990
glm0:COMMAND 0×2a (WRITE(10)) address 2:0, lba 0×33413d, len 0×6, control 0 cdbp 300002bc3b8 scb 300002bc378
glm0:COMMAND 0×2a (WRITE(10)) address 2:0, lba 0×334093, len 0×10, control 0 cdbp 300011cece0 scb 300011ceca0
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×33, len 0×40, reason 0 (COMPLETED) state 0×1f Time 1, control 0xd3 CDB 300002bc6c8 SDB 300002bc688
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×33, len 0×43, reason 0 (COMPLETED) state 0×1f Time 5, control 0×9 CDB 300002bd180 SDB 300002bd140
glm0:RETURN 0×2a (WRITE(10)) address 2:0, lba 0×33, len 0×40, reason 0 (COMPLETED) state 0×1f Time 1, control 0xb3 CDB 300002bd308 SDB 300002bd2c8





The addresses are all of the format
“target:lun” and are in hex. It has no knowledge of the
host bus adapters which is only a problem for getting the return from
the commands as these all come from the HBA’s interrupt routine.
Currently I cheat and look at the scsi pkt when scsi_destroy_pkt is
called which covers the most common cases, but it is a hack.





That the COMMAND are sometimes
outputted after they have returned is a oddity of dtrace which will
either require the data to be timestamped and post processed or use
speculations to get all the data output in the right order. My
earlier attempts to use speculation were not successful under a
moderate load.





My intention is to post the script here
once I have cleaned it up a bit.





Tags: topic:[dtrace] topic:[OpenSolaris]
topic:[scsi]