<?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>geek scrap &#187; Mac OS X</title>
	<atom:link href="http://geekscrap.com/tags/mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekscrap.com</link>
	<description>there is at least one way to do it</description>
	<lastBuildDate>Tue, 12 Apr 2011 10:14:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>CD overburning on Mac OS X</title>
		<link>http://geekscrap.com/2010/02/cd-overburning-on-mac-os-x/</link>
		<comments>http://geekscrap.com/2010/02/cd-overburning-on-mac-os-x/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 15:24:29 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[burning]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Toast]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=736</guid>
		<description><![CDATA[It seems that Toast 10 Titanium cd burning application doesn&#8217;t support overburning, so if you need to burn cd images that are larger than conventional 700MB, you can either use cdrtools from the command line with -overburn parameter (available in MacPorts), or use a nice cdrtools frontend called Firestarter FX, which is tested for Tiger [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that Toast 10 Titanium cd burning application doesn&#8217;t support overburning, so if you need to burn cd images that are larger than conventional 700MB, you can either use cdrtools from the command line with <em>-overburn</em> parameter (available in MacPorts), or use a nice cdrtools frontend called <a href="http://www.versiontracker.com/dyn/moreinfo/macosx/19058">Firestarter FX</a>, which is tested for Tiger and Leopard releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/cd-overburning-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 25 vulnerability RSS feeds</title>
		<link>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/</link>
		<comments>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 08:00:11 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[cert]]></category>
		<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nist]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[opml]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[securityfocus]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=702</guid>
		<description><![CDATA[One way to receive up-to-date reports about vulnerability issues is subscribing to vulnerability RSS feeds: they update on demand, they don&#8217;t rely on your mail subsystem and they don&#8217;t fill up your mailbox. The only drawback is that you could miss alerts if you don&#8217;t sync your feeds for a long time, but if you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>One way to receive up-to-date reports about vulnerability issues is subscribing to vulnerability RSS feeds: they update <em>on demand</em>, they don&#8217;t rely on your mail subsystem and they don&#8217;t fill up your mailbox. The only drawback is that you could miss alerts if you don&#8217;t sync your feeds for a long time, but if you&#8217;re a IT security manager, you don&#8217;t have a life, so how could it happen anyways? <img src='http://geekscrap.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Here&#8217;s the top feeds you should be subscribed to (<a rel="nofollow" href="http://cve.mitre.org/">CVE</a> tags are reported in brackets):</p>
<ol>
<li><a rel="nofollow" href="http://nvd.nist.gov/download/nvd-rss.xml">NIST Vulnerability Database</a>.</li>
<li><a href="http://www.us-cert.gov/channels/techalerts.rdf">US Cert Technical Security Alerts</a> [CERT].</li>
<li><a href="http://www.securityfocus.com/rss/vulnerabilities.xml">SecurityFocus Vulnerabilities</a> [SF-INCIDENTS].</li>
<li><a rel="nofollow" href="http://osvdb.org/feed/vulnerabilities/latest.rss">Open Source Vulnerability Database</a> [OSVDB].</li>
<li><a rel="nofollow" href="http://www.iss.net/rss.php">IBM Internet Security Systems Threats</a> [ISS].</li>
<li><a rel="nofollow" href="http://www.vupen.com/security-advisories.xml">Vupen Security Advisories</a> [VUPEN].</li>
<li><a rel="nofollow" href="http://secunia.tumblr.com/rss">Secunia Latest Security Advisories</a> (Unofficial) [SECUNIA].</li>
<li><a rel="nofollow" href="http://research.eeye.com/rss/published.rss">eEye Security Advisories</a> [EEYE].</li>
</ol>
<p>The above list is also available as <a href="http://geekscrap.com/wp-content/uploads/2010/02/Security-Advisories.opml">OPML file</a> you can import into your feed reader.</p>
<p><span id="more-702"></span>Furthermore, you should subscribe to Operating Systems product-centric vulnerability feeds to ensure you receive timely information regarding updated packages and suggested workarounds for your infrastructure. Here&#8217;s a comprehensive list, sorted alphabetically:</p>
<ol>
<li><a rel="nofollow" href="http://rss.lists.apple.com/security-announce.rss">Apple Security Announce</a> (Mac OS X, iPhone, etc) [APPLE].</li>
<li>Checkpoint&#8217;s <a href="http://www.checkpoint.com/defense/advisories/public/smartdefense_atomz.xml">SmartDefense Service</a> [CHECKPOINT].</li>
<li><a rel="nofollow" href="http://newsroom.cisco.com/data/syndication/rss2/SecurityAdvisories_20.xml">Cisco&#8217;s Product &amp; Service Security Advisories</a> [CISCO].</li>
<li><a rel="nofollow" href="http://www.debian.org/security/dsa-long">Debian Security Advisories</a> [DEBIAN].</li>
<li><a rel="nofollow" href="https://admin.fedoraproject.org/updates/rss/rss2.0?type=security">Fedora Security Updates</a> [FEDORA].</li>
<li><a rel="nofollow" href="http://www.freebsd.org/security/rss.xml">FreeBSD Security Advisories</a> [FREEBSD].</li>
<li><a rel="nofollow" href="http://www.gentoo.org/rdf/en/glsa-index.rdf">Gentoo Linux Security Advisories</a> (GLSA) [GENTOO].</li>
<li><a rel="nofollow" href="http://www.mandriva.com/rss/feed/security">Mandriva Security Advisories</a> [MANDRIVA].</li>
<li>Microsoft&#8217;s <a rel="nofollow" href="http://www.microsoft.com/technet/security/bulletin/RssFeed.aspx?snscomprehensive">Security Notification Service Comprehensive Edition</a> [MS].</li>
<li><a rel="nofollow" href="http://www.NetBSD.org/support/security/rss-advisories.xml">NetBSD Security Advisories</a> [NETBSD].</li>
<li><a rel="nofollow" href="http://www.openpkg.com/security/advisories/?format=rss">OpenPKG Security Advisories</a> [OPENPKG].</li>
<li><a rel="nofollow" href="http://www.undeadly.org/cgi?action=errata">OpenBSD Errata</a> [OPENBSD].</li>
<li><a rel="nofollow" href="https://rhn.redhat.com/rpc/recent-errata.pxt">Red Hat Security Advisories</a> [REDHAT].</li>
<li><a href="http://dev.slackware.it/rss/slackware-security.xml">Slackware Linux Security Advisories</a> [SLACKWARE].</li>
<li><a rel="nofollow" href="http://search.sun.com/feed/atom/results.jsp?col=main-support-sunalerts&amp;oneof=security&amp;nh=30&amp;rf=1&amp;type=advanced&amp;optstat=true&amp;qt=security&amp;reslang=en&amp;st=1">Solaris SunSolve Alerts</a> [SUNALERT].</li>
<li><a rel="nofollow" href="http://www.novell.com/linux/security/suse_security.xml">SUSE Linux Enterprise Security Advisories</a> (also contains OpenSUSE advisories) [SUSE].</li>
<li><a rel="nofollow" href="http://www.ubuntu.com/usn/rss.xml">Ubuntu Security Notices</a> [UBUNTU].</li>
</ol>
<p>OS security advisory feeds are available as <a href="http://geekscrap.com/wp-content/uploads/2010/02/Security-Advisories1.opml">OPML file</a> as well.</p>
<p>Have I missed anything? Please report if you find some advisory feed I accidentally missed. Also, if you&#8217;re into an Operating System security team and you don&#8217;t offer a security announcement feed, please consider making it available.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pre-processing Audio and Video capture to Flash in Mac OS X</title>
		<link>http://geekscrap.com/2010/02/pre-processing-audio-and-video-capture-to-flash-in-mac-os-x/</link>
		<comments>http://geekscrap.com/2010/02/pre-processing-audio-and-video-capture-to-flash-in-mac-os-x/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 23:08:54 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[How-tos]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[camtwist]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[jack]]></category>
		<category><![CDATA[livestream]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[mogulus]]></category>
		<category><![CDATA[multi-track]]></category>
		<category><![CDATA[recording]]></category>
		<category><![CDATA[ustream]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=504</guid>
		<description><![CDATA[Web streaming services like UStream.tv and Livestream (previously known as Mogulus) use a Flash applet to capture audio and video signals on source computer. Media stream is encoded by Flash and sent over to broadcasting server. Currently this approach has two shortcomings: Flash applet audio capture is very limited: only one device a time, only one [...]]]></description>
			<content:encoded><![CDATA[<p>Web streaming services like <a rel="nofollow" href="http://www.ustream.tv/">UStream.tv</a> and <a rel="nofollow" href="http://www.livestream.com/">Livestream</a> (previously known as <em>Mogulus</em>) use a Flash applet to capture audio and video signals on source computer. Media stream is encoded by Flash and sent over to broadcasting server. Currently this approach has two shortcomings:</p>
<ol>
<li>Flash applet audio capture is very limited: only one device a time, only one stereo channel pair and doesn&#8217;t support devices without volume level mixer. It doesn&#8217;t allow any advanced setup like multi-channel digital mixers.</li>
<li>Audio and video are encoded on the fly and no local copy is recorded. Streaming services offer server-side recording, but after downsampling and packet loss, quality is very low. Even worse: any connection fault will interrupt your recording.</li>
</ol>
<p><span id="more-504"></span>To achieve multi-channel audio capture and client-side recording, live events media producers traditionally have few options:</p>
<ol>
<li>Process audio and video signals with external mixer and recording tools and then acquire analog output signals with an AD capture card. This makes multi-channel recording more expensive. Furthermore, if signal processing passes through analog components, streaming quality is degraded and HD video must be downscaled.</li>
<li>Record your audio-video using your camera and then use camera Firewire or analog output to stream to computer. To do this, you need to have audio inputs on your camera. This has three downsides: your recorded session may have lower video quality (miniDV or miniHDV tape recording quality may be lower than firewire output quality), you cannot record multitrack audio and you need to connect your audio mixer to your camera.</li>
<li>Use a digital mixer coupled with Flash Media Encoder software, which is only available on Windows, so if you&#8217;re a Mac OS X or Linux user, you&#8217;re out of luck. Also, you cannot record high quality encoded files but only FLV as they&#8217;re sent over to the broadcast.</li>
<li>Use <a rel="nofollow" href="http://www.ustream.tv/producer">UStream Producer Pro</a>, a $199 tool released by UStream.tv for Windows and Mac OS X, that allows multi-camera management, HDV input, PIP and broadcasting output recording, at the same quality of the output stream.</li>
</ol>
<p>For my live streaming setup, I wanted to use my MacBook laptop with Mac OS X, a <a href="http://www.amazon.com/gp/product/B000IF8NNS?ie=UTF8&amp;tag=geekscrap-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000IF8NNS">Sony HVR-V1</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=geekscrap-20&amp;l=as2&amp;o=1&amp;a=B000IF8NNS" border="0" alt="" width="1" height="1" /> HDV camera connected through Firewire and a <a href="http://www.amazon.com/gp/product/B000OSCHG8?ie=UTF8&amp;tag=geekscrap-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B000OSCHG8">Edirol M-16DX</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=geekscrap-20&amp;l=as2&amp;o=1&amp;a=B000OSCHG8" border="0" alt="" width="1" height="1" /> 16-channel digital audio mixer connected via USB to capture audio from a few condenser microphones. Methods mentioned above aren&#8217;t applicable, because they would require additional hardware and recording quality would be very low, compared to original signal quality.</p>
<p>After some research, I found a way to process audio and video signals before submitting them to Flash applet in Mac OS X. First, the requirements:</p>
<ol>
<li><a href="http://allocinit.com/index.php?title=CamTwist">CamTwist</a>: it&#8217;s a freeware software that creates a loopback video interface and allows multiple client apps to access a single video device at the same time. A number of video effects can be applied to the video stream by CamTwist.</li>
<li><a href="http://jackaudio.org/">Jack audio router</a>: an Open Source application that allows custom routing of audio channels between multiple devices and programs simultaneously with very low latency.</li>
<li>An account on <a href="http://www.ustream.tv/">UStream.tv</a> with an available broadcasting channel setup.</li>
</ol>
<p>Once you&#8217;ve installed the programs and created the account, you can use the following checklist to configure your system to route your advanced audio-video stream both to UStream.tv and to your custom recording tools:</p>
<ol>
<li>Connect your external camera and audio sources and wait until they&#8217;re properly recognised by the system.</li>
<li>Run CamTwist and <strong>select your video input</strong> from the Step 1 column and adjust input settings in the &#8220;Settings&#8221; column on the right. If you want, you can add effects in column Step 2 (check CamTwist documentation for details). If you need a preview, you can use Tools -&gt; Preview menu (close it afterwards, so that it doesn&#8217;t eat up cpu cycles).</li>
<li>Run JackPilot program and <strong>configure access to hardware</strong> device from JackPilot -&gt; Preferences menu (it should open automatically on first use). You need to select your audio driver (typically <em>coreaudio</em>), your hardware interface (select your multi-channel card), your hardware-specific setup (frequency, number input and output of channels) and then set your <em>virtual Jack card</em> channels and untick &#8220;Auto connect with physical ports&#8221;.</li>
<li>Once you&#8217;re done with Jack setup, close Preferences dialog and start Jack audio server by clicking on <strong>Run button</strong> in main dialog.</li>
<li>Open your audio-video recording tool and select <strong>CamTwist</strong> from available video input interfaces and <strong>JackRouter</strong> from audio input interfaces and start a new recording. For instance, if you use QuickTime to record your session, go to QuickTime -&gt; Preferences menu and select Recording tab. In Video Source drop-down menu select CamTwist and in Microphone menu select JackRouter, then close dialog and open a new session with File -&gt; New video recording menu and click on Record button to start recording. <strong>Important</strong>: if you don&#8217;t start recording, your tool may not show up in your Jack router setup, so do as you&#8217;re told <img src='http://geekscrap.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>Open your browser (Firefox is better) and connect to UStream.tv, login with your account and click on <strong>Broadcast now</strong> button. A popup will open and once Flash applet is loaded, you can select your audio and video inputs just below the preview frame. Select CamTwist from Video drop-down menu and JackRouter from Audio menu. Check that you see video from your source in preview frame.</li>
<li>Go back to JackPilot and click on <strong>Routing button</strong> to open Routing panel. The panel contains 3 frames: on the first frame, you have your physical captures and your application audio outputs, on the second frame you have your physical outputs and your application inputs and on the third frame there&#8217;s a list of connection. What you have to do is create <strong>a series of mappings between items</strong> in first frame to items in second frame. To create a mapping, you need to select one item in first frame and double-click on item on second frame. To unbind the mapping, just repeat the same action again. In my setup, I create a mapping between stereo mix-down channels 17 and 18 of my mixer and Flash (Firefox) stereo input channels and then a mapping between the same mix-down channels and QuickTime stereo input. If you use a multi-track recording program like Cubase, you can add more virtual channels to Jack Router (in Preferences) and map each mixer input to its own virtual channel. <strong>Remember</strong>: if you need to change Jack Router settings to add more channels or change interface settings, you have to shut down Jack with Stop button first.</li>
<li>Now you&#8217;re ready to click on Broadcast button on your UStream.tv channel and go live. Check audio level with Flash Vu-meter and adjust volume slider accordingly. For what regards audio and video quality sliders, my advice is to keep audio above 70 and video at least 50: the more bandwith you have, the more you can raise video.</li>
</ol>
<p><strong>Be careful</strong>: audio and video streams are not synchronized, because there&#8217;s no common clock or timecoding between the source peripherals. This means that long audio-video sessions might get slightly out of sync if processing time is different between audio and video. My advice is to check wether your camera and audio mixer support timecoding synchronization in a common format: if they do, then set up a link between the two. If they don&#8217;t (which is probably your situation, if you&#8217;re using consumer devices), avoid running other cpu-intensive or disk-intensive processes during the streaming/recording activity and use a post-production tool like FinalCut Pro or Adobe Premiere Pro to match audio and video on recorded files by shifting and stretching appropriately. I will write more on this later.</p>
<p>That&#8217;s all. Have you found other ways to accomplish the same result? Need some hints for your setup or troubleshooting? Please share your thoughts using the comments box below and remember to subscribe to my feed for additional tips on AV techniques.</p>
<p>P.S.: Special thanks goes out to Maurizio Tognoni, who shared the hacking and testing efforts.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/pre-processing-audio-and-video-capture-to-flash-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gentooize Part 1: colorize console</title>
		<link>http://geekscrap.com/2010/01/gentooize-part-1-colorize-console/</link>
		<comments>http://geekscrap.com/2010/01/gentooize-part-1-colorize-console/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 07:30:40 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[How-tos]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=137</guid>
		<description><![CDATA[One of the best lessons you can learn from Gentoo is you can export most of its juice to other OSes. I&#8217;ve been using Gentoo as main Linux distro since 2001. Currently I have a few setups where drawbacks of migrating to Gentoo would exceed benefits, so I decided to increase affinity by adding some [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best lessons you can learn from Gentoo is you can <em>export</em> most of its juice to other OSes. I&#8217;ve been using Gentoo as main Linux distro since 2001. Currently I have a few setups where drawbacks of migrating to Gentoo would exceed benefits, so I decided to increase affinity by adding some Gentoo look&#8217;n'feel. This week I will post some tips to setup Gentoo console colors on other operating systems.</p>
<p><span id="more-137"></span></p>
<h2>Shell prompt</h2>
<p>First of all, you should check you&#8217;re using <strong>bash</strong> shell:</p>
<pre lang="bash">$ env | grep ^SHELL=
SHELL=/bin/bash</pre>
<p>If not, you should check if bash package is already installed. If it&#8217;s already there, just change your user shell (and possibly root shell) with chsh or consult your OS manual. <strong>Be careful</strong>: if bash is not listed in /etc/shells, you might lock yourself out.</p>
<p>To set Gentoo-like colors on bash prompt, edit ~/.profile (or /etc/profile for system-wide defaults) and add the following:</p>
<pre lang="bash">if [[ ${EUID} == 0 ]] ; then
        PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
        PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi</pre>
<h2>GNU ls</h2>
<p>If you use GNU ls (use &#8211;version to check) and <strong>dircolors</strong> utility is available (from GNU <a rel="nofollow" href="http://www.gnu.org/software/coreutils/">coreutils</a>), you can have colorful outputs by adding the following snippet to your bash profile (see above):</p>
<pre lang="bash">if type -P dircolors &gt;/dev/null ; then
        if [[ -f ~/.dir_colors ]] ; then
                eval $(dircolors -b ~/.dir_colors)
        elif [[ -f /etc/DIR_COLORS ]] ; then
                eval $(dircolors -b /etc/DIR_COLORS)
        fi
fi
alias ls='ls --color=auto'</pre>
<p>To enable colors, you need to save Gentoo <a href="http://geekscrap.com/wp-content/uploads/2010/01/DIR_COLORS">color defs</a> to ~/.dir_colors (or /etc/DIR_COLORS for system-wide defaults).<br />
Alternatively, if you miss dircolors binary on your system, save output from dircolors on a Gentoo machine and copy&#8217;n'paste it into bash profile:</p>
<pre lang="bash">LS_COLORS='...weird colon-separated string...'
export LS_COLORS
alias ls='ls --color=auto'</pre>
<h2>BSD ls implementation</h2>
<p>A special trick is required for <strong>FreeBSD</strong> and <strong>Mac OS X</strong>: add the following line to your bash profile:</p>
<pre lang="bash">export CLICOLOR=1 LSCOLORS="ExGxFxDxCxDxDxhbhdacEc"</pre>
<p>If you want to further customize colors on your <strong>Mac OS X Terminal</strong>, you can use SIMBL <a rel="nofollow" href="http://ciaranwal.sh/2007/11/01/customising-colours-in-leopard-terminal">TerminalColours</a> plugin (<a rel="nofollow" href="http://blog.fallingsnow.net/2009/08/28/fixing-colors-in-terminal-app-on-10-6/">Snow Leopard version</a>).</p>
<h2>GNU grep</h2>
<p>You can enable coloring of the matched part by appending the following alias to your bash profile:</p>
<pre lang="bash">alias grep='grep --colour=auto'</pre>
<p>As usual, if you have any coloring tips&#8217;n'tricks you want to share, please use the comment box below.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/01/gentooize-part-1-colorize-console/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Process management roundup/1</title>
		<link>http://geekscrap.com/2010/01/process-management-roundup-1/</link>
		<comments>http://geekscrap.com/2010/01/process-management-roundup-1/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:11:17 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[launchd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[smf]]></category>
		<category><![CDATA[suse]]></category>
		<category><![CDATA[sysinitv]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=143</guid>
		<description><![CDATA[Under UNIX-like operating systems, there are several ways to manage long-running processes such as daemons. Process management is a crucial aspect of system maintainance and therefore it&#8217;s one of the aspects to take into account when planning a deployment. Since available solutions are getting more and more complex and specialized, I thought of writing a [...]]]></description>
			<content:encoded><![CDATA[<p>Under UNIX-like operating systems, there are several ways to manage long-running processes such as daemons. Process management is a crucial aspect of system maintainance and therefore it&#8217;s one of the aspects to take into account when planning a deployment. Since available solutions are getting more and more complex and specialized, I thought of writing a series of articles to recap the state of the art and draw up a comparative analysis.</p>
<p>This post deals with two system-wide alternatives, sysinitv and Mac OS X&#8217;s launchd: the first represents the tradition, while the latter represent innovation. Feel free to use comments to share your tips.</p>
<p><span id="more-143"></span></p>
<h3>System V init</h3>
<p>Also known as <em>sysinitv</em>, it&#8217;s the historical choice for most unices. Every OS has customized its own version so there&#8217;s no common standard. First process, typically /sbin/init reads config in /etc/inittab and executes a series of commands, depending on which <em>runlevel</em> is currently set.</p>
<p>In typical configurations, init launches a main rc script on runlevel change (boot sequence runlevel, default multiuser runlevel, etc), which in turn runs all the initialization scripts in a runlevel-specific folder. For example, in Redhat Linux each system service has an init script in /etc/init.d/. These init scripts respond to a number of actions that can be passed as parameter, for example <em>/etc/init.d/sendmail start</em> runs a function that starts sendmail daemon. Typical actions include: <em>start, stop, restart, status</em>. Some scripts implement specific actions: for instance apache service implements <em>reload</em> action, which does a graceful signal-based reload. Furthermore, most OSes include additional dependency information in those scripts and import script configuration directives from external files (/etc/sysconfig/ on Debian, SuSE, etc, /etc/conf.d/ in Gentoo).</p>
<p>When rc scripts is ready to process init scripts, it looks in appropriate runlevel folder (in RedHat Linux and derivatives its /etc/rc.d/rc&lt;runlevel&gt;.d/,  Gentoo has /etc/runlevels/&lt;runlevel&gt;/, etc) and executes entries which are symlinks to the actual /etc/init.d scripts.</p>
<p>Most of these systems use a specific naming convention for these symlinks, to define order of execution (scripts are run in alphabetic order) and action to be passed as parameter. For example, on RedHat-style systems, scripts are named as S&lt;NN&gt;&lt;service&gt; or K&lt;NN&gt;&lt;service&gt;, where NN is a number from 00 to 99. S means start action (ie. <em>/etc/rc.d/rc3.d/S60sendmail start</em>), while K means stop action. In other systems such as Gentoo, order of execution is determined dynamically by dependency information (requires additional computing and dependency caching).</p>
<p>Operating systems typically implement command-line, ncurses-based or X11-based tools to manage adding and removing items from runlevels: <a rel="nofollow" href="http://www.linuxjournal.com/article/4445">chkconfig</a> under RedHat/CentOS, <a rel="nofollow" href="http://www.debuntu.org/how-to-manage-services-with-update-rc.d">update-rc.d</a> under Debian, <a rel="nofollow" href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=4#doc_chap2">rc-update</a> under Gentoo, <a rel="nofollow" href="http://www.marzocca.net/linux/bum.html">boot up manager</a> (bum) under Ubuntu.</p>
<p><strong>Pros</strong>: well known, easy for unix admins, easy to add new custom scripts.<br />
<strong>Cons</strong>: no common standard, no parallel execution (except for Gentoo), no support process monitoring (ie. restarting daemons on crash).</p>
<h3>launchd</h3>
<p>It&#8217;s installed by default on <strong>Mac OS X 10.4 (Tiger)</strong> and later. Once <a rel="nofollow" href="http://launchd.macosforge.org/">launchd</a> is run by the kernel, it runs /etc/rc (a BSD-style system wide initialization script) and scans<em>/System/Library/LaunchAgents</em> and <em>/Library/LaunchDaemons</em> for plist files. Each plist contains a series of properties that define behaviour of launchd and customize run setup (command parameters, working directory, process owner, resource limits, etc). Launchd monitors processes and dynamically acts to adapt process status to requirements defined by configuration. This includes: running process automatically at boot, respawning process on unexpected quit, starting and stopping process upon several conditions (cpu load, network status, filesystem mounts, file presence, time schedule, shutdown, sleep, etc).</p>
<p>Finally, launchd companion is user tool <a rel="nofollow" href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html">launchctl</a>, which interacts with launchd through a socket and allows administrator to send in requests like start, stop, list, limit, shutdown, etc.</p>
<p><strong>Pro</strong>: amazing configuration directives, powerful extension mechanism, post-spawn process monitoring and usage management, scheduled actions (as in cron), stdio-to-inet support as inetd, can add processes without configuration files.<br />
<strong>Cons</strong>: configuration plists are an Apple-world standard, many great features are Mac OS X specific, strict process launching requisites (see <a rel="nofollow" href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html">launchd.plist manpage</a>), no support for configurable dependencies, no support for custom process signaling, complex logic may lead to unexpected results.</p>
<p><em>(continues)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/01/process-management-roundup-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
