Difference between revisions of "Daemons"

From UFRC
Jump to navigation Jump to search
 
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
According to Wikipedia, as daemon is "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).
+
[[Category:Linux]]
  
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.
+
{{Note |'''The daemon server will be decommissioned on Oct. 1, 2024. Please see the [[SCRON]] page for using that.'''|warn}}
 +
==Overview==
 +
The daemon server provides UF Research Computing users with the space and resources to run long-running processes that ''do not require a lot of computational power''. Please remember that these types of processes cannot be run on the login servers.
  
==Access to daemon server==
+
Daemon processes run in the background of a system rather than under the direct control of an interactive user. There are many uses for daemon tasks, from polling the batch system to collecting data from external sources. Daemon tasks are usually long-running or scheduled to run recurrently. They are also characterized by a small computational footprint (i.e., low average CPU and RAM usage). '''Daemon processes should not use 100% of a CPU for extended periods and such processes will be killed without warning.'''
  
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:
+
==Access to the daemon server==
ssh daemon1
+
Connect to the cluster (hpg.rc.ufl.edu) and use the ssh command to access the daemon server.
 +
<pre>ssh daemon</pre>
 +
 
 +
The daemon node is not accessible directly from outside of the cluster.
  
 
==Running daemon processes==
 
==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.
+
There are two ways to run a process in the background:
  
To run a process in the background, either add a & to the end of the command, e.g.
+
1. Add an ampersand (&) to the end of the command
my.process.sh &
+
<pre>my.process.sh &</pre>
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==
+
2. Start the process and once it is running, type
 +
<pre>control-Z + b + g</pre>
  
To schedule a task to run regularly with cron, edit your crontab on the daemon1 node using:
+
===Network firewall ACLs===
  
crontab -e
+
If you need to provide the IP of the <pre>daemon</pre> server to allow network access to a machine outside of HiPerGator, please [https://support.rc.ufl.edu/ open a support request].
  
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.
+
==Setting up recurring tasks with Cron==
 +
You can schedule a task to run recurrently with Cron, a time-based job scheduler by editing your crontab file on the daemon server. [[Cron | Click here for more detailed instructions.]]

Latest revision as of 15:27, 4 September 2024


The daemon server will be decommissioned on Oct. 1, 2024. Please see the SCRON page for using that.

Overview

The daemon server provides UF Research Computing users with the space and resources to run long-running processes that do not require a lot of computational power. Please remember that these types of processes cannot be run on the login servers.

Daemon processes run in the background of a system rather than under the direct control of an interactive user. There are many uses for daemon tasks, from polling the batch system to collecting data from external sources. Daemon tasks are usually long-running or scheduled to run recurrently. They are also characterized by a small computational footprint (i.e., low average CPU and RAM usage). Daemon processes should not use 100% of a CPU for extended periods and such processes will be killed without warning.

Access to the daemon server

Connect to the cluster (hpg.rc.ufl.edu) and use the ssh command to access the daemon server.

ssh daemon

The daemon node is not accessible directly from outside of the cluster.

Running daemon processes

There are two ways to run a process in the background:

1. Add an ampersand (&) to the end of the command

my.process.sh &

2. Start the process and once it is running, type

control-Z + b + g

Network firewall ACLs

If you need to provide the IP of the

daemon

server to allow network access to a machine outside of HiPerGator, please open a support request.

Setting up recurring tasks with Cron

You can schedule a task to run recurrently with Cron, a time-based job scheduler by editing your crontab file on the daemon server. Click here for more detailed instructions.