<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>{Complexity} &#187; Signal</title>
	<atom:link href="http://technote.wsjoung.com/tag/signal/feed/" rel="self" type="application/rss+xml" />
	<link>http://technote.wsjoung.com</link>
	<description>simple note</description>
	<lastBuildDate>Wed, 09 Nov 2011 02:12:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Linux signal</title>
		<link>http://technote.wsjoung.com/2006/11/17/linux-signal/</link>
		<comments>http://technote.wsjoung.com/2006/11/17/linux-signal/#comments</comments>
		<pubDate>Fri, 17 Nov 2006 01:08:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Signal]]></category>

		<guid isPermaLink="false">http://wsjoung.wordpress.com/2006/11/17/linux-signal/</guid>
		<description><![CDATA[I was writing a shell scripts to manage my process. basically I have some jobs need to be run for long time at least 2 weeks, but the problem is that the system manager will kill all my processes during the night because it takes too much cpu resource and it increases the temperature. So, [...]]]></description>
			<content:encoded><![CDATA[<p>I was writing a shell scripts to manage my process. basically I have some jobs need to be run for long time at least 2 weeks, but the problem is that the system manager will kill all my processes during the night because it takes too much cpu resource and it increases the temperature.</p>
<p>So, I wanted to write a small scripts which can make all my processes stop during the night and resume next day.</p>
<p>There is SIGNALs</p>
<p>`HUP&#8217; : 1.  Hangup.</p>
<p>`INT&#8217; : 2.  Terminal interrupt.</p>
<p>`QUIT&#8217; : 3.  Terminal quit.</p>
<p>`ABRT&#8217; : 6.  Process abort.</p>
<p>`KILL&#8217; : 9.  Kill (cannot be caught or ignored).</p>
<p>`ALRM&#8217; : 14.  Alarm Clock.</p>
<p>`TERM&#8217; : 15.  Termination.</p>
<p>`BUS&#8217; : Access to an undefined portion of a memory object.</p>
<p>`CHLD&#8217; : Child process terminated, stopped, or continued.</p>
<p>`CONT&#8217; : Continue executing, if stopped.</p>
<p>`FPE&#8217; : Erroneous arithmetic operation.</p>
<p>`ILL&#8217; : Illegal Instruction.</p>
<p>`PIPE&#8217; : Write on a pipe with no one to read it.</p>
<p>`SEGV&#8217; : Invalid memory reference.</p>
<p>`STOP&#8217; : Stop executing (cannot be caught or ignored).</p>
<p>`TSTP&#8217; : Terminal stop.</p>
<p>`TTIN&#8217; : Background process attempting read.</p>
<p>`TTOU&#8217; : Background process attempting write.</p>
<p>`URG&#8217; : High bandwidth data is available at a socket.</p>
<p>Especially TSTP and CONT was useful for my job.<br />
for example,</p>
<p>for line in $(cat $hosts)<br />
do<br />
pid=$(rsh $line ps aux|grep &#8220;rosetta.gcc&#8221;|awk &#8216;{print $2}&#8217;);<br />
if [ $pid ] ; then<br />
rsh $line kill -TSTP $pid<br />
fi<br />
done</p>
]]></content:encoded>
			<wfw:commentRss>http://technote.wsjoung.com/2006/11/17/linux-signal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

