Saturday Jan 31, 2009

Suspend and resume really does just work

The whole rebooting thing last night and the surprise that my laptop had been "up"for 18 days left me wondering how many times I had suspended the system. I turns out this is easy to check in /var/adm/messages, which thanks to the laptop being hibernated most of the night fails to get cleaned out by cron, using a short script:

cjg@brompton:~$ nawk '/SunOS/ { if (count > max) { max=count} ; count=0 } /resume/ { count++ } END { print "current",count; print "max",max }' /var/adm/messages 
current 3
max 109
cjg@brompton:~$ 

109 sucessful suspend and resume cycles is not bad. I can't find a kernel statistic that counts them directly which I think is a pity. Also I need to keep an eye on the messages files however with ZFS root and snapshots going on the whole log file rotation and clean up could do with rethinking even in the non laptop case.

Saturday Nov 29, 2008

Working around really really a small but irritating nwam bug

The euphoria over having a laptop that would suspend to RAM did not last long before it was shattered by a more real world situation. That is suspending while the wireless is connected, ie not when at my desk. This is bug 6766807 which is somewhat irritating and I'm sure will be resolved soon. With my work hat on I wonder if this could be one of the bugs that will be fixed in a supported update. However there is a simple work around.

#!/bin/ksh

function restart_nwam
{
	pfexec svcadm restart nwam
}
trap restart_nwam 35

while :
do
	sleep $((60\*60\*24))
done

Run that script as one of the programs started by the session and this problem is history. Obviously keep an eye on the bug so that when the fix is delivered you remove the work around. I'll update the bug with the workaround on Monday.

About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today