[pkg-fso-maint] [debian/fso] w/o sim battery empties alarmingly fast

arne anka openmoko at ginguppin.de
Fri Apr 2 23:10:28 UTC 2010


> sudo strace -o s -s4096 -f pm-suspend
>
> and then
>
> grep execve\( s
>
> to see what it tries to execute?

pm-suspend does not suspend the fr and from the log it looks like  
000kernel-change is the only script exectuted ...
whatever happens when the fr goes to sleep, pm-utils seems not to be  
involved.


debian-gta02:/tmp# grep execve\( s
4402  execve("/usr/sbin/pm-suspend", ["pm-suspend"], [/* 14 vars */]) = 0
4405  execve("/usr/bin/tr", ["tr", "-", "_"], [/* 17 vars */]) = 0
4406  execve("/bin/touch", ["touch", "/tmp/test_config.d"], [/* 50 vars  
*/]) = 0
4407  execve("/bin/grep", ["grep", "-q", "mem", "/sys/power/state"], [/*  
50 vars */]) = 0
4408  execve("/bin/grep", ["grep", "-q", "mem", "/sys/power/state"], [/*  
50 vars */]) = 0
4409  execve("/usr/bin/id", ["id", "-u"], [/* 50 vars */]) = 0
4410  execve("/bin/mkdir", ["mkdir", "-p", "/var/run/pm-utils/locks"], [/*  
50 vars */]) = 0
4411  execve("/bin/touch", ["touch",  
"/var/run/pm-utils/locks/pm-suspend.lock"], [/* 50 vars */]) = 0
4412  execve("/usr/bin/flock", ["flock", "-x", "-n", "3"], [/* 50 vars  
*/]) = 0
4413  execve("/bin/rm", ["rm", "-rf",  
"/var/run/pm-utils/pm-suspend/storage"], [/* 50 vars */]) = 0
4414  execve("/bin/mkdir", ["mkdir", "-p",  
"/var/run/pm-utils/pm-suspend/storage"], [/* 50 vars */]) = 0
4415  execve("/bin/grep", ["grep", "-vxFf",  
"/var/run/pm-utils/pm-suspend/storage/parameters.rm",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 50 vars */]) = 0
4416  execve("/bin/cp", ["cp", "-f",  
"/var/run/pm-utils/pm-suspend/storage/parameters.new",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 50 vars */]) = 0
4418  execve("/bin/cat", ["cat",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 50 vars */]) = 0
4419  execve("/bin/rm", ["rm", "-f",  
"/var/run/pm-utils/pm-suspend/storage/parameters.new"], [/* 50 vars */]) =  
0
4420  execve("/bin/grep", ["grep", "-vxFf",  
"/var/run/pm-utils/pm-suspend/storage/parameters.rm",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 51 vars */]) = 0
4421  execve("/bin/cp", ["cp", "-f",  
"/var/run/pm-utils/pm-suspend/storage/parameters.new",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 51 vars */]) = 0
4422  execve("/bin/grep", ["grep", "-vxFf",  
"/var/run/pm-utils/pm-suspend/storage/parameters.rm",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 51 vars */]) = 0
4423  execve("/bin/cp", ["cp", "-f",  
"/var/run/pm-utils/pm-suspend/storage/parameters.new",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 51 vars */]) = 0
4425  execve("/bin/cat", ["cat",  
"/var/run/pm-utils/pm-suspend/storage/parameters"], [/* 51 vars */]) = 0
4426  execve("/bin/rm", ["rm", "-f",  
"/var/run/pm-utils/pm-suspend/storage/parameters.new"], [/* 51 vars */]) =  
0
4427  execve("/bin/date", ["date"], [/* 51 vars */]) = 0
4430  execve("/usr/bin/sort", ["sort"], [/* 51 vars */]) = 0
4431  execve("/usr/bin/uniq", ["uniq"], [/* 51 vars */]) = 0
4432  execve("/usr/lib/pm-utils/sleep.d/000kernel-change",  
["/usr/lib/pm-utils/sleep.d/000kernel-change", "suspend", "suspend"], [/*  
51 vars */]) = 0
4433  execve("/bin/touch", ["touch", "/tmp/foo"], [/* 51 vars */]) = 0
4434  execve("/usr/lib/pm-utils/sleep.d/00at",  
["/usr/lib/pm-utils/sleep.d/00at", "suspend", "suspend"], [/* 51 vars */])  
= 0
4435  execve("/sbin/atq", ["atq"], [/* 51 vars */]) = -1 ENOENT (No such  
file or directory)
4435  execve("/usr/sbin/atq", ["atq"], [/* 51 vars */]) = -1 ENOENT (No  
such file or directory)
4435  execve("/bin/atq", ["atq"], [/* 51 vars */]) = -1 ENOENT (No such  
file or directory)
4435  execve("/usr/bin/atq", ["atq"], [/* 51 vars */]) = -1 ENOENT (No  
such file or directory)
4435  read(4, "   changes the current directory, and assumes that the  
client doesn't\n    either.\n\n    Example:\n\n    import os\n    from  
os.path import join, getsize\n    for root, dirs, files in  
os.walk('python/Lib/email'):\n        print root, \"consumes\",\n         
print sum([getsize(join(root, name)) for name in files]),\n        print  
\"bytes in\", len(files), \"non-directory files\"\n        if 'CVS' in  
dirs:\n            dirs.remove('CVS')  # don't visit CVS directories\n     
\"\"\"\n\n    from os.path import join, isdir, islink\n\n    # We may not  
have read permission for top, in which case we can't\n    # get a list of  
the files the directory contains.  os.path.walk\n    # always suppressed  
the exception then, rather than blow up for a\n    # minor reason when  
(say) a thousand readable directories are still\n    # left to visit.   
That logic is copied here.\n    try:\n        # Note that listdir and  
error are globals in this module due\n        # to earlier  
import-*.\n        names = listdir(top)\n    except error, err:\n         
if onerror is not None:\n            onerror(err)\n        return\n\n     
dirs, nondirs = [], []\n    for name in names:\n        if isdir(join(top,  
name)):\n            dirs.append(name)\n        else:\n             
nondirs.append(name)\n\n    if topdown:\n        yield top, dirs,  
nondirs\n    for name in dirs:\n        path = join(top, name)\n        if  
not islink(path):\n            for x in walk(path, topdown,  
onerror):\n                yield x\n    if not topdown:\n        yield  
top, dirs, nondirs\n\n__all__.append(\"walk\")\n\n# Make sure os.environ  
exists, at least\ntry:\n    environ\nexcept NameError:\n    environ =  
{}\n\ndef execl(file, *args):\n    \"\"\"execl(file, *args)\n\n    Execute  
the executable file with argument list args, replacing the\n    current  
process. \"\"\"\n    execv(file, args)\n\ndef execle(file, *args):\n     
\"\"\"execle(file, *args, env)\n\n    Execute the executable file with  
argument list args and\n    environment env, replacing the current  
process. \"\"\"\n    env = args[-1]\n    execve(file, args[:-1],  
env)\n\ndef execlp(file, *args):\n    \"\"\"execlp(file, *args)\n\n     
Execute the executable file (which is searched for along $PATH)\n    with  
argument list args, replacing the current process. \"\"\"\n     
execvp(file, args)\n\ndef execlpe(file, *args):\n    \"\"\"execlpe(file,  
*args, env)\n\n    Execute the executable file (which is searched for  
along $PATH)\n    with argument list args and environment env, replacing  
the current\n    process. \"\"\"\n    env = args[-1]\n    execvpe(file,  
args[:-1], env)\n\ndef execvp(file, args):\n    \"\"\"execp(file,  
args)\n\n    Execute the executable file (which is searched for along  
$PATH)\n    with argument list args, replacing the current process.\n     
args may be a list or tuple of strings. \"\"\"\n    _execvpe(file,  
args)\n\ndef execvpe(file, args, env):\n    \"\"\"execvpe(file, args,  
env)\n\n    Execute the executable file (which is searched for along  
$PATH)\n    with argument list args and environment env , replacing  
the\n    current process.\n    args may be a list or tuple of strings.  
\"\"\"\n    _execvpe(file, args,  
env)\n\n__all__.extend([\"execl\",\"execle\",\"execlp\",\"execlpe\",\"execvp\",\"execvpe\"])\n\ndef  
_execvpe(file, args, env=None):\n    if env is not None:\n        func =  
execve\n        argrest = (args, env)\n    else:\n        func =  
execv\n        argrest = (args,)\n        env = environ\n\n    head, tail  
= path.split(file)\n    if head:\n        func(file, *argrest)\n         
return\n    if 'PATH' in env:\n        envpath = env['PATH']\n     
else:\n        envpath = defpath\n    PATH = envpath.split(pathsep)\n     
saved_exc = None\n    saved_tb = None\n    for dir in PATH:\n         
fullname = path.join(dir, file)\n        try:\n            func(fullname,  
*argrest)\n        except error, e:\n            tb =  
sys.exc_info()[2]\n            if (e.errno != errno.ENOENT and e.errno !=  
errno.ENOTDIR\n                and saved_exc is None):\n                 
saved_exc = e\n                saved_tb = tb\n    if saved_exc:\n         
raise error, saved_exc, saved_tb\n    raise error, e, tb\n\n# Change  
environ to automatically call putenv() if it exists\ntry:\n    # This will  
fail if there's no putenv\n    putenv\ne", 4096) = 4096
4436  execve("/bin/date", ["date"], [/* 51 vars */]) = 0
4437  execve("/bin/date", ["date"], [/* 51 vars */]) = 0
4440  execve("/usr/bin/sort", ["sort", "-r"], [/* 51 vars */]) = 0
4441  execve("/usr/bin/uniq", ["uniq"], [/* 51 vars */]) = 0
4442  execve("/usr/lib/pm-utils/sleep.d/000kernel-change",  
["/usr/lib/pm-utils/sleep.d/000kernel-change", "resume", "suspend"], [/*  
51 vars */]) = 0
4443  execve("/bin/touch", ["touch", "/tmp/foo"], [/* 51 vars */]) = 0
4444  execve("/bin/rm", ["rm", "-f",  
"/var/run/pm-utils/locks/pm-suspend.lock"], [/* 51 vars */]) = 0
debian-gta02:/tmp#


--



More information about the pkg-fso-maint mailing list