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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-30-2005, 05:32 AM
|
#1
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Rep: 
|
Quickly view a list of active services
Is there any program or command line tool that will let me view a list of running services (daemons) on Linux?
|
|
|
03-30-2005, 05:44 AM
|
#2
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep: 
|
ps?
|
|
|
03-30-2005, 06:39 AM
|
#3
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Original Poster
Rep: 
|
ps is not showing any background services/processes that I know are running like iptables
Actually it is showing the same result as KDE System Guard. I wanted a list of background processes like the ones that show up on bootup like iptables, timidity++, alsa and so on.
Thanks anyway.
|
|
|
03-30-2005, 06:48 AM
|
#4
|
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113
Rep: 
|
If something's running, AFAIK, it's got to have a PID and show up - are you using 'ps ax'?
Code:
...
69 ? Ss 0:00 /usr/sbin/syslogd
72 ? Ss 0:00 /usr/sbin/klogd -c 3 -x
120 ? S<s 0:00 udevd
170 ? S 0:00 [khubd]
2611 ? S 0:00 /usr/sbin/crond -l10
...
|
|
|
03-30-2005, 07:05 AM
|
#5
|
Member
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505
Rep:
|
Iptables is not running as a service. It's just a program to manage kernel's packet filtering capabilities. Kernel does the actual job.
|
|
|
03-30-2005, 07:40 AM
|
#6
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Original Poster
Rep: 
|
What I wanted to know was that is there any tool like "redhat-services-config" in Debian and Gentoo which will show me which processes are active and which are not.
This information was available in webmin, but since I don't have webmin installed in Gentoo, I wanted to know a simple command line which would give me this information.
Sorry if I haven't been clear. Just that my terminology is not very illuminating. I hope you can understand what I mean.
Maybe "which process is running in which runlevel" would be a better description?
|
|
|
03-30-2005, 09:20 AM
|
#7
|
Member
Registered: Dec 2004
Location: Chennai, India
Distribution: Red Hat, Knoppix
Posts: 86
Rep:
|
partly,
chkconfig --list
service --status-all
|
|
|
03-30-2005, 09:56 AM
|
#8
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Original Poster
Rep: 
|
Quote:
Originally posted by anand_kt
partly,
chkconfig --list
service --status-all
|
I think those commands are RedHat/Fedora specific.
|
|
|
03-30-2005, 10:12 AM
|
#9
|
Senior Member
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460
Rep:
|
I like
which shows all active processes, and groups them by what called what - e.g. if you started X from a terminal and then called firefox from an xterm, it would show something like:
Code:
Terminal 1
xorg
gnome
xterm
firefox
Does that help?
|
|
|
03-30-2005, 10:41 AM
|
#10
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Original Poster
Rep: 
|
Thanks oneandoneis2. That helps, but the info is a bit difficult to sift through.
Is there command to view them sorted by runlevel?
|
|
|
03-30-2005, 10:46 AM
|
#11
|
Senior Member
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460
Rep:
|
What do u mean by runlevel?
I understand "runlevel" as the thing you define on bootup that determines what services start up during the boot process. . .
If by 'active services' you mean ones that are using the CPU, then you could use 'top' sorted by CPU usage. . .
|
|
|
03-30-2005, 11:00 AM
|
#12
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Original Poster
Rep: 
|
I mean viewing which services are initialized at which runlevel. Is there any way to view and edit this information? Without using any distro-specific GUI tools? I am using Debian and Gentoo.
Also which of those are currently running.
|
|
|
03-30-2005, 11:21 AM
|
#13
|
Member
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505
Rep:
|
How about :
Code:
ls /etc/rc.d/rc.[runlevel] | grep ^S

|
|
|
03-30-2005, 11:24 AM
|
#14
|
Senior Member
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Original Poster
Rep: 
|
In Debian the directory structure is a little different
/etc/rc0.d/
/etc/rc1.d/
...
and so on.
In any case, thanks for the information!
|
|
|
03-30-2005, 07:07 PM
|
#15
|
Gentoo Developer
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Rep:
|
Try rc-update show,that will show what was started at boot at the default run level ect.
Last edited by comprookie2000; 03-30-2005 at 07:08 PM.
|
|
|
All times are GMT -5. The time now is 07:15 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|