On linux an unix-like systems is demon the designation of processes running in the background and providing certain services. Direct user intaractions with demons are not intended.
Questions tagged [daemon]
286 questions
2
votes
1 answer
Cannot kill redis server. It restarts every time I kill it
I cannot kill redis-server no matter how many times I've tried.
ps -ef | grep redis-server gives
root 10592 1 0 01:10 ? 00:00:00 /snap/redis/658/usr/bin/redis-server *:6379
root 10846 8813 0 01:12 pts/1 00:00:00 grep…

Shaundavin13
- 31
- 4
2
votes
1 answer
Creating Daemons in Linux... how should the file permissions be?
I am setting up a few PHP Gearman Daemons running on PEAR System_Daemon. I need them to be able to write to the following locations...
/var/run/{APPNAME}.pid
/etc/init.d/{APPNAME}
/gearman/log/{APPNAME}.log
What permissions should I set for them? I…

Urda
- 518
- 4
- 16
2
votes
2 answers
daemon running for several hours, and dies
After restart server, this is running:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19653 lighttpd 16 0 67584 39m 16m R 21.3 15.3 0:17.60 php-cgi
8006 mysql 15 0 137m 22m 4800 S 5.3 8.8 1:07.91…
baskaran
1
vote
0 answers
Sending different signals for system shutdown and manual stops in supervisord
I have a set of auto-scaled EC2 instances that run a daemon managed by supervisord on each instance.
I want to differentiate the clean-up behavior for the following cases:
when shutting down instances (e.g., scaling-in)
i.e., shutting down…

Achimnol
- 109
- 1
- 5
1
vote
2 answers
How do I force output to a file when there is no TTY allocated?
I have an init script that does something like this in the start() function:
runuser -s /bin/bash - prog -c "nohup php /foo/bar.php 2>&1 >> /var/log/bar.log &"
When I SSH into the machine and call the init script:
server:~$ sudo /etc/init.d/foo…

Drew Stephens
- 662
- 7
- 12
1
vote
1 answer
How to hide a password from ps, if it's given to a process via script or command line
So I have a certain program, which is running almost 24/7.
I have a start script I've written in bash which simply does:
./app --user XXX --pass YYY
There are a few more options, but they are irrelevant to this question.
Once run, the pass will…

Sam
- 11
- 2
1
vote
0 answers
How to run linux daemon in container linked to another container with docker-compose?
Disclaimer: I'm posting this here because people started to vote to close this question on SO as "off-topic". Although some people believe Docker questions should be posted on SO as opposed to SF, others believe the opposite.
I have the following…

rfgamaral
- 960
- 2
- 11
- 18
1
vote
0 answers
Run nscd in multiple network namespaces
How to run an instance of nscd daemon per network namespace? I did the following:
ip netns exec /usr/sbin/nscd
However, it threw output
/usr/sbin/nscd: already running
The intention for an instance of nscd per namepace is…

LinuxPenseur
- 443
- 1
- 6
- 16
1
vote
1 answer
How to turn a script into a daemon? So that upon a random script failure it is restarted by the kernel?
I have a script which streams important logs from another system.
Unfortunately the machines are separated by a large distance which means that the connection between them can be poor.
How to deal with a script which streams data, but has a tendency…

Greg
- 1,657
- 5
- 27
- 38
1
vote
1 answer
How do I run multiple on-going python scripts that might be changed in the future?
In a prod environment, I want to run some python scripts that run on start-up and never stop. Currently I am trying to run them as daemon processes, i.e. something like this in systemd:
#!/bin/bash
python3 a.py&
python3 b.py&
python3 c.py&
...
Is…

user400585
- 11
- 1
1
vote
0 answers
Debian 8/init.d: start daemon after "$named" is ready
I am trying to start a init.d daemon on Debian 8 after network and DNS is up and running. That's the script I am using:
### BEGIN INIT INFO
# Provides: local_daemon
# Required-Start: $all $local_fs $remote_fs $network $named $time…

noblemaster
- 111
- 2
1
vote
2 answers
Parent bash script not receiving 'trap' despite process still running
What I'm actually trying to achieve:
I'm trying to get a custom daemon working on a system that uses SysVinit. I have the bootstrapper /etc/init.d/xyz script already, which calls my daemon, but it doesn't automatically place it in the background.…

Lawrence Wagerfield
- 47
- 9
1
vote
1 answer
how to get rid of awstat www-data daemon?
I have successfully installed awstats on my webserver. I have created a cron job that runs as root every third hour. And it works perfectly, but i keep receiving "mails" every 10 minutes saying that www-data tried to update and did not have the…

jakobS
- 13
- 4
1
vote
1 answer
How can I create a log for an existing daemon?
I have a deamon running (that I did not create) and I need to be able to read its logs. Unfortunately, it does not have a log file. Is there a way to pipe the daemon's output into a file, and have it continuously update so I can run tail -f on it?

jackwise
- 259
- 1
- 3
- 9
1
vote
1 answer
How to do remote calls from server A to B to create virtual machines
This is my first question on serverfault so I hope I'm doing this right as I'm usually on Stackoverflow :-)
I have two Ubuntu 14.04 LTS servers, server A and B.
Server A runs the web server where my customer portal runs and where customers can…

Beeelze
- 161
- 6