LinuxQuestions.org
Visit Jeremy's Blog.
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 03-30-2005, 05:32 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
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?
 
Old 03-30-2005, 05:44 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
ps?
 
Old 03-30-2005, 06:39 AM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
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.
 
Old 03-30-2005, 06:48 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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
...
 
Old 03-30-2005, 07:05 AM   #5
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
Iptables is not running as a service. It's just a program to manage kernel's packet filtering capabilities. Kernel does the actual job.
 
Old 03-30-2005, 07:40 AM   #6
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
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?
 
Old 03-30-2005, 09:20 AM   #7
anand_kt
Member
 
Registered: Dec 2004
Location: Chennai, India
Distribution: Red Hat, Knoppix
Posts: 86

Rep: Reputation: 15
partly,
chkconfig --list
service --status-all
 
Old 03-30-2005, 09:56 AM   #8
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally posted by anand_kt
partly,
chkconfig --list
service --status-all
I think those commands are RedHat/Fedora specific.
 
Old 03-30-2005, 10:12 AM   #9
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
I like
Code:
ps aux -H
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?
 
Old 03-30-2005, 10:41 AM   #10
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Thanks oneandoneis2. That helps, but the info is a bit difficult to sift through.

Is there command to view them sorted by runlevel?
 
Old 03-30-2005, 10:46 AM   #11
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
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. . .
 
Old 03-30-2005, 11:00 AM   #12
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
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.
 
Old 03-30-2005, 11:21 AM   #13
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
How about:

Code:
ls /etc/rc.d/rc.[runlevel] | grep ^S
 
Old 03-30-2005, 11:24 AM   #14
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
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!
 
Old 03-30-2005, 07:07 PM   #15
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
view runinig services juanb Linux - General 3 05-17-2006 12:36 PM
How can I view running services? ctroyp Fedora 8 10-19-2005 01:45 PM
Linux & Active Directory Services ? Pravat Linux - Networking 8 05-11-2005 12:56 PM
active device list hinetvenkat Linux - Enterprise 0 12-20-2004 03:44 PM
Postfix, Active Directory Services and Authentication weazy Linux - Software 1 04-28-2003 03:38 PM

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

All times are GMT -5. The time now is 04:25 AM.

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