You are not logged in.

#1 2010-09-27 17:20:05

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

How do i see what deamons are running?

For example, networkmanager dispatcher launches openntpd when connected to a network. How do i see a list processes such as daemons that were launched through other processes?

I have ALDM installed (arch linux daemon manager) but it only shows daemons that are listed in rc.conf. Hmmm... but i'm guessing i could add openntpd to rc.conf as !openntpd before networkmanager, then let networkmanager start it and that way it'll be visible in ALDM?

Any other way to see daemons?

Last edited by trusktr (2010-09-27 17:21:33)


joe@trusktr.io - joe at true skater dot io.

Offline

#2 2010-09-27 17:34:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How do i see what deamons are running?

'ls /var/run/daemons/' or maybe through e.g. pstree.

Last edited by karol (2010-09-27 17:36:14)

Offline

#3 2010-09-27 17:39:07

adrians
Member
From: Latvia
Registered: 2009-05-05
Posts: 18

Re: How do i see what deamons are running?

One way to see running daemons is to list processes with parent pid 1:
ps --ppid=1

Offline

#4 2010-09-27 19:12:06

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: How do i see what deamons are running?

pstree / htop can also be handy.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2010-09-28 06:44:38

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: How do i see what deamons are running?

Oh wow, thanks you guys. that was so helpful. That pstree is especially amazing, but I don't see openntpd listed in it.

init─┬─NetworkManager─┬─dhcpcd
     │                └─{NetworkManager}
     ├─SystemToolsBack
     ├─6*[agetty]
     ├─bash───tomboy───3*[{tomboy}]
     ├─bonobo-activati───{bonobo-activat}
     ├─chromium─┬─chromium
     │          ├─chromium───7*[{chromium}]
     │          └─18*[{chromium}]
     ├─chromium───18*[chromium───{chromium}]
     ├─clock-applet
     ├─console-kit-dae───63*[{console-kit-da}]
     ├─crond
     ├─2*[dbus-daemon]
     ├─2*[dbus-launch]
     ├─deskbar-applet
     ├─e-addressbook-f
     ├─fish-applet-2
     ├─gconfd-2
     ├─gdm-binary─┬─gdm-simple-slav─┬─Xorg
     │            │                 ├─gdm-session-wor─┬─gnome-session─┬─compiz───emerald
     │            │                 │                 │               ├─docky─┬─python
     │            │                 │                 │               │       └─6*[{docky}]
     │            │                 │                 │               ├─gdu-notificatio
     │            │                 │                 │               ├─gnome-panel
     │            │                 │                 │               ├─gnome-power-man
     │            │                 │                 │               ├─nautilus
     │            │                 │                 │               ├─nm-applet
     │            │                 │                 │               ├─polkit-gnome-au
     │            │                 │                 │               ├─6*[python]
     │            │                 │                 │               ├─ssh-agent
     │            │                 │                 │               └─{gnome-session}
     │            │                 │                 └─{gdm-session-wo}
     │            │                 └─{gdm-simple-sla}
     │            └─{gdm-binary}
     ├─gnome-keyring-d───2*[{gnome-keyring-}]
     ├─gnome-screensav
     ├─gnome-settings-
     ├─gnome-terminal─┬─bash───pstree
     │                ├─gnome-pty-helpe
     │                └─{gnome-terminal}
     ├─gvfs-fuse-daemo───3*[{gvfs-fuse-daem}]
     ├─gvfs-gdu-volume
     ├─gvfsd
     ├─gvfsd-burn
     ├─gvfsd-computer
     ├─gvfsd-metadata
     ├─gvfsd-trash
     ├─gweather-applet
     ├─hald─┬─hald-runner─┬─hald-addon-acpi
     │      │             ├─hald-addon-inpu
     │      │             ├─hald-addon-rfki
     │      │             └─2*[hald-addon-stor]
     │      └─{hald}
     ├─mixer_applet2───{mixer_applet2}
     ├─multiload-apple
     ├─notification-ar
     ├─2*[ntpd]
     ├─polkit-gnome-au
     ├─polkitd
     ├─python
     ├─stickynotes_app
     ├─syslog-ng───syslog-ng
     ├─system-tools-ba
     ├─udevd───2*[udevd]
     ├─udisks-daemon─┬─udisks-daemon
     │               └─{udisks-daemon}
     ├─upowerd
     ├─wnck-applet
     └─wpa_supplicant

I do see openntpd in /var/run/daemons though.


joe@trusktr.io - joe at true skater dot io.

Offline

#6 2010-09-28 07:25:15

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: How do i see what deamons are running?

That's probably because OpenNTPD is not a constantly running process. The alsa daemon for instance just restores and saves sound settings after boot and before shutdown - the rest of the time it's inactive and won't be shown as a process either.


no place like /home
github

Offline

#7 2010-09-28 08:58:17

dermarlo
Member
From: Wuppertal
Registered: 2010-09-19
Posts: 6
Website

Re: How do i see what deamons are running?

ATM I can only provide information from an Server running ubuntu - i think it should be the same in Arch:

/etc/openntpd/ntpd.conf

# Addresses to listen on (ntpd does not listen by default)
#listen on *
#listen on 127.0.0.1
#listen on ::1

After removing the # before 127.0.0.1:

%:/etc/openntpd# netstat -ntplu
...
udp        0      0 127.0.0.1:123           0.0.0.0:*                           8177/ntpd       

Offline

#8 2010-09-28 14:53:11

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: How do i see what deamons are running?

If your daemon is started the rc.d way and complies to rc.d standards, the following might work for you.

#!/bin/bash
# daemon status

 function chk_status(){
  target=$1
  if [ $target != "functions" ] && [ $target !=  "functions.d" ]
  then
    if [ -f "/var/run/daemons/$target" ]
     then
       stat="\e[1;32m[RUNNING]"
     else
       stat="\e[1;31m[STOPPED]"
     fi

    printf "$stat \t\e[1;34m$target\e[0;0m\n"
  fi
 }

 daemons=$(ls /etc/rc.d/)

 if [[ $1 != "" ]]
  then
   chk_status $1
 else
   for d in $daemons
    do
     chk_status $d
   done | sort
 fi

 exit 0

- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#9 2010-09-28 19:33:56

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: How do i see what deamons are running?

@trusktr
actually, you do have it listed: #5
search for ntpd

Offline

Board footer

Powered by FluxBB