SlideShare une entreprise Scribd logo
1  sur  28
DAEMONS
Disk And Execution MONitor
• In multitasking computer operating systems,
a daemon is a computer program that runs as
a background process, rather than being
under the direct control of an interactive user.
• Traditionally daemon names end with the
letter d: for example, syslogd is the daemon
that implements the system logging facility
and sshd is a daemon that services
incoming SSH connections.
• In Windows, daemons are called services.
• Systems often start daemons at boot time and
serve the function of responding to network
requests, hardware activity, or other programs by
performing some task. Daemons can also
configure hardware , run scheduled tasks and
perform a variety of other tasks.
• A daemon in the Linux environment is any
process that typically runs for a long time, and in
the background. This means that a daemon can
often run from the time a computer is booted, till
it is switched off, and that it will often have no
controlling terminal during its lifetime.
Different Daemons used in Linux OS are
Init
Cron
Crontab
Xinetd
Inetd
Sshd
Httpd
Atd
Services file.named
init
• init (short for initialization) is the first process started
during booting of the computer system.
• Init is a daemon process that continues running until the
system is shut down.
• It is the direct or indirect ancestor of all other processes
and automatically adopts all orphaned processes.
• Init is started by the kernel using a hard-coded filename,
and if the kernel is unable to start it, a kernel panic will
result. A kernel panic is an action taken by an operating
system upon detecting an internal fatal error from which it
cannot safely recover
• Init is typically assigned process identifier 1.
• The /etc/inittab configuration tells init what to do
• Upstart is an event-based replacement for
the /sbin/init daemon which handles starting
of tasks and services during boot, stopping
them during shutdown and supervising them
while the system is running.
• It was originally developed for
the Ubuntu distribution, but is intended to be
suitable for deployment in all Linux
distributions
Feature Highlights
• Tasks and Services are started and stopped by
events
• Events are generated as tasks and services are
started and stopped
• Events may be received from any other process
on the system
• Services may be respawned if they die
unexpectedly
• Supervision and respawning of daemons which
separate from their parent process
• User services, which users can start and stop
themselves
Enabling daemons
– To (re)enable a daemon (using the default settings)
run the following command,
where <daemon> corresponds to the name of the init
script as listed in /etc/init.d/:
– # insserv <daemon>
Disabling daemons
– To disable a daemon at its default runlevels.(A run
level is a software configuration of the system which
allows only a selected group of processes to exist),
execute the following command,
where <daemon> corresponds to the name of the init
script as listed in /etc/init.d/:
– # insserv -r <daemon>
cron
• The software utility cron is a time-based job
scheduler in Unix-like computer operating
systems. People who set up and maintain
software environments use cron to schedule jobs
(commands or shell scripts) to run periodically at
fixed times, dates, or intervals.
• It is used to execute command in present time.
• Cron is driven by a crontab (cron table) file, a
configuration file that specifies shell commands
to run periodically on a given schedule.
• The crontab files are stored where the lists of jobs
and other instructions to the cron daemon are
kept.
• Users can have their own individual crontab
files and often there is a system wide crontab
file (usually in /etc or a subdirectory of /etc)
that only system administrators can edit.
• The crontab utility instructs cron to execute
the commands on a specific date and at a
specific time.
• It supplies the Crontab file to the cron
daemon
• Crontab syntax
– crontab [-u user ] file
example
– crontab cronfile
• This command invoke the crontab utility with cronfile
as parameter and send the cronfile to cron daemon
• Replicate the same to /var/spool/cron
Crontab file
• Crontab file has one line for each task that you
want to automate.
• You can assign any name to crontabfile.
• Format
minute hour day-of-month month-of-year
day-of-week command
Six columns in each line .
column Meaning Valid value
1 Minute of the hour 0-59
2 Hour of the day 0-24
3 Day of the month 1-31
4 Month of the year 1-12
5 Day of the week Sunday=0,Monday=1..Satu
rday=6
6 Command/shell script name Any utility to execute at
that time
• * * * * * echo “This is an example”
• 0 18 * * * bash /home/user1/take_backup
• 10,30,50 9-18 * * 1-6 cp/home/user1/*
/home/user1/backup
• The –e option with crontab allows you to directly modify
the file that resides with the cron daemon.
• The –r option will delete the scheduled task.
• The system administrator can deny or grant access to
certain users. This can be done by specifying names in
the /etc/cron. allow and /etc/cron. deny file.
• Both files contain the login name of the user to whom
the access is denied or granted.
• at Utility
– used to execute the task at one time
– After a job is scheduled with the file system
shutting down and restarting the system will not
affect the scheduled task
– Syntax
• At <options> [time]
at.allow
at.deny
at – Accepts command/shell script to be executed by
using Bash
atq – displays the list of pending jobs
atrm – Removes a job from list of pending jobs
-options
• V Prints the version number on the monitor
• q queue Specifies a single letter queue
designation
• m mail message to the user when the job is
completed
• -f file specifies the file name to be executed
at the scheduled time
• -l list of jobs pending for current user
• -v displays the time when the job will be
executed
Atd
• Runs jobs queued for later execution.
Syntax
• A
• Atd [-l load_avg] [-b batch_interval] [-d] [-s]
• -l for limiting load factor
• -b Specify the minimum interval in seconds b/w
the start of two batch process
• -d debug :print error message to standard error
• -s for compatibility with old versions of at
command
inetd
• Provides Internet service management for a
network.
• inetd listens on designated ports used by Internet
services
• When a TCP packet or UDP packet arrives with a
particular destination port number, inetd
launches the appropriate server program to
handle the connection
• Running inetd for servers that are not heavily
used can reduce the overall system load, when
compared to running each daemon individually in
stand-alone mode.
• inetd [-d] [-R rate] [configuration_file]
• -d Turns on debugging.
• -R rate Specify the maximum number of times
a service can be invoked in one minute; the
default is 256.
• inetd reads its configuration information from
a configuration file /etc/inetd.conf
• ubservers of the inetd Daemon
• The inetd daemon (a subsystem) controls the following
daemons (subservers):
• comsat daemon
• Ftpd daemon
• Fingerd daemon
• rlogind daemon
• rexecd daemon
• rshd daemon
• talkd daemon
• telnetd daemon
• tftpd daemon
• uucpd daemon.
xinetd
• xinetd, the eXtended InterNET Daemon, is an open-source
daemon which runs on many Linux and Unix systems and
manages Internet-based connectivity.
• It offers a more secure extension to or version of inetd, the
Internet daemon.
• xinetd performs the same function as inetd: it starts
programs that provide Internet services.
• Instead of having such servers started at system
initialization time, and be dormant until a connection
request arrives, xinetd is the only daemon process started
and it listens on all service ports for the services listed in its
configuration file.
• When a request comes in, xinetd starts the appropriate
server. Because of the way it operates, xinetd (as well as
inetd) is also referred to as a super-server.
• Following are important configuration files for
xinetd:
• /etc/xinetd.conf - The global xinetd
configuration file.
• /etc/xinetd.d/ directory - The directory
containing all service-specific files such as ftp
Syntax
• xinetd [options]
• -d Enables debug mode. This produces a lot of debugging
output, and it makes it possible to use a debugger on
xinetd.
• -syslog syslog_facility This option enables syslog
logging of xinetd-produced messages using the specified
syslog facility.
• -filelog logfile xinetd-produced messages will be
placed in the specified file. Messages are always appended
to the file. If the file does not exist, it will be created.
• -f config_file Determines the file that xinetd uses for
configuration. The default is /etc/xinetd.conf.
• -pidfile pid_file The process ID is written to the file.
• -dontfork Tells xinetd to stay in the foreground
• -stayalive Tells xinetd to stay running even if no services
are specified.
• -version This option causes xinetd to print out its
version information.
sshd
• shd (OpenSSH Daemon) is the daemon program
for ssh. Together these programs replace rlogin
and rsh, and provide secure encrypted
communications between two untrusted hosts over an
insecure network.
• sshd listens for connections from clients. It is normally
started at boot from /etc/rc.
• It forks a new daemon for each incoming connection.
The forked daemons handle key exchange, encryption,
authentication, command execution, and data
exchange.
• sshd can be configured using command-line options or
a configuration file (by defaultsshd_config); command-
line options override values specified in the
configuration file
• sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g
login_grace_time] [-h host_key_file] [-k
key_gen_time] [-o option] [-p port] [-u len]
• -4' Forces sshd to use IPv4 addresses only.
• -6' Forces sshd to use IPv6 addresses only.
• -b bits Specifies the number of bits
• -D' When this option is specified, sshd will not
detach and does not become a daemon. This
allows easy monitoring of sshd.
• -e' When this option is specified, sshd will send the
output to the standard error instead of the system log.
• -f config_file Specifies the name of the configuration
file. The default is /etc/ssh/sshd_config. sshd refuses to
start if there is no configuration file.
• -k key_gen_time
Specifies how often the ephemeral protocol version 1
server key is regenerated (default 3600 seconds, or one
hour). The motivation for regenerating the key fairly
often is that the key is not stored anywhere, and after
about an hour it becomes impossible to recover the
key for decrypting intercepted communications even if
the machine is cracked into or physically seized. A value
of zero indicates that the key will never be
regenerated.
• -g login_grace_time
Gives the grace time for clients to
authenticate themselves (default 120
seconds). If the client fails to authenticate the
user within this many seconds, the server
disconnects and exits. A value of zero
indicates no limit.
• -h host_key_file
Specifies a file from which a host key is read.
This option must be given if sshd is not run as
root (as the normal host key files are normally
not readable by anyone but root).
• -p port
Specifies the port on which the server listens
for connections (default 22). Multiple port
options are permitted.

Contenu connexe

Tendances

Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in LinuxAnu Chaudhry
 
The Linux Kernel Implementation of Pipes and FIFOs
The Linux Kernel Implementation of Pipes and FIFOsThe Linux Kernel Implementation of Pipes and FIFOs
The Linux Kernel Implementation of Pipes and FIFOsDivye Kapoor
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocolsZongYing Lyu
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process CommunicationAdeel Rasheed
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command LineAnuchit Chalothorn
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System CallsVandana Salve
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systemsalok pal
 
Linux Administration
Linux AdministrationLinux Administration
Linux AdministrationHarish1983
 
Linux process management
Linux process managementLinux process management
Linux process managementRaghu nath
 
Distributed system Tanenbaum chapter 1,2,3,4 notes
Distributed system Tanenbaum chapter 1,2,3,4 notes Distributed system Tanenbaum chapter 1,2,3,4 notes
Distributed system Tanenbaum chapter 1,2,3,4 notes SAhammedShakil
 

Tendances (20)

Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
The Linux Kernel Implementation of Pipes and FIFOs
The Linux Kernel Implementation of Pipes and FIFOsThe Linux Kernel Implementation of Pipes and FIFOs
The Linux Kernel Implementation of Pipes and FIFOs
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Chapter 1: Introduction to Unix / Linux Kernel
Chapter 1: Introduction to Unix / Linux KernelChapter 1: Introduction to Unix / Linux Kernel
Chapter 1: Introduction to Unix / Linux Kernel
 
Hypervisors
HypervisorsHypervisors
Hypervisors
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Quick Guide with Linux Command Line
Quick Guide with Linux Command LineQuick Guide with Linux Command Line
Quick Guide with Linux Command Line
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
 
Compiler design
Compiler designCompiler design
Compiler design
 
Pram model
Pram modelPram model
Pram model
 
System calls
System callsSystem calls
System calls
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
Linux
LinuxLinux
Linux
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Linux process management
Linux process managementLinux process management
Linux process management
 
Distributed system Tanenbaum chapter 1,2,3,4 notes
Distributed system Tanenbaum chapter 1,2,3,4 notes Distributed system Tanenbaum chapter 1,2,3,4 notes
Distributed system Tanenbaum chapter 1,2,3,4 notes
 

Similaire à Daemons

Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Ahmed El-Arabawy
 
Linux week 2
Linux week 2Linux week 2
Linux week 2Vinoth Sn
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideErica StJohn
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-serviceRohit Sansiya
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Seungha Son
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file systemSyaiful Ahdan
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxRajesh Kumar
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon processAbubakr Cheema
 
Linux Daemons & INIT services
Linux Daemons & INIT servicesLinux Daemons & INIT services
Linux Daemons & INIT servicesomkar bhagat
 
INVESTIGATING UNIX SYSTEMS.pptx
INVESTIGATING UNIX SYSTEMS.pptxINVESTIGATING UNIX SYSTEMS.pptx
INVESTIGATING UNIX SYSTEMS.pptxAmAngel1
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdfroschahacker
 

Similaire à Daemons (20)

Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
4. Centos Administration
4. Centos Administration4. Centos Administration
4. Centos Administration
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Syslog.ppt
Syslog.pptSyslog.ppt
Syslog.ppt
 
Linux
LinuxLinux
Linux
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
Linux
Linux Linux
Linux
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
 
Linux Daemons & INIT services
Linux Daemons & INIT servicesLinux Daemons & INIT services
Linux Daemons & INIT services
 
INVESTIGATING UNIX SYSTEMS.pptx
INVESTIGATING UNIX SYSTEMS.pptxINVESTIGATING UNIX SYSTEMS.pptx
INVESTIGATING UNIX SYSTEMS.pptx
 
Linux
LinuxLinux
Linux
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 

Dernier

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 

Dernier (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 

Daemons

  • 2. • In multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user. • Traditionally daemon names end with the letter d: for example, syslogd is the daemon that implements the system logging facility and sshd is a daemon that services incoming SSH connections. • In Windows, daemons are called services.
  • 3. • Systems often start daemons at boot time and serve the function of responding to network requests, hardware activity, or other programs by performing some task. Daemons can also configure hardware , run scheduled tasks and perform a variety of other tasks. • A daemon in the Linux environment is any process that typically runs for a long time, and in the background. This means that a daemon can often run from the time a computer is booted, till it is switched off, and that it will often have no controlling terminal during its lifetime.
  • 4. Different Daemons used in Linux OS are Init Cron Crontab Xinetd Inetd Sshd Httpd Atd Services file.named
  • 5. init • init (short for initialization) is the first process started during booting of the computer system. • Init is a daemon process that continues running until the system is shut down. • It is the direct or indirect ancestor of all other processes and automatically adopts all orphaned processes. • Init is started by the kernel using a hard-coded filename, and if the kernel is unable to start it, a kernel panic will result. A kernel panic is an action taken by an operating system upon detecting an internal fatal error from which it cannot safely recover • Init is typically assigned process identifier 1. • The /etc/inittab configuration tells init what to do
  • 6. • Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running. • It was originally developed for the Ubuntu distribution, but is intended to be suitable for deployment in all Linux distributions
  • 7. Feature Highlights • Tasks and Services are started and stopped by events • Events are generated as tasks and services are started and stopped • Events may be received from any other process on the system • Services may be respawned if they die unexpectedly • Supervision and respawning of daemons which separate from their parent process • User services, which users can start and stop themselves
  • 8. Enabling daemons – To (re)enable a daemon (using the default settings) run the following command, where <daemon> corresponds to the name of the init script as listed in /etc/init.d/: – # insserv <daemon> Disabling daemons – To disable a daemon at its default runlevels.(A run level is a software configuration of the system which allows only a selected group of processes to exist), execute the following command, where <daemon> corresponds to the name of the init script as listed in /etc/init.d/: – # insserv -r <daemon>
  • 9. cron • The software utility cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. • It is used to execute command in present time. • Cron is driven by a crontab (cron table) file, a configuration file that specifies shell commands to run periodically on a given schedule. • The crontab files are stored where the lists of jobs and other instructions to the cron daemon are kept.
  • 10. • Users can have their own individual crontab files and often there is a system wide crontab file (usually in /etc or a subdirectory of /etc) that only system administrators can edit. • The crontab utility instructs cron to execute the commands on a specific date and at a specific time. • It supplies the Crontab file to the cron daemon
  • 11. • Crontab syntax – crontab [-u user ] file example – crontab cronfile • This command invoke the crontab utility with cronfile as parameter and send the cronfile to cron daemon • Replicate the same to /var/spool/cron
  • 12. Crontab file • Crontab file has one line for each task that you want to automate. • You can assign any name to crontabfile. • Format minute hour day-of-month month-of-year day-of-week command Six columns in each line .
  • 13. column Meaning Valid value 1 Minute of the hour 0-59 2 Hour of the day 0-24 3 Day of the month 1-31 4 Month of the year 1-12 5 Day of the week Sunday=0,Monday=1..Satu rday=6 6 Command/shell script name Any utility to execute at that time
  • 14. • * * * * * echo “This is an example” • 0 18 * * * bash /home/user1/take_backup • 10,30,50 9-18 * * 1-6 cp/home/user1/* /home/user1/backup • The –e option with crontab allows you to directly modify the file that resides with the cron daemon. • The –r option will delete the scheduled task. • The system administrator can deny or grant access to certain users. This can be done by specifying names in the /etc/cron. allow and /etc/cron. deny file. • Both files contain the login name of the user to whom the access is denied or granted.
  • 15. • at Utility – used to execute the task at one time – After a job is scheduled with the file system shutting down and restarting the system will not affect the scheduled task – Syntax • At <options> [time] at.allow at.deny at – Accepts command/shell script to be executed by using Bash atq – displays the list of pending jobs atrm – Removes a job from list of pending jobs
  • 16. -options • V Prints the version number on the monitor • q queue Specifies a single letter queue designation • m mail message to the user when the job is completed • -f file specifies the file name to be executed at the scheduled time • -l list of jobs pending for current user • -v displays the time when the job will be executed
  • 17. Atd • Runs jobs queued for later execution. Syntax • A • Atd [-l load_avg] [-b batch_interval] [-d] [-s] • -l for limiting load factor • -b Specify the minimum interval in seconds b/w the start of two batch process • -d debug :print error message to standard error • -s for compatibility with old versions of at command
  • 18. inetd • Provides Internet service management for a network. • inetd listens on designated ports used by Internet services • When a TCP packet or UDP packet arrives with a particular destination port number, inetd launches the appropriate server program to handle the connection • Running inetd for servers that are not heavily used can reduce the overall system load, when compared to running each daemon individually in stand-alone mode.
  • 19. • inetd [-d] [-R rate] [configuration_file] • -d Turns on debugging. • -R rate Specify the maximum number of times a service can be invoked in one minute; the default is 256. • inetd reads its configuration information from a configuration file /etc/inetd.conf
  • 20. • ubservers of the inetd Daemon • The inetd daemon (a subsystem) controls the following daemons (subservers): • comsat daemon • Ftpd daemon • Fingerd daemon • rlogind daemon • rexecd daemon • rshd daemon • talkd daemon • telnetd daemon • tftpd daemon • uucpd daemon.
  • 21. xinetd • xinetd, the eXtended InterNET Daemon, is an open-source daemon which runs on many Linux and Unix systems and manages Internet-based connectivity. • It offers a more secure extension to or version of inetd, the Internet daemon. • xinetd performs the same function as inetd: it starts programs that provide Internet services. • Instead of having such servers started at system initialization time, and be dormant until a connection request arrives, xinetd is the only daemon process started and it listens on all service ports for the services listed in its configuration file. • When a request comes in, xinetd starts the appropriate server. Because of the way it operates, xinetd (as well as inetd) is also referred to as a super-server.
  • 22. • Following are important configuration files for xinetd: • /etc/xinetd.conf - The global xinetd configuration file. • /etc/xinetd.d/ directory - The directory containing all service-specific files such as ftp Syntax • xinetd [options]
  • 23. • -d Enables debug mode. This produces a lot of debugging output, and it makes it possible to use a debugger on xinetd. • -syslog syslog_facility This option enables syslog logging of xinetd-produced messages using the specified syslog facility. • -filelog logfile xinetd-produced messages will be placed in the specified file. Messages are always appended to the file. If the file does not exist, it will be created. • -f config_file Determines the file that xinetd uses for configuration. The default is /etc/xinetd.conf. • -pidfile pid_file The process ID is written to the file. • -dontfork Tells xinetd to stay in the foreground • -stayalive Tells xinetd to stay running even if no services are specified. • -version This option causes xinetd to print out its version information.
  • 24. sshd • shd (OpenSSH Daemon) is the daemon program for ssh. Together these programs replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. • sshd listens for connections from clients. It is normally started at boot from /etc/rc. • It forks a new daemon for each incoming connection. The forked daemons handle key exchange, encryption, authentication, command execution, and data exchange. • sshd can be configured using command-line options or a configuration file (by defaultsshd_config); command- line options override values specified in the configuration file
  • 25. • sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] • -4' Forces sshd to use IPv4 addresses only. • -6' Forces sshd to use IPv6 addresses only. • -b bits Specifies the number of bits • -D' When this option is specified, sshd will not detach and does not become a daemon. This allows easy monitoring of sshd.
  • 26. • -e' When this option is specified, sshd will send the output to the standard error instead of the system log. • -f config_file Specifies the name of the configuration file. The default is /etc/ssh/sshd_config. sshd refuses to start if there is no configuration file. • -k key_gen_time Specifies how often the ephemeral protocol version 1 server key is regenerated (default 3600 seconds, or one hour). The motivation for regenerating the key fairly often is that the key is not stored anywhere, and after about an hour it becomes impossible to recover the key for decrypting intercepted communications even if the machine is cracked into or physically seized. A value of zero indicates that the key will never be regenerated.
  • 27. • -g login_grace_time Gives the grace time for clients to authenticate themselves (default 120 seconds). If the client fails to authenticate the user within this many seconds, the server disconnects and exits. A value of zero indicates no limit. • -h host_key_file Specifies a file from which a host key is read. This option must be given if sshd is not run as root (as the normal host key files are normally not readable by anyone but root).
  • 28. • -p port Specifies the port on which the server listens for connections (default 22). Multiple port options are permitted.