LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-24-2003, 12:43 PM   #1
slugfish
LQ Newbie
 
Registered: Oct 2003
Posts: 3

Rep: Reputation: 0
Too many sleeping processes on startup?


Hi, I'm rather confused how to control what programs Linux runs on startup (if I should control them at all). Right now I am running Gnome, 2 terminals, Gaim, and Mozilla Firebird. When I use the 'top' command it tells me there are 79 processes running.
Code:
top - 12:32:30 up  2:11,  3 users,  load average: 1.58, 1.40, 1.31
Tasks:  79 total,   2 running,  77 sleeping,   0 stopped,   0 zombie
Cpu(s):  95.1% user,   4.9% system,   0.0% nice,   0.0% idle
Mem:    255088k total,   242016k used,    13072k free,    19564k buffers
Swap:   506512k total,     5280k used,   501232k free,    92732k cached
This results with about 200mb out of my total 256mb or RAM being used on startup. Is it normal to have that many sleeping processes on startup? If not, how would I go about figuring out what they are and telling them not to startup until a program calls out for them?

For instance, I see a lot of what I believe are KDE related programs. I am running Gnome under Gentoo and used the USE variables of -kde and -qt so I don't see how these got installed, much less are running.
Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command
    2 root      15   0     0    0    0 S  0.0  0.0   0:00.03 keventd
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd_CPU0
    4 root      15   0     0    0    0 S  0.0  0.0   0:00.25 kswapd
    4 root      15   0     0    0    0 S  0.0  0.0   0:00.25 kswapd
    5 root      15   0     0    0    0 S  0.0  0.0   0:00.20 kscand
    6 root      15   0     0    0    0 S  0.0  0.0   0:00.10 bdflush
    7 root      15   0     0    0    0 S  0.0  0.0   0:00.42 kupdated
  309 root      18   0     0    0    0 S  0.0  0.0   0:00.00 khubd
  342 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kreiserfsd
Sorry I can't be much more specific than that, as that's about all I understand about it at this point.

Thanks.
 
Old 10-24-2003, 12:46 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Just becuase they start with a K doesn't mean they are KDE related. From your list you outputed here, most of those starting with a k are system processes relating to the kernel.

Regards.
 
Old 10-24-2003, 12:54 PM   #3
slugfish
LQ Newbie
 
Registered: Oct 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Ah, thanks for the clarification. I come from the world of Windows where they tell you very little about what's going on in the background, so I really don't know what would be normal. My main concern is how low my system reasources always are, it makes most programs run rather slowly (like Firebird).

I don't know if all those processes are the problem though, I just assumed.

I found a similar thread here http://www.linuxquestions.org/questi...light=sleeping
so here's my list
Code:
top - 13:00:58 up  2:39,  3 users,  load average: 1.61, 1.53, 1.39
Tasks:  75 total,   3 running,  72 sleeping,   0 stopped,   0 zombie
Cpu(s):  70.0% user,  30.0% system,   0.0% nice,   0.0% idle
Mem:    255088k total,   240796k used,    14292k free,    19200k buffers
Swap:   506512k total,     5172k used,   501340k free,   106128k cached
                                                                                                                             
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command
26628 slugfish  16   0   936  936  760 R 40.8  0.4   0:00.23 top
 1942 root      16   0  280m  24m 4380 R 27.2  9.8  16:15.62 X
 2130 slugfish  16   0  7744 7732 3616 S 27.2  3.0   5:21.57 gnome-terminal
    1 root      15   0   388  388  336 S  0.0  0.2   0:04.60 init
    2 root      15   0     0    0    0 S  0.0  0.0   0:00.09 keventd
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd_CPU0
    4 root      15   0     0    0    0 S  0.0  0.0   0:00.26 kswapd
    5 root      15   0     0    0    0 S  0.0  0.0   0:00.24 kscand
    6 root      15   0     0    0    0 S  0.0  0.0   0:00.10 bdflush
    7 root      15   0     0    0    0 S  0.0  0.0   0:00.45 kupdated
  309 root      18   0     0    0    0 S  0.0  0.0   0:00.00 khubd
  342 root      15   0     0    0    0 S  0.0  0.0   0:00.00 kreiserfsd
  491 root      15   0   800  800  500 S  0.0  0.3   0:00.08 devfsd
 1160 root      15   0   608  608  456 S  0.0  0.2   0:00.01 syslog-ng
 1281 root      15   0     0    0    0 S  0.0  0.0   0:00.00 eth0
 1386 root      16   0   320  320  252 S  0.0  0.1   0:00.00 dhcpcd
 1687 root      15   0   536  536  444 S  0.0  0.2   0:00.00 cron
 1840 xfs       15   0  4476 4476  544 S  0.0  1.8   0:00.46 xfs
 1852 root      16   0   864  864  624 S  0.0  0.3   0:00.06 login
 1853 root      15   0   380  380  328 S  0.0  0.1   0:00.00 agetty
 1854 root      15   0   380  380  328 S  0.0  0.1   0:00.00 agetty
 1855 root      15   0   380  380  328 S  0.0  0.1   0:00.00 agetty
 1856 root      15   0   380  380  328 S  0.0  0.1   0:00.00 agetty
 1857 root      15   0   380  380  328 S  0.0  0.1   0:00.00 agetty
 1922 slugfish  15   0  1148 1148  908 S  0.0  0.5   0:00.00 bash
 1929 slugfish  16   0   804  804  696 S  0.0  0.3   0:00.01 startx
 1941 slugfish  16   0   528  528  444 S  0.0  0.2   0:00.00 xinit
 1946 slugfish  15   0  1804 1800  956 S  0.0  0.7   0:00.80 gnome-session
 1964 slugfish  15   0   412  412  300 S  0.0  0.2   0:00.00 ssh-agent
 1966 slugfish  15   0 22300  21m 1044 S  0.0  8.7   0:02.66 gconfd-2
 1969 slugfish  15   0  1164 1164  560 S  0.0  0.5   0:00.31 bonobo-activati
 1971 slugfish  15   0  1160 1160  716 S  0.0  0.5   0:00.29 gnome-smproxy
 1973 slugfish  15   0  2096 2092  860 S  0.0  0.8   0:00.77 gnome-settings-
 1982 slugfish  15   0  1100 1100  764 S  0.0  0.4   0:00.56 xscreensaver
That's not the full list though, the terminal won't let me select more. And those are all processes I'm pretty sure SHOULD be running. How would I get it to show me the other 40 or so processes?

Linux is making me feel like an idiot.

Last edited by slugfish; 10-24-2003 at 01:04 PM.
 
Old 10-24-2003, 02:02 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Do a ps -aux as that will show you all the processes running currently on your machine.
 
Old 10-24-2003, 02:17 PM   #5
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Quote:
Hi, I'm rather confused how to control what programs Linux runs on startup (if I should control them at all).
Well...... there's a fair chance that there are certain services that run on boot up that you dont need.

In many distributions the actuall start-up services are contained in

/etc/rc.d/init.d

and the Start symlinks to those services are contained in

/etc/rc.d/rcX.d

were X corresponds to the run level.

One way to stop a service from starting in a particular run-level, is just to remove its S symlink from the relevant run-level directory - I create a separate directory to hold the removed symlinks just in case I ever want to initiate the service again

so

mkdir /etc/removed_services

then - for example, to stop the "random number generator" service from starting in run-level 5

mv /etc/rc.d/rc5.d/S20random /etc/removed_services

this symlink is now not in the run-level 5 directory hence the service wont start on boot up - same idea applies.............

If you have a look on Google you'll find what the actual services do - in general, be careful when stopping services - read up on it first.
 
Old 10-24-2003, 03:04 PM   #6
slugfish
LQ Newbie
 
Registered: Oct 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks to both of you, that was exactly the kind of information I was looking for.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Processes on startup EclipseAgent SUSE / openSUSE 2 11-24-2005 03:48 AM
About startup processes kejia Fedora 2 11-09-2005 07:38 PM
starting processes on startup Henster Linux - Newbie 2 06-28-2005 12:12 PM
edit startup processes android6011 Linux - General 2 06-02-2005 08:13 PM
75 processes sleeping? Is this normal? randon Linux - General 1 09-27-2003 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:02 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