Questions tagged [daemon]

A daemon is a process or program that runs in the background (i.e. requiring no user interaction).

Daemon processes are background programs found in Linux/Unix systems that are typically started during the booting sequence. They perform special management and utility functions, which may either perform consistent tasks like polling (i.e. the syslogd daemon) or wait for a command to do something (like handling setup of new SSH connections via the sshd daemon).

They can be initiated after start time using the systemctl command:

$systemctl start daemon.service

Some commonly used daemons include:

  • httpd (HTTP web server management)
  • mountd (Mounting of file systems)
  • nfsd (Sharing of network files)
  • routed (Management of routing tables)
  • ntpd (Network time protocol administering)
  • dhcpd (Dynamic host configuration protocol administering)
2634 questions
1
vote
1 answer

systemd restart service on watchdog does terminate previous hanged instance

I'm trying to setup systemd service configuration to restart service on watchdog failure. If my application does not call sd_notify() in time, systemd spawns new instance. However, previus instance is not killed. After some time, I have many…
dorny
  • 143
  • 1
  • 13
1
vote
1 answer

How do I run a plist daemon on MAC OS 10.8.5 with the correct file permissions

I have a plist file saved to /Library/LaunchDaemons/local.WiFiDaemon.plist Here is the code:
1
vote
2 answers

Script to detect if NAS is connected and if so mount Shares

I'm trying to find a way of mounting Shares (afp) on my NAS automatically. I use logins on it to control which shares are accessible by the computer (for privacy and other reasons). When switching logins not all of the shares get re-mounted which…
Tom
  • 9,725
  • 3
  • 31
  • 48
1
vote
1 answer

Hadoop Daemon Log

This probably sounds like a really simple question, but does anyone know how to access the daemon logs on hadoop? My ResourceManager is not connecting so I am trying to locate the error. I did some research online and found…
user2590144
  • 281
  • 2
  • 7
  • 16
1
vote
0 answers

Forwarding AnyEvent::Log messages to a callback if certain requirements are met

I am working on a project that uses AnyEvent Log in the main program as well as several dependent modules/packages. I currently have each module writing to it's own context, and all contexts are added to the main programs context as slaves. This…
linjoy
  • 11
  • 1
1
vote
2 answers

Ruby daemons and frequency

I've written this ruby daemon, and was wondering if somebody could have a look at it, and tell me if the approach I've taken is correct. #!/usr/bin/env ruby require 'logger' # You might want to change this ENV["RAILS_ENV"] ||=…
Marcos Placona
  • 21,468
  • 11
  • 68
  • 93
1
vote
4 answers

How can I prevent a daemon started over SSH from terminating at logout?

EDIT this is fixed. See my answer below. I have a headless server running transmission-daemon on Angstrom Linux. I am able to SSH into the machine and invoke transmission-daemon via this init script; however, the process terminates as soon as I log…
Rick U
  • 111
  • 3
1
vote
1 answer

Difference between python-daemon and multiprocessing libraries

I need to run a daemon process from a python django module which will be running an xmlrpc server. The main process will host an xmlrpc client. I am a bit confused regarding creating, starting, stopping and terminating daemons in python. I have seen…
Sayantan
  • 329
  • 3
  • 15
1
vote
1 answer

Software setup for hardware enabled application

I have a Raspberry PI that is tightly coupled with a device that I want to control. The desired setup I want to have would look something like this: The physical device with interactive hardware controls on the device (speaker, mic, buttons) A…
Besi
  • 22,579
  • 24
  • 131
  • 223
1
vote
2 answers

Launchd agent not starting

I'm attempting to write a launchd agent that runs a simple application for every user that logs in to the Mac OS X system. I have created a file named com.mycompany.myapp.plist and placed it in /Library/LaunchAgents. The contents of that file…
Thomi
  • 11,647
  • 13
  • 72
  • 110
1
vote
2 answers

Proper way to start thread from python daemon

I need to write simple daemon with web interface. The idea is to use python-daemon package and run wsgiref.simple_server inside one thread. Daemon works fine with the following code : import daemon import logging import time import signal import…
1
vote
1 answer

How do I rollback capistrano tasks upon failure?

In my Capistrano deploy.rb, I have a couple of daemons like delayed_jobs and fetcher, starting and stopping depending on where they are in the deployment process. This method would create problems if a deployment fails, because the daemons wouldn't…
David C
  • 3,659
  • 5
  • 34
  • 46
1
vote
2 answers

warning: implicit declaration of function 'daemon'

I get this warning while compiling my program. daemon() is declared in unistd.h and its included. How to fix this or make it disappear? error: dcron.c: In function 'main': dcron.c:35:4: warning: implicit declaration of function 'daemon'…
Ari Malinen
  • 576
  • 2
  • 6
  • 20
1
vote
1 answer

How to schedule a task at accurate time on Jailbroken iPhone in deep sleep

I'm developing an background (daemon) application that will schedule a task on an exact time. For example, do something at 3 PM, or it can be do something after 3 hours. I've tried NSTimer and scheduling NSThread, but it does not do the task at the…
BB.
  • 707
  • 2
  • 11
  • 22
1
vote
1 answer

Debug a daemon in RubyMine

Is there any way to debug a daemon in Ruby Mine. The way I am calling this file is like this Daemons.run(file, options) where file is the name of file and options is the bunch of options that I am passing to the file.
user1788294
  • 1,823
  • 4
  • 24
  • 30