Difference between revisions of "Daemons"
Line 1: | Line 1: | ||
− | According to Wikipedia, | + | According to Wikipedia, a daemon "is a computer program that runs as a background process, rather than being under the direct control of an interactive user."[http://en.wikipedia.org/wiki/Daemon_%28computing%29] There a many uses for daemon tasks from polling the batch system to collecting data from external sources. The features that unify these tasks is that they are long running (or regularly scheduled with cron) and that they have a small computational footprint (i.e. low average CPU and RAM usage). |
It is against UF Research Computing [http://www.rc.ufl.edu/about/policies/jobs-and-processes/ policies] to run any interactive or long running process on the login nodes (gator.rc.ufl.edu servers) or the development servers (dev1 or dev2). To fill the need that users have to run these tasks, we have deployed a server dedicated to daemon tasks. | It is against UF Research Computing [http://www.rc.ufl.edu/about/policies/jobs-and-processes/ policies] to run any interactive or long running process on the login nodes (gator.rc.ufl.edu servers) or the development servers (dev1 or dev2). To fill the need that users have to run these tasks, we have deployed a server dedicated to daemon tasks. |
Revision as of 22:02, 14 April 2014
According to Wikipedia, a daemon "is a computer program that runs as a background process, rather than being under the direct control of an interactive user."[1] There a many uses for daemon tasks from polling the batch system to collecting data from external sources. The features that unify these tasks is that they are long running (or regularly scheduled with cron) and that they have a small computational footprint (i.e. low average CPU and RAM usage).
It is against UF Research Computing policies to run any interactive or long running process on the login nodes (gator.rc.ufl.edu servers) or the development servers (dev1 or dev2). To fill the need that users have to run these tasks, we have deployed a server dedicated to daemon tasks.
Access to daemon server
Access to the daemon server is via ssh from one of the login servers for the cluster. For example, after connecting to gator.rc.ufl.edu, you can type:
ssh daemon1
Running daemon processes
Once connected to daemon1, you can start your daemon process and have it run in the background. Please note that as specified above, daemon processes use few resources--daemon processes that use 100% of a CPU for extended periods negatively impact the performance of this server for other users and will be killed without warning.
To run a process in the background, either add a & to the end of the command, e.g.
my.process.sh &
or start the process and once it is running, type control-Z and then bg to run it in the background.
Setting up cron tasks
To schedule a task to run regularly with cron, edit your crontab on the daemon1 node using:
crontab -e
There are several online resources for how to format a crontab file, but note that the configuration is specific to the server you are loged in on, so it is important to configure cron while logged into daemon1.