<?xml version="1.0" encoding="utf-8"?>

























	
	



	
	
	

	
		
		
		

		
		
			
			
			
			
		
	
	
	
	
	
	


<rss version="2.0">	
	<channel>
		<title>Radiant Core: kill tag</title>
		<link>http://www.radiantcore.com/</link>
		<description>All of the Radiant Core posts tagged with kill.</description>
		<language>en-ca</language>
		<copyright>Copyright 2006, Radiant Core Inc. All rights reserved.</copyright>
		<managingEditor>webmaster@radiantcore.com</managingEditor>
		<webMaster>webmaster@radiantcore.com</webMaster>
		
			
			
			
			
			
			
			
			

			
				
			
			<item>
				<title><![CDATA[Resolving Tomcat's Hangups]]></title>
				<author>Martin Kuplens-Ewart &lt;info@radiantcore.com&gt;</author>
				<link>http://www.radiantcore.com/blog/archives/10/11/2006/tomcathangups</link>
				<guid isPermaLink="true">http://www.radiantcore.com/blog/archives/10/11/2006/tomcathangups</guid>
				<comments>http://www.radiantcore.com/blog/archives/10/11/2006/tomcathangups#comments</comments>
				<description><![CDATA[The ritual of restarting Tomcat whenever a new jar is added or an upgrade results in their names changing is, I am sure, familiar to all of us developing Java-based sites.<br /><br />Over time we've developed a set of handy aliases to handle the regular ups and downs and keeping an eye on Catalina.out, tomcat's log file of choice. Recently however, I've been having to make more frequent search-and-destroy excursions to resolve hanging processes. After a couple dozen repetitions and mutterings about wishing for a one-liner, I decided to navigate the murky waters of command-line scripting.<br /><br />The result of a bit of munging and googling is a fantastic one-liner (or if you configure it as an alias, one-worder): <br /><br style="font-weight: bold;"><span style="font-weight: bold;">ps -auxww|grep java|grep tomcat|grep -v grep|awk "{system("sudo kill "$2 " &gt; /dev/null")}</span><br /><br />And because they've made my work so much more convenient, here's my full set of aliases, ready to be dropped into your .profile (all you need to do is define your <span style="font-style: italic;">TOMCAT_HOME</span>):<br /><br />alias tomstart='$TOMCAT_HOME/bin/startup.sh'<br />alias tomstop='$TOMCAT_HOME/bin/shutdown.sh'<br />alias tomlog='tail -f $TOMCAT_HOME/logs/catalina.out'<br />alias tomgrep='ps -auxww|grep tomcat'<br />alias tomkill='ps -auxww|grep java|grep tomcat|grep -v grep|awk "{system("sudo kill "$2 " &gt; /dev/null")}"'<br /><br />]]></description>
				<category>Java</category>
				<pubDate>Fri, 10 Nov 2006 12:00:00 GMT</pubDate>
			</item>
		
	</channel>
</rss>