Computer program that runs as a background process, rather than being under the direct control of an interactive user.

learn more… | top users | synonyms

23
votes
4answers
1k views

What's the difference between running a program as a daemon and forking it into background with '&'?

What are the practical differences from a sysadmin point of view when deploying services on a unix based system?
14
votes
9answers
12k views

How to run Dropbox daemon in background?

I'm using Debian 6 and Dropbox. I followed these commands to install it. When I run ~/.dropbox-dist/dropboxd — Dropbox works and stuff. Problem is that when I close terminal or, even worse, — ...
12
votes
5answers
14k views

Ubuntu12.04: How to disable a daemon process at startup

I normally use service start/stop or initctl start/stop to start or stop a daemon process but now what I am looking for is to disable a daemon process from starting at startup example mysqld. ...
9
votes
1answer
406 views

Why does “su -c <command> &” seemingly allow a command to run in the background without hanging up

I was helping a colleague who was having problems with a background process intermittently dying. I found out that they were starting the background process by logging in to the server and executing: ...
8
votes
2answers
512 views

What's the difference between udev and hald?

I'm just beginning to dive into the internals of Linux, and I was wondering what the difference is between udev and the hal daemon. From what I gather, both seem to be responsible for managing hot ...
6
votes
4answers
5k views

How to check that a daemon is listening on what interface?

Ex.: an sshd is configured to only listen on wlan0. So. Besides checking the sshd_config how can I check that a daemon is listening on what inerface? netstat can do it? how? (OS: openwrt or scientific ...
6
votes
1answer
127 views

How do daemons work?

If a user wants to execute a command, he has to first log in into a system. But some users in the system have /bin/false or /sbin/nologin set as a default shell in the /etc/password file. If I change ...
6
votes
1answer
258 views

What is the difference between start-stop-daemon and running with &?

I am setting up a service in /etc/init.d. I am looking at various scripts in there, some are implemented with start-stop-daemon ... and some with /path/to/script &. All of them save the pid in a ...
6
votes
3answers
354 views

is there something like a per-user daemon?

I need to run some background processes that live as long as I am logged in with a certain user. Does there exist something like a per-user daemon? I know only of global daemons that live from ...
6
votes
1answer
1k views

How Do I Add My Own Daemons in Arch Linux? (BSD-style init)

I have created a symlink to a start/stop/etc. wrapper bash script in /etc/rc.d, added it to DAEMONS=() in rc.conf, but the process it points to isn’t starting on boot, and isn’t showing up in the ...
5
votes
2answers
2k views

How to set OOM killer adjustments for daemons permanently?

Running some Linux servers with single or just a few vital system service daemons, I would like to adjust the OOM killer for those daemonized processes in case something odd happens. For example, ...
5
votes
2answers
2k views

Running piped bash script in background

I'm attempting to build a monitoring script to watch localhost communication using netcat. I have two scripts that I've built, one to start the monitoring loop and one for the loop itself. They are as ...
5
votes
4answers
759 views

Is there a JVM daemon?

I'm curious, is there a JVM which runs as an OS daemon, and forks when a new process should be started in it ( i.e. like init, or zygote process on Android )? If no, why not? I am not talking about a ...
5
votes
2answers
3k views

How to run a C program as a daemon?

I have a C program which I want to run as a daemon. How do I install it so it will run as a daemon on CentOS? Someone said to use @reboot, and some said to put it in /etc/rc.d/rc.local. Which is the ...
5
votes
1answer
296 views

Is it possible to write portable service scripts to control a daemon?

I (or one of my colleagues) need to write one or more shell scripts to control the execution of a daemon. We need to be able to start the daemon, tell it to gracefully shut down, and force a shutdown. ...
4
votes
1answer
136 views

How come each program or service has an account of its own in /etc/passwd?

I checked out the /etc/passwd file and I'm surprised to see that there are 35 different accounts, even though I'm the only user on this computer. I see that the accounts have names like mail, news, ...
4
votes
2answers
2k views

Make daemon start up with Linux

I'm writing a simple daemon application using C/C++ and I want it to start when Linux starts up. I am a beginner on Linux systems. I have tried to modify /etc/init.d/skeleton to add a script into ...
4
votes
4answers
600 views

How to prevent atd from running past jobs?

The at daemon is a great tool! However, if a job is scheduled for 8:00 am and the machine is off at that time, at will run the job whenever the machine is booted. What I would like to do is stop it ...
4
votes
2answers
4k views

rpc.statd running on system not using NFS

I have a Debian machine that gets warnings (via the Tiger automatic auditor) that rcp.statd is listening on such-and-such socket. Googling shows rpc.statd is a daemon used by NFS. As far as I know, ...
4
votes
1answer
98 views

Understanding when background process gets terminated

I have a script which starts a number of background processes and if works fine when called from the cmdline. However the same script is also called during my xsession startup and additionally on ...
4
votes
2answers
163 views

Is it good practice to create a background job within an init script if the process can not daemonize itself?

I am fairly new to *nix, and have come across the need to drop multiple processes, that should be run 100% of the time. to background using &. I use the following line in an init.d script to do ...
4
votes
3answers
801 views

Use start-stop-daemon for a PHP server

I'm working on a socket server written in PHP. This part of the work is done but now I need to run it as a daemon. For this I've tried to use start-stop-daemon but it doesn't work. My server is ...
3
votes
4answers
186 views

How to set proper monitoring of my services in a automated way? So that if one crash it auto on the fly restarts?

How can i setup monitoring to my system services? Either using automated script which scan every moment, if httpd, mysqld, and my custom daemon is running or not, if not running it will automatically ...
3
votes
2answers
170 views

Running a daemon as a non-privileged user

I am trying to set up a Thin Ruby application server on my Ubuntu VPS. I have created a specific account, installed rbenv under it along with all gems. I am looking for a convenient way to obtain the ...
3
votes
1answer
42 views

Can systemd do some setup before forking as a user?

Having written several small daemons or web applications for my personal use, I like to manage them using systemd (I am using Arch Linux, if that matters). So I write service files like the one below: ...
3
votes
1answer
141 views

Idiomatic location for file based sockets on Debian systems

I am writing a daemon process for a Debian system in C that uses a Unix Domain Socket. If the deamon process's working directory is the root directory, is there an idiomatic directory to place the ...
3
votes
1answer
374 views

Difference between long running process and daemon?

I'm trying to use Forever to keep my nodejs scripts up and running As per Forever's homepage it says [Long Running Process] The forever process will continue to run outputting log messages to ...
3
votes
2answers
145 views

How to disable a daemon process on RHEL 6.3 like SMF does on Solaris

This problem has been bugging me for a while, we have a program running on Solaris, which managed as a service well by SMF, can be enabled/disabled very easily. Now, according to our market, we would ...
3
votes
2answers
4k views

What is log_daemon_msg ?

I was looking through /etc/init.d/ssh to get an idea of how a "proper" sys daemon is run at boot (I'm trying to add svnserve to that list). I saw this log_daemon_msg used as a command, but I have no ...
3
votes
2answers
1k views

Is there an easy way to create a FreeBSD rc script?

I have a FreeBSD jail in which I run a server using the command: /usr/sbin/daemon /path/to/script.py At the moment I have to run this command every time I restart the machine and the jail starts. ...
3
votes
1answer
448 views

Running a command at startup

I recently came across "remind" in Linux. I liked it almost immediately, but for my reminders to pop up, I needed to run 'remind' in daemon mode. Done quite simply using the following command: remind ...
3
votes
1answer
611 views

Cancelling execution of daemons during boot

During boot a series of predetermined daemons (such as dbus, hal, network) are started. Whenever I'm not connected to an Ethernet cable the network service will obviously fail, but before failing it ...
3
votes
2answers
2k views

Using nohup at /etc/init.d/service

I have been trying to create a daemon using /etc/init.d/myservice and it will call a shell script that contains nohup within the script line. Will it affect it if I could do service stop later?
3
votes
1answer
650 views

Where is my /etc/init.d/skeleton on OpenSuse 12.3?

On a fresh install of OpenSuse 12.3, I want to "daemonize" a program. And, on all examples found on Internet, I see I have to create first a /etc/init.d/myscript based on the /etc/init.d/skeleton... ...
3
votes
1answer
1k views

How to manage fedora services and daemons using the GUI?

I am using Fedora 17, I need a GUI program to start/stop and enable/disable services and daemons. I have installed "system-config-services" but it did not have enable/disable feature(run it with ...
3
votes
1answer
1k views

Problem starting a service running Debian

I want to run a UPNP renderer as a service on a Raspberry Pi using Raspian, a Debian based distro. Actually, everything runs fine but one thing : I can't manage to start the service at boot time at ...
2
votes
5answers
2k views

How can I run a daemon with custom parameters

I am wondering how I can run a daemon, in this case NTP, with custom parameters. For example in my Ubuntu PC I observe that I've got ntpd running this way: $ ps aux | grep ntpd ntp 5936 ... 0:00 ...
2
votes
5answers
2k views

How to stop a program running as daemon

I have launched iperf in daemon mode with iperf -s -D and now I want to stop the service. I tried to use sudo kill pid but it neither work nor complain. The daemon is still running when I check ...
2
votes
2answers
268 views

daemonize rtorrent

Just read the man page, but found no option for this. Maybe I missed it, maybe it doesn't exist. I have a server at home I'm SSHing to for rtorrent, but the torrent stops downloading and won't restart ...
2
votes
2answers
42 views

Let users create their own daemons

How do I let server's users create their own daemons? They should auto-start on boot and otherwise behave just like regular daemons but with lower privileges overall. I remember I saw a tool that ...
2
votes
2answers
25 views

How to add new elements to PATH for daemons (or other best practices)?

I want to add some scripts for custom administrative work to a Linux server (Ubuntu 12.04). Ultimately those scripts are callback scripts from at least one daemon (PostgreSQL in my case but that ...
2
votes
1answer
1k views

How to make SSH tunnel as daemon?

Actually, I need a secured VPN, but configuring it was too hard for me. So I decided to use SSH tunnel. The tunnel could be established when I logged in. :( (1) How can I make a SSH tunnel without ...
2
votes
1answer
76 views

Difference between process in background and daemon [duplicate]

What is technically the difference of a process that started in foreground and was manually put into background and a daemon? Do they have different properties?
2
votes
2answers
39 views

Find: who write backups

I have some daemon which writes Mongo and MySQL backups to the directory /opt/BACKUP, but I dont know - what kind of daemon, when it works and where i can find its settings? These files are in the ...
2
votes
1answer
66 views

Is there a mechanism to run a “service” by a non-root user? [duplicate]

Is there a way I can have a continuously running, background process that can be controlled by me (a regular, non-root user)? All I need to be able to do is start, stop and restart the process. ...
2
votes
1answer
516 views

Preventing ChromeOS from blanking the screen when working on a different tty

I am running Archlinux in a chroot alongside Chrome OS on a chromebook. The original project is there, my fork of it is here (mostly similar). The issue is that the display power management of Chrome ...
2
votes
1answer
39 views

Prevent or detect reading of daemon in memory

Is it possible to prevent the memory being used by a daemon to be read by anything else? If not, is it possible to detect an attempt to read? If so, is it possible to get in front of the actual read ...
2
votes
2answers
1k views

/etc/init.d/script, or /etc/inittab - respawn on die

I have a daemon/service (milter-regex), that is dying. I'm only using it temporarily (A few months), so don't care too much, but I want it to restart when it dies. It is an init.d script. 'service ...
2
votes
1answer
855 views

daemon function in /init.d does not run the program in the background in fedora13

I use Fedora 13 and am trying to create a service for darkice. I put the script in the /etc/init.d directory and if I use the command service darkice start, the darkice is running in the foreground ...
2
votes
2answers
1k views

gnome-keyring-daemon couldn't allocate secure memory

I run logcheck on my Debian Linux system to get alerted to unusual lines in my log files, and recently I saw the following in /var/log/messages: gnome-keyring-daemon: couldn't allocate secure memory ...