The tag has no wiki summary.

learn more… | top users | synonyms

16
votes
2answers
15k views

public key authentication fails ONLY when sshd is daemon

(This question had been erroneously asked in stack overflow -- I'm sorry for that -- and closed as "off topic") I have no clue on how this happens. The distro is Scientific Linux 6.1 and everything ...
10
votes
6answers
19k views

Debian: Too many open files

I have long running process at Debian. At some point in throw an error "Too many open files". ulimit -a shows open files (-n) 1024 I wish to increase number of open ...
9
votes
3answers
8k views

Is there a “standard” way to make daemon in Debian?

I need to create a daemon from the application in Debian. Is there any standard tool for this in Debian like "upstart" in Ubuntu? I need only start-stop commands, to start a program as a daemon with ...
8
votes
7answers
18k views

Disable a service from starting at all runlevels?

I have a service foo which currently starts at runlevel 3 and above. How can I stop it from doing so, without using update-rc.d foo stop 3 ., which (if I understand it correctly) would turn off the ...
8
votes
4answers
26k views

console-kit-daemon - can it be stopped?

I have 60 instances of Console Kit daemon on Ubuntu 9.04 server installation. Is it safe to kill those or stop these processes. They seem to be taking about 20% of RAM each(see on htop).
7
votes
3answers
8k views

How to stop nginx on Mac OS X

I've installed and configured nginx server on my Mac from MacPorts sudo port install nginx Followed the recommendation from the port installation console and created the launchd startup item for ...
7
votes
1answer
9k views

Init script does not create a PID file

I need to create an init script for an IRC logger. I copied /etc/init.d/skeleton. I filled in the configuration section to fit my needs and I also had to add --background to the start daemon command ...
7
votes
2answers
6k views

What's the purpose of kslowd?

I'm running Ubuntu 10.10: uname -a Linux mt-xps 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64 GNU/Linux When I run top, I occasionally see a "kslowd000" or similar process ...
6
votes
2answers
1k views

Call to daemon in a /etc/init.d script is blocking, not running in background

I have a Perl script that I want to daemonize. Basically this perl script will read a directory every 30 seconds, read the files that it finds and then process the data. To keep it simple here ...
5
votes
5answers
530 views

How to daemonize a shell task?

How can I run a console command (like cp or tar, for example) without needing to keep an open SSH?
5
votes
4answers
7k views

How do I automatically restart a process on server reboot/process exit?

On my Ubuntu server I use God to monitor some Ruby processes/scripts, including a Queue system. God automatically checks when one of my processes exists and restarts it. It also keeps track of memory ...
5
votes
6answers
2k views

How to daemonize servers on Ubuntu?

I've got a couple of servers on my Ubuntu that need to be restart-proof daemonized. How can I do that with generic init first process? Should I swap to upstart or some other replacement?
5
votes
4answers
1k views

No coredumps for daemons started at boot by init.d on Ubuntu

How can I get daemons started by init.d at boot to coredump on Ubuntu? This is what I have done so far... echo "ulimit -c unlimited" >> /etc/profile mkdir /corefiles/ chmod 777 /corefiles/ echo ...
5
votes
3answers
6k views

Ways to set umask on Ubuntu for daemon processes

I have an http daemon server process (yaws) that I would like to have server write any new files with a umask of 002, so that another user in the same group can modify, move, or delete files created ...
5
votes
5answers
159 views

Starting a mysql server in my ${HOME}?

I'm not root on my server (linux) and this server doesn't currently run a mysql server as a daemon. Can I start a mysql daemon that would only work for my account and where the data/files would be ...
4
votes
3answers
3k views

is there a difference between a daemon and a service?

Is there a difference between a daemon or a service? or are they both basically an application that is resident in memory, and is bound to a specific port and listens/responds to requests?
4
votes
1answer
283 views

nohup vs screen vs ? for manually starting daemon processes

When I need to start a background process on a low-importance server, I tend to use nohup: nohup ./server.sh & Most colleagues seem to prefer screen: screen -D -R mydaemon ./mydaemon.sh ^A ^D ...
4
votes
1answer
323 views

Opera unite as a daemon

Is it possible to run an opera unite server without the browser? Say for instance I want to use my always-on FreeBSD server, which doesn't run X.
4
votes
1answer
98 views

Safely providing passwords to a linux daemon

I have a linux daemon that accesses some services (db etc). It needs some passwords for this. What would be the best way to give the passwords to the daemon in a secure manner? I currently store the ...
4
votes
1answer
4k views

Launching a PHP daemon from an LSB init script w/ start-stop-daemon

I'm writing an lsb init script (admittedly something I've never done from scratch) that launches a php script that daemonizes itself. The php script starts off like so: #!/usr/bin/env php <?php ...
4
votes
3answers
2k views

Scheduling tasks with Django

I have a Django website, and I want to have a certain piece of Python code run at regular intervals. What would be a good way to do that? I know I can cron, but I would prefer the solution to be ...
4
votes
1answer
1k views

Equivalent for the “pid file” stanza in newer versions of upstart

I'd like to be able to use upstart to manage daemons where I don't have complete control over the forking behaviour. The "pid" stanza is removed as of version 0.3.9, so I can't point it at a pid file. ...
3
votes
5answers
240 views

Is there a simple way to daemon-ify a simple task?

I ssh into a server than start a job (for instance rsync), then I just want to be able to log out from the server and let the job run its course. But if I just do rsync ... & I think it's still ...
3
votes
4answers
3k views

How do I find out the process id of the backgrounded process?

I've got a command (program) that I'd like to run with nohup and background it. Like nohup command > logfile.txt & How do I find out the process ID? I would like to be able to write the ...
3
votes
4answers
521 views

Recommendations for Monitoring services [closed]

I would like to install a monitoring services (Monit or others) on my web server and am looking for recommendation. I have no idea which is good, and what parameters which I should evaluate on, and ...
3
votes
5answers
387 views

Source code for Linux utilities and daemons

Where can I find the source code for Linux utilities and daemons. Basically I want to know the repository of source codes other than the Linux kernel.
3
votes
3answers
1k views

How can I drop privileges and still clean up my pid file in /var/run?

I have a daemon called foo. My init script /etc/init.d/foo starts the foo daemon and stores its pidfile in /var/run/foo.pid, which seems to be the standard place. Because /etc/init.d/foo must be run ...
3
votes
2answers
1k views

Run as different user

On a RedHat system, i'm trying to launch a program with a different user who dont have any shell. In /etc/passwd, shell is /sbin/nologin. I have tried: su myuser -c /home/myuser/script.sh Result: ...
3
votes
1answer
512 views

Script in /etc/init.d won't run on startup (Ubuntu 8.10)

I'm on Ubuntu 8.10 The script runs when called from the command line with sudo /etc/init.d/xbindkeys start. Here's how it looks: #! /bin/sh ...
3
votes
2answers
206 views

Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?

Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to ...
3
votes
2answers
3k views

start sinatra app in background with stdout and stderr redirected(append) to a file

I have a sinatra app which I run on my local machine using ruby app.rb. While deploying it on a remote machine via ssh, How do i run it in background and redirect stdout and stderr to a log file. On ...
3
votes
2answers
3k views

init script that logs output of the script

How can this be done? I know it's pretty simple and includes appending something like & or &> to the actual command that starts the init script. But, what is the best approach and how can ...
3
votes
2answers
252 views

How complex of a daemon should be run through inetd?

What is the general rule for which daemons should be started up through inetd? Currently, on my server, sshd, apache and sendmail are set up to run all the time, where simple *NIX services are set up ...
3
votes
1answer
110 views

daemon function isn't working in CentOS 6.4

I'm trying to daemonize a process under a different user. In my init.d, I have a service which looks a little bit like this: ... start() { echo "Starting mydaemon..." daemon --user someuser ...
3
votes
1answer
1k views

Daemon can't be started from fabric script or on boot - only interactively

I have a daemon script in /etc/init.d that performs some background packet logging using the tcpdump command. The script starts up fine using an interactive shell using sudo /etc/init.d/packetlog ...
3
votes
3answers
113 views

Linux directory conventions for custom service

I'm writing a custom application that will be run as a service/daemon. According to convention, the binaries for it should be in /opt/appname. However, where do I put files such as: Config files ...
3
votes
2answers
307 views

Spawning multiple instances of a daemon in Ubuntu

I have a python script that listens and blocks while it waits for data on a redis list. It runs fine in upstart using the following: description "stage message consumer" author "Nilesh Ashra" start ...
3
votes
3answers
6k views

How can I run supervisord without using root?

I seem to be having trouble figuring out why supervisord won't run as a non-root user. If I start it with the user set to jason (pid 1000), I get the following in the log file: 2010-05-24 ...
2
votes
3answers
328 views

Linux: user defined daemons/services

I'm looking for a framework/library/environment so an ordinary user can set up it's own server processes. These processes should run under his uid as any other user process. However the definition of ...
2
votes
2answers
633 views

Ubuntu Daemon Best Practices?

I have a RingoJS webserver (runs atop Jetty) that is part a an Apache reverse proxy setup. I would like multiple Ringo processes to run autonomously in the background, startup automatically on ...
2
votes
7answers
2k views

Shell script to execute something when one of the daemon dies?

I just had to build two instances of daemon running on different ports. let's say they both serve critical missions for some applications. How can I do some automatic task (eg. shell script) ...
2
votes
3answers
1k views

How do I create an interactive daemon login?

I run a service on a debian/linux machine which runs at boot with a 'screen' session I can always attach to. I would like to create a username which I can run this service as. At the moment I use a ...
2
votes
3answers
499 views

What, if anything, is safe to symlink in /var?

We have plenty of space on a different mounted device. Since the /var partition stays relatively static in terms of size (around 8-10GB because of big logs that we need), I'd be fairly happy to simply ...
2
votes
2answers
2k views

How to set system environment variables for Linux services?

I need to setup environment variables for application servers. For example: ORACLE_HOME, ORACLE_SID, JAVA_OPTS, CATALINA_BASE. I know how to set system environment variables in Windows, but no ideas ...
2
votes
2answers
606 views

Execute specific bash script on Gentoo Linux startup

I own a VDS running Gentoo Linux and I am curious about how to execute specific bash script at startup of my VDS. I just want to startup apache2 at boot time and run two thin instances.
2
votes
2answers
4k views

Can start-stop-daemon use environmental variables?

I need to daemonize a Windows app running in Wine, and create a pid in /var/run. Since it requires an X11 session to run, I need to make sure the $DISPLAY variable is set in the running user's ...
2
votes
2answers
680 views

Init script & the green [ OK ]

I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified ...
2
votes
2answers
1k views

Linux - Run a daemon as 'nobody'

I have a daemon sitting in my root directory that currently is being run as root. However, since this program can read the file system, this is clearly a security problem. How can I run it as nobody ...
2
votes
6answers
7k views

Running JBoss-5.1.0.GA as a service / daemon on Red Hat?

I am using JBoss 5.1.0 GA on Red Hat (Amazon ECS)... Am trying to set it up so JBoss will run as a service / daemon (right now it only starts up when I manually SSH and invoke sh ...
2
votes
3answers
44 views

Daemons on a web server - best practices [duplicate]

This might be an obvious thing to seasoned Ops but, please, bear with me on this one (I'm a dev with the side effect of having to manage our servers too). At the moment, one of several servers (load ...