software suspend finally

After many, many reboots and kernel recompiles i can hibernate 🙂

It appears that it is an ACPI problem, but if a use a hdparm like this for my disk
[b]hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda[/b]

IT WORKS.

Probably that i can read from the disk fast before an ACPI event, i don’t know.

I haven’t test it yet with laptop mode, but at least it works without any problems so far.

See also my previous post:
[url]http://blog.billy.gr/archives/2005/02/14/software-suspend-217/[/url]

software suspend 2.1.7

Could please somebody tell me why i cannot have a laptop that it will hibernate properly ?

I am trying to make it work for more that a week.

Today i had a better luck. With software suspend 2.1.7 for kernel 2.6.11-rc4 i am able to hibernate in runlevel 1 (using ACPI) all the time.

On runlevel 2 i can only hibernate without ACPI. The systems hangs on “Reading caches”

Of course my laptop is useless without ACPI.

I have forgot how many reboots i have done, how many kernel recompiles with different options, but i will not quit, since hibernate is a must for me.

It appears that is an ACPI problem. I will try again with ACPI as a module, just in case.

I will keep you posted.

Monitor your ups using mrtg

For a long time i wanted to monitor my UPS a APC SmartUPS 700VA using mrtg.
The main problem is that the ups doesn’t support snmp.

APCUPSD is a great program to monitor your ups (battery level, Load, etc) and shutdown your pc when the battey level is below a value. But it doesn’t provide snmp info.

Lucky for us, APCUPSD provides a tool (apcaccess ) to show the values that it can read from your ups. With the help of apcaccess, grep, awk and a shell script you can use it to feed the values to mrtg.

Step 1
Create the following script
[code]#!/bin/sh
#

a=`/sbin/apcaccess | grep LOADPCT | awk {‘print $3’}`

echo $a
echo 0
echo 0
echo ups[/code]
Name it apcups.sh and put it on /usr/local/bin

Step 2
Create the following mrtg configuration file
[code]
WorkDir: /var/www/html/mrtg-ups

Target[ups]: `/usr/local/bin/apcups.sh`
MaxBytes[ups]: 100
Title[ups]: Ups Load
PageTop[ups]: UPS Load
Options[ups]: growright, gauge, nopercent
YLegend[ups]: percent
Legend1[ups]: UPS Load
Legend2[ups]:
LegendO[ups]:
LegendI[ups]: UPS Load
ShortLegend[ups]: %[/code]

And make sure that workdir exists.

Then put a cronjob to run that script every 5 minutes
[code]
*/5 * * * * root /usr/bin/mrtg path_to_your_mrtg-ups.cfg_file
[/code]

If you want to speed the thinks up, run it 2 times then have look on the Workdir to see that the files have been generated succefull.

I use it to monitor the UPS load only, of course it can be modified to monitor also battery level, line voltage etc.

Nice ? 🙂 🙂

slmodem and kernel 2.6.10

Following my debian installation, [url]http://blog.billy.gr/archives/2005/01/24/debian-testing-microsoft-free-laptop/[/url] i had left a couple of things to take care.

On of them was the onboard Modem.

It took me more that 4 hours to figure what was going wrong with the slmodem.
I tried a lot of versions up to 2.9.10.

First of all if you are using kernel 2.6.10 and slmodem-2.9.10 YOU must use the patches from [url]http://reactivated.net/patches/slmodem/2.9.10/[/url]. The api in 2.6.10 has changed a lot. These patches will take care of it.

Second make sure that you don’t have the [b]snd-intel8x0m[/b] module loaded. I was allways geting a[b] device or resource busy[/b] when i modprobed the slamr module.

Now we have a working modem, and we are finally able to dial….

debian testing = Microsoft Free Laptop

I have spend most of my weekend installing debian testing.

Finally i am microsoft free. No more dual boot in my laptop. Only debian.
I was planning to do that when the sarge would be releases, but since there is no release schedule i wanted to try.

Installation of debian testing using the debian-installer rc2 was 10 minutes work. The rest of the time was installing everything i need in order to work.

I need to configure my wireless card (ipw2100) and my modem, in order to say that i have finished. A kernel recompile is on the way for that.

All the needed programs are installed: firefox for webbrowsing, thunderbird from mail, xmms for mp3s, mplayer for movies.

The only program from windows that i am missing is the Checkpoint Management Clients. If that doesn’t work under wine, then we have a problem. I will need a vmware just for that.

The speed under KDE is really impressing. The guys at Debian have done an really nice work. And debian testing rulez.

I will keep you posted

spammers using mod_proxy ?

Everyday last week, somebody was trying to connect to a spesific host on port 25 (SMTP), using mod_proxy. The IP’s are from a provider somewhere in Asia and the host they are trying to connect is in China.

My apache mod_proxy cause it is disabled. I just see it on the logs.

They want to spam or not ?

emerge system

I am playing with gentoo on my laptop for about 3 months. Today i decided to do an emerge system.

It is really easy to update it: emerge –sync followed by a emerge system (you can also use emerge –pretend system first in order to see what it will be updated) and finally a etc-update.

Everything worked as expected. The next step is to do an emerge world….. But i am sure it will take 2 days to finish. The last compilation of kde took about 1 day 🙂