task_stoped or Task_dead state, or the system call enters the task_interruptible state.4. How the process is dispatched 4.1 CFS SchedulerAs the kernel version changes, the O (1) Scheduler is replaced by the CFS (fully fair Scheduler) after the Linux Kernel 2.6.23 release.CFS vruntime is used to measure the priority of the process. It calculates the following for
Tasks scheduled in Linux, scheduled to perform certain tasks or periodically perform certain tasksTask Schedule:Perform a task at a time in the future: at, BatchTo perform a task periodically: crontabAfter completing the task, Liunx will send a message to the current userEmail service: Smtp:simple Mail Transmission protocolPaths in Linux:/var/spool/mail/usernameView Mail commands: Yum install mailx installa
Label:Task Scheduler Linux Scheduled Tasks Linux Task Scheduler Crontab
Category: Linux
There are three types of Linux scheduled tasks:at: Specify a time to perform a task (one or more tasks, o
1966 /* Here we just switch the register state and the stack. */1967 switch_to(prev, next, prev);1968 1969 barrier();
The Linux kernel process scheduler is based on two functions: The periodic scheduler function and the main scheduler function.
Periodic Scheduler
Sunday 2:30 A.M., run the CP command to backup the/etc/fstab file, the storage location is/backup/fstab-yyyy-mm-dd-hh-mm-ss;2 * * 0/sbin/cp/etc fstab/backup/fstab-$ (date +%y-%m-%d-%h-%m-%s)3, every night 12 o'clock, get all the lines in the/proc/meminfo file starting with S or M, appended to the/statistics/meminfo.txt file, and the daily message before, to add a similar =============== separator line; * * * * */usr/bin/echo "=====" $ (/usr/bin/grep "[s| M] "/proc/meminfo) >>/statistics/meminfo
From: http://www.ibm.com/developerworks/cn/linux/l-scheduler/The source code for the 2.6 version scheduler is well encapsulated in the/USR/SRC/LINUX/KERNEL/SCHED.C file. We summarize some useful functions that can be found in this file in table 1.
table 1. Features of the
Linux Task SchedulerNote: The results of each execution of a Linux task plan, including errors, will be sent to the administrator in message format, so you must install the Mail service to view the results of the task execution1. E-Mail Service:Smtp:simple Mail Transmission protocol/var/spool/mail/usernamePop3:post Office ProtocolImap4:internet Mail Access ProtocolMail command:Mail: Enter the interactive em
/bin/run-parts, functions to execute all scripts/programs in a directory.Run-parts/etc/cron.hourly executes all scripts/programs under directory/etc/cron.hourly/.Run-parts below is the command to runThe first line means: 65 minutes a day after the boot to check whether the cron.daily file is executed, if not executed today to execute hisThe second line means: Every 7 days after the boot 70 minutes to check whether the cron.weekly file is executed, if not executed within a week to execute hisAnd
Cron is a timed execution tool under Linux that can run a job without human intervention. The daemon cron reads the crontab file and executes the task at a specified time, depending on the configuration.The Contab command is used to add, delete, and display cron task tables.(Ubuntu Environment) can start and stop the Cron service via service command:Service Cron Status # View Cron service stateService Cron
Linux task scheduling is actually to let the system at some time to execute certain commands or programs, so that it makes it easier for administrators to manage their own Linux, when I first learned this method, my heart filled with endless joy, I feel Linux is too powerful.I'm going to tell you the exact order.One: Task scheduling classification1. The system wo
Linux Task SchedulerTask Schedule:Perform a task at a time in the next point: At,batchRecurring tasks: crontabEmail serviceSmtp/var/spool/mail/usernamePop3Imap4Mail command:Mail: Enter the interactive send and receive mail interface.Mail-s "Subject" [email protected]Mail-s "Subject" [email protected] COMMAND | Mail-s "Subject" [email protected] 650) this.width=650; src= Http://s3.51cto.com/wyfs02/M00/72/CF/wKiom1Xtg3SCWsFBA Anbqfydmc0454.jpg "title="
CFQ scheduler is one of the most complex of the four Io scheduler, RedHat has a document that can be used as an entry to understand the red-hat-enterprise-linux-5-io-tuning-guide.pdf first
The CFQ scheduler maintains a maximum of 64 internal request queues; each process running onSystem is assigned to any of these que
First, summarize the task plan on Linux system at, crontab detailed use method1. Planning Task DescriptionPerform a task at a time in the next point: At,batch;Perform a task periodically: crontab;2. e-Mail ServiceScheduled tasks send results to users who perform tasks by default in the form of a message Mail command:Mail username (@hostname): Enter the interactive send and receive mail interfaceMail-s ' SUBJECT ' [email protected]: Set message subject
============================> >/statistics/meminfo.txt|/bin/egrep ' ^ (s| M) ' /proc/meminfo>>/statistics/meminfo.txt# view meminfo.sh permissions to ensure that performers have execute permissions [[email Protected]sh_test]#lltotal8-rwxr--r--. 1rootroot56sep 811:11fstab_backup.sh-rwxr--r--. 1rootroot129Sep 813:24meminfo.sh# set up user cron tasks [[emailprotected]~]#crontab-e# Edit/var/ Spool/cron/root file content for 00***/root/sh_test/meminfo.sh# view root user cron Task List [[email Protect
One-time mission plan: At,batchRecurring Task Scheduler: CronAt: Simple usageAt timeAt>Submit Task: ^c+dJob Result: Send the current user on the system as a messageSend and receive mail:Service start or Not Status View command:NETSTAT-TNL |grep ": 25"The default send and receive messages are only made between users on this computer and only through addresses on the loopback interface.# MailQ: ExitN: View Nth messageSend an email to the specified user
a new taskCrontab-r: Remove All TasksCrontab-u Username: Managing other usersyou can specify which users can submit crontab files by using the/etc/cron.allow and/etc/cron.deny configuration files. ls/etc/cron*cron.hourly/cron.weekly/cron.daily/cron.monthly/These four directories have the corresponding program, they will run at the corresponding time (with the suffix known), which is the system's own periodic taskCommon uses of cron1. Clean up the file systemFind/-xdev-type F ' ('-name core-o na
Pictures YangtabDocuments Public4. List the jobs submittedAfter a job is committed, you can use the "at-l" command to list all the jobs.Example: Use "at-l" to list all jobs.[Email protected] ~]# at-l6 2015-01-25 06:13 a root[Email protected] ~]#Where the 1th column is the job ID, followed by the date/time that the job was run, and a represents the at,root that r
Tags: Linux crontab at atTaskPerform a task on a single scheduled time at command: At [option] timeu common options:- v Display version Information : - L: lists the jobs that are waiting to be run in the specified queue; ATQ- D: deletes the specified job; ATRMC: View specific Job Tasks-f/path/from/somefile : Reads a task from the specified file- m: when a task is
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.