iPhone what is calaccessd?!

On the new iOS5 while debugging my poor battery life I came across a process on my iPhone called calaccessd which was hogging lots of CPU time and I felt it was responsible for my poor battery life – although no hard evidence yet.

Much googling turned up nothing however playing around I found that the daemon died immediately when I turned calendar off of notification centre and back to alerts rather than banner alert. I am hopeful that this will help the massive battery drain I have been experiencing and I will report back on this post.

Whilst it is nice to have my calendar stuff in the notification centre with the imminent release of intelliscreenX I can live without it for the moment if it gives me better battery life.

Cheers

iPhone iOS5 poor battery life

I recently updated my iPhone 4 to iOS5 but suffered from very poor battery life around 50% worse than previous on 4.3.3.

I put it down to spotlight re-indexing etc and ignored it for a few days, but after a week of still being rubbish I did some digging.

Although not conclusive, I noticed a process – calaccessd which was using about 40% of the cpu time all the time – obviously cpu time equates to battery drain.

After some more digging I discovered its related to the calendaring functions (yes slightly obviously given the name). Doing some debugging, I went into my calendars and unticked the iCloud calendar from my views – this immediately made the calaccessd drop cpu use to next to nothing.

So im hopeful this might have a significant effect on my battery life and put it somewhere back to where I expect it to be..

Any comments on this i’d be interested to hear.

Cheers!

 

update1 – checked my running processes a few hours later and irritatingly calaccessd was back using lots of cpu, so this time I have switched calendar off completely from my iCloud mail settings – this so far has stopped any resurgence of calaccessd using lots of cpu.

update2 – this has fixed the cpu runaways, but still experiencing very poor battery life, and very jerky and slow performance from the phone as a whole. Going for a full restore to see how it fairs after that..

update3 – did the full restore, again had fun and games with stupid itunes not recognizing my backup, but battery life is now back to normal, if not better! I had never noticed but each time i pick up the phone now it actually feels cold, which must be a good thing as if its warm its obviously using battery up!

I did choose to not install a couple of items I had previously installed, and have removed a couple of calendars also so not conclusive but its got to be one of the following :

poweralerter, sbsettings, iCloud syncing calendars etc, multiple exchange calendars from the same account (I had 4 calendars on my 1 exchange account, which I have trimmed down to 1 now)

So its either 1 of the above or just the restore, but either way im considering this case closed. Its also worth noting that its performing lovely too, the jerkyness has gone and its nice and nippy. All in all im happy 🙂

update4 not happy again 🙁 as per the above update I thought it was sorted, however it seems not. See post what is calaccessd for a further update.

update5 – post on calaccessd gives full info on the bug on ios 5, however updating to ios 5.0.1 fixes this issue.

Using powershell to search for files with date and owner criteria

I recently had a requirement to search some file servers for files that were modified between 2 date ranges and then filter that output by owner.

After some googleing I came up with the following script with a commented out line that would allow a copy of those files after indexing.

———————————————————————————-

$path = Read-Host “Please enter the top-level path (eg: C:\Temp)”

$user = Read-Host “Please enter the user to be searched for (eg: DOMAIN\User)”
$dst = Read-Host “Please enter the copy destination:”

$files = Get-childitem $path -recurse |
where {$_.lastwritetime.date -gt
[datetime]::parse(“01/01/2010”) -and
$_.lastwritetime.date -lt
[datetime]::parse(“01/01/2011”)}

foreach ($file in $files){
$owner = Get-Acl $file.FullName
if ($owner.Owner -eq $user){Write-output $file.FullName >> output}
#if ($owner.Owner -eq $user){copy-item -path $file.FullName -dest $dst -force}
else {}
}