Diary of a geek

April 2010
Mon Tue Wed Thu Fri Sat Sun
     
11
   

Andrew Pollock

Categories

Other people's blogs

Subscribe

RSS feed

Contact me

JavaScript required


Sunday, 11 April 2010

Using capabilities from Python

I've become passingly interested in Linux's capabilities functionality, as a way of reducing full-blown UID 0 requirements.

Unrelated to this, one of my few gripes about Python, coming from Perl, was the inability to do anything like Perl's $0 to alter the appearance of the running program. I used to use this functionality in Perl a lot to provide cheap insight into what a long running Perl script was up to.

Well the other day, I was rather excited to learn that Dennis Kaarsemaker has written a Python interface to capabilities, which also implements a set_proctitle() function.

The python-prctl module isn't currently available in Debian, but as Dennis has all of the packaging in the Git repository, I've offered to sponsor it for him if he wishes.

[22:08] [tech] [permalink]

I (apparently) have obstructive sleep apnea

A while ago now, Sarah commented that one night when she's woken up in the middle of the night, that she'd observed me stop breathing for a while in my sleep. She wanted me to go see the sleep doctors that she'd seen (she was diagnosed with obstructive sleep apnea a couple of years ago).

So I eventually packed myself off to the Stanford Sleep Disorders Clinic, which is at Stanford's shiny new outpatient centre in Redwood City.

They took a look at me, and declared I had a crowded mouth, and a narrow airway, and asked me to do a sleep study.

I did the sleep study in the middle of January. That was "interesting". I had a ton of wires glued to me, and needless to say, I didn't sleep particularly well, but apparently I slept enough for them to be able to diagnose me.

A couple of weeks later, I got a letter with the results. I had a Respiratory Disturbance Index of 16.6. The letter from the clinic defined RDI as including "events of 10 seconds or more with cessation of airflow or discernable reduction in airflow associated with arousal or oxygen desaturation of 3% or more".

I had one obstructive sleep apnea event, and 119 obstructive hypopnea events during the sleep study. At one point my O2 saturation dropped to 89%, but it was very briefly. The overall average was 96%.

A month ago I did another sleep study, this time while I was hooked up to a CPAP machine, and they fiddled with the pressure. I was fairly exhausted that night, and slept like a log.

Based on the results of the second sleep study, I've been prescribed an auto PAP machine with a pressure ranging between 13 to 15 cm of water pressure (whatever that means).

I got the machine, a ResMed S8 AutoSet II a week ago last Friday. It's slightly more advanced than the CPAP machine that Sarah uses, in that it'll adjust its pressure within the range it is set to, as it deems necessary throughout the night. It also backs off the pressure when you exhale, like Sarah's does.

I'm not particularly thrilled to be sleeping with this thing on my face. The first night I used it, I slept fine. Something like from 10:30pm until 6am. Subsequently, I keep waking up at precisely 3:30am for some reason, and it's hard to get back to sleep with it on, so I take it off. A few nights, some sort of mask leakage alarm has gone off at some random point in the night. I haven't been in any state to try and diagnose what's going on when that happens, so I just take off the mask and turn the whole thing off.

I was curious as to whether I'd notice some sort of life-changing difference between using it and not using it, like Sarah does, but so far, I can't say I've noticed any discernable difference. I also haven't gone a night without using it yet.

Getting a properly fitting mask was a bit of a challenge. I spent ages at the durable medical equipment supplier trying on different sorts of masks. The one I've currently got still leaves a bit of a red mark across the bridge of my nose. I can take it back in the first 30 days, and get refitted, so I might still be doing that.

[09:10] [life] [permalink]