⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch40_05.htm

📁 the unix power tools
💻 HTM
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 40] 40.5 Avoiding Other at and cron Jobs </TITLE><METANAME="DC.title"CONTENT="UNIX Power Tools"><METANAME="DC.creator"CONTENT="Jerry Peek, Tim O'Reilly &amp; Mike Loukides"><METANAME="DC.publisher"CONTENT="O'Reilly &amp; Associates, Inc."><METANAME="DC.date"CONTENT="1998-08-04T21:50:36Z"><METANAME="DC.type"CONTENT="Text.Monograph"><METANAME="DC.format"CONTENT="text/html"SCHEME="MIME"><METANAME="DC.source"CONTENT="1-56592-260-3"SCHEME="ISBN"><METANAME="DC.language"CONTENT="en-US"><METANAME="generator"CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"><LINKREV="made"HREF="mailto:online-books@oreilly.com"TITLE="Online Books Comments"><LINKREL="up"HREF="ch40_01.htm"TITLE="40. Delayed Execution"><LINKREL="prev"HREF="ch40_04.htm"TITLE="40.4 Choosing the Shell Run (We Hope) by at "><LINKREL="next"HREF="ch40_06.htm"TITLE="40.6 System V.4 Batch Queues "></HEAD><BODYBGCOLOR="#FFFFFF"TEXT="#000000"><DIVCLASS="htmlnav"><H1><IMGSRC="gifs/smbanner.gif"ALT="UNIX Power Tools"USEMAP="#srchmap"BORDER="0"></H1><MAPNAME="srchmap"><AREASHAPE="RECT"COORDS="0,0,466,58"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="467,0,514,18"HREF="jobjects/fsearch.htm"ALT="Search this book"></MAP><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch40_04.htm"TITLE="40.4 Choosing the Shell Run (We Hope) by at "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 40.4 Choosing the Shell Run (We Hope) by at "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 40<BR>Delayed Execution</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch40_06.htm"TITLE="40.6 System V.4 Batch Queues "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 40.6 System V.4 Batch Queues "BORDER="0"></A></TD></TR></TABLE>&nbsp;<HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="SECT1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-2311">40.5 Avoiding Other at and cron Jobs </A></H2><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-44662"></A><ACLASS="indexterm"NAME="AUTOID-44664"></A><ACLASS="indexterm"NAME="AUTOID-44667"></A><SPANCLASS="link"><EMCLASS="emphasis">atq</EM> and <EMCLASS="emphasis">at -l</EM> (<ACLASS="linkend"HREF="ch40_09.htm"TITLE="Checking and Removing Jobs ">40.9</A>)</SPAN>are more important than they seem. They giveyou a way to decide when to run your jobs. I suggest that youcheck <EMCLASS="emphasis">atq</EM> before picking a time to run your job. If you don't,the system may have a dozen huge jobs starting at midnight or 1 a.m.They will bring the system to its knees when there's no one around tohelp out. Here's an example of what can happen, using the BSD-style<EMCLASS="emphasis">at</EM> commands:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">% <CODECLASS="userinput"><B>atq</B></CODE> Rank      Execution Date    Owner   Job#   Queue  Job Name 1st    Sep 12, 1996 01:00   mikel   4529     a    trashsys.sh 2nd    Sep 12, 1996 01:00   johnt   4531     a    flame.sh 3rd    Sep 12, 1996 01:00   davek   4532     a    stdin 4th    Sep 12, 1996 01:00   joek    4533     a    troffit 5th    Sep 13, 1996 02:00   bobr    4534     a    stdin</PRE></BLOCKQUOTE></P><PCLASS="para">Four of the five users happened to pick 1 a.m. as their submission time.Therefore, four big jobs will start in the middle of the night. Willyour system survive? Will any of these be done in the morning? Theseare good questions. Instead of submitting your jobs to runat 1 a.m., at midnight, or at some other integral number, start themat different times, and make them times like 3:48 a.m. If your systemadministrator notices lots of jobs running at the same times on yoursystem, she might delete some of them and ask you to reschedule.</P><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-44680"></A><ACLASS="indexterm"NAME="AUTOID-44682"></A>If your system has<SPANCLASS="link">personal <EMCLASS="emphasis">crontab</EM> files (<ACLASS="linkend"HREF="ch40_12.htm"TITLE="Periodic Program Execution: The cron Facility ">40.12</A>)</SPAN>,you won't be able to see other users' <EMCLASS="emphasis">cron</EM> jobs.The best way to cut system load is to pick strange times like 4:37 a.m.for your <EMCLASS="emphasis">cron</EM> jobs.</P><DIVCLASS="sect1info"><PCLASS="SECT1INFO">- <SPANCLASS="authorinitials">ML</SPAN> <SPANCLASS="bibliomisc">from O'Reilly &amp; Associates' <CITECLASS="citetitle">System Performance Tuning</CITE>, Chapter 3</SPAN></P></DIV></DIV><DIVCLASS="htmlnav"><P></P><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch40_04.htm"TITLE="40.4 Choosing the Shell Run (We Hope) by at "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 40.4 Choosing the Shell Run (We Hope) by at "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="book"HREF="index.htm"TITLE="UNIX Power Tools"><IMGSRC="gifs/txthome.gif"SRC="gifs/txthome.gif"ALT="UNIX Power Tools"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch40_06.htm"TITLE="40.6 System V.4 Batch Queues "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 40.6 System V.4 Batch Queues "BORDER="0"></A></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172">40.4 Choosing the Shell Run (We Hope) by at </TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="index"HREF="index/idx_0.htm"TITLE="Book Index"><IMGSRC="gifs/index.gif"SRC="gifs/index.gif"ALT="Book Index"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172">40.6 System V.4 Batch Queues </TD></TR></TABLE><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><IMGSRC="gifs/smnavbar.gif"SRC="gifs/smnavbar.gif"USEMAP="#map"BORDER="0"ALT="The UNIX CD Bookshelf Navigation"><MAPNAME="map"><AREASHAPE="RECT"COORDS="0,0,73,21"HREF="../index.htm"ALT="The UNIX CD Bookshelf"><AREASHAPE="RECT"COORDS="74,0,163,21"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="164,0,257,21"HREF="../unixnut/index.htm"ALT="UNIX in a Nutshell"><AREASHAPE="RECT"COORDS="258,0,321,21"HREF="../vi/index.htm"ALT="Learning the vi Editor"><AREASHAPE="RECT"COORDS="322,0,378,21"HREF="../sedawk/index.htm"ALT="sed &amp; awk"><AREASHAPE="RECT"COORDS="379,0,438,21"HREF="../ksh/index.htm"ALT="Learning the Korn Shell"><AREASHAPE="RECT"COORDS="439,0,514,21"HREF="../lrnunix/index.htm"ALT="Learning the UNIX Operating System"></MAP></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -