LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-03-2008, 04:02 AM   #1
zlya
Member
 
Registered: Dec 2006
Distribution: Debian
Posts: 62

Rep: Reputation: 15
root sleep command when starting some programs


Hello,

I'm running KDE on Debian Lenny on an IBM T42. Occasionally (about once a day) when I try to start a program I get the little bouncy icon saying it's starting for about 30 seconds, after which the icon disappears, but the program doesn't start. After about three minutes, when I've given up and forgotten about it, the program window suddenly appears. This happens most often with kwrite, but has also happened with various open office programs. It has happened when I started a program by typing its name into the Run Command box, or by selecting it from a menu, or typing it into the command line.

Using ps -ef during the delay, I get:

lydia 7594 3184 0 09:52 ? 00:00:00 kwrite
root 8164 1316 0 09:54 ? 00:00:00 sleep 1
root 8167 1644 0 09:54 ? 00:00:00 sleep 1
lydia 8168 8147 0 09:54 pts/1 00:00:00 ps -ef

After killing the root sleep programs, I get:

lydia 7594 3184 0 09:52 ? 00:00:00 kwrite todo.txt
root 11441 1644 0 10:03 ? 00:00:00 sleep 1
root 11444 1316 0 10:03 ? 00:00:00 sleep 1
lydia 11445 8147 0 10:03 pts/1 00:00:00 ps -ef

This isn't a terribly debilitating problem, but it gets annoying when I want to jot some notes and have to wait three minutes for the program to start. This also happened to me when I was running Debian Etch.

Thanks for your help,

Lydia
 
Old 03-04-2008, 04:33 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
If you suspect these sleep commands are related to problem, I would suggest tracing the ancestry of the commands back to whatever is causing them. You might (if you haven't already) want to redirect the output of ps to a file. The third column is the PID of that process's parent. So for your first output you might look and see what processes 1316 and 1644 are. And then see what the parent of those processes are, etc. You might find that the sleep processes have nothing to do with your problem. Or, it might give you another piece or two to the puzzle.

EDIT: I would suspect that sleep 1 commands are called from a script that is waiting for something to happen and polling once a second. Using sleep commands prevents such a script from needlessly using up all the CPU time while it waits.

Last edited by blackhole54; 03-04-2008 at 04:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Root Certificate Programs - The root of all trust LXer Syndicated Linux News 0 12-15-2007 04:51 AM
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 01:14 AM
Perl - problem with sleep command rose_bud4201 Programming 2 05-16-2005 11:44 AM
Starting programs as root jrdioko Linux - Software 2 03-17-2005 12:26 AM
sleep mode command? uv1 Linux - Newbie 1 09-15-2004 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration