<?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>david kerr &#187; perl</title>
	<atom:link href="http://www.davidmkerr.com/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidmkerr.com</link>
	<description>Weapons designer. Innovator, inventor, world changer</description>
	<lastBuildDate>Thu, 20 May 2010 14:30:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>randombg &#8211; Another Gnome Random background switcher</title>
		<link>http://www.davidmkerr.com/software/randombg-another-gnome-random-background-switcher/</link>
		<comments>http://www.davidmkerr.com/software/randombg-another-gnome-random-background-switcher/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 00:43:18 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?page_id=184</guid>
		<description><![CDATA[I didn&#8217;t like a lot of the official background changers out there for Ubuntu + Gnome. The best one that I tried was Desktop Drapes and it just wasn&#8217;t stable for me. I also thought that having a program constantly running to change my desktop background was a little excessive. So I wrote a little [...]]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t like a lot of the official background changers out there for Ubuntu + Gnome.<br />
The best one that I tried was Desktop Drapes and it just wasn&#8217;t stable for me.</p>
<p>I also thought that having a program constantly running to change my desktop background was a little excessive. </p>
<p>So I wrote a little switcher in perl. I used perl because I wanted to make sure that the desktop actually switched each time (i.e., no direct repeats) and I felt that perl was better for this than a shell script.</p>
<p>I had to go the symbolic link route because Gnome requires DBUS_SESSION_BUS_ADDRESS to be set, it&#8217;s only set in the environment of your X session, and there was no (good) way to extract that via cron. Which is why you always see bg changers outside of cron.</p>
<p>The usage is pretty straight forward:<br />
<code>
<pre>randombg.pl &lt;directory&gt;</pre>
<p></code><br />
Where &lt;directory&gt; is where your backgrounds are located.</p>
<p><strong>Note 1:</strong> &lt;directory&gt; defaults to ~/Pictures, so if that&#8217;s where you have your backgrounds then you don&#8217;t need to send a command line to it).</p>
<p><strong>Note 2:</strong> this will create a symbolic link called <u>background.jpg</u> in your picture directory, so make sure that file doesn&#8217;t already exist.</p>
<p>I then set this up in cron:<br />
<code><br />
0-59/15 * * * *	~/scripts/randombg.pl<br />
</code></p>
<p>That swaps out my background every 15 minutes.</p>
<p>You can download randombg.pl.gz <a href='http://www.davidmkerr.com/wp-content/uploads/2009/11/randombg.pl_1.gz'>here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/software/randombg-another-gnome-random-background-switcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: Alertwatch</title>
		<link>http://www.davidmkerr.com/software/oracle-alertwatch/</link>
		<comments>http://www.davidmkerr.com/software/oracle-alertwatch/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 04:32:14 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?page_id=97</guid>
		<description><![CDATA[Usage: alertwatch.pl /path/to/alert.log Info: alertwatch is a perl program to monitor your oracle alert log. No need to loop this with a cron, just start it in the background and let it run, the second an ORA- error is written to the alert.log it will be mailed to the DBA. Configuration: Make sure to change: [...]]]></description>
			<content:encoded><![CDATA[<p>Usage: alertwatch.pl /path/to/alert.log</p>
<p>Info:<br />
alertwatch is a perl program to monitor your oracle alert log. No need to loop this with a cron, just start it in the background and let it run, the second an ORA- error is written to the alert.log it will be mailed to the DBA.</p>
<p>Configuration:<br />
Make sure to change:<br />
mail{To} / mail{From} / mail{Subject}</p>
<p>Prereqs:<br />
File::Tail<br />
Mail::Sendmail<br />
(Both can be downloaded from www.cpan.org)</p>
<p>Download <a href="/downloads/alertwatch.pl.gz">alertwatch.pl.gz</a> v1.0</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/software/oracle-alertwatch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baan: Session Stats</title>
		<link>http://www.davidmkerr.com/software/session-stats/</link>
		<comments>http://www.davidmkerr.com/software/session-stats/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 03:45:26 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[baan]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?page_id=81</guid>
		<description><![CDATA[Session stats is a nice little way to parse your Baan TIME.HIS file and displays useage statistics per session/object. It can display output by user or by session. usage: session_stat.pl [] [] Flags: -c output by company -u output by user -s output by session Download session_stats.pl.tgz v1.0]]></description>
			<content:encoded><![CDATA[<p>Session stats is a nice little way to parse your Baan TIME.HIS file and displays useage statistics per session/object.<br />
It can display output by user or by session.</p>
<pre>
usage: session_stat.pl [<flags>] [<file>]
Flags: -c output by company
-u output by user
-s output by session
</file></flags></pre>
<p>Download <a href="/downloads/session_stats.pl.gz">session_stats.pl.tgz</a> v1.0 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/software/session-stats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baan: SLM Monitor</title>
		<link>http://www.davidmkerr.com/software/slm-monitor/</link>
		<comments>http://www.davidmkerr.com/software/slm-monitor/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 03:41:31 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[baan]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?page_id=78</guid>
		<description><![CDATA[SLM Monitor connects to your SLM server retrieves the XML output and parses it for a nice rolled up display like below. Product Id: 10996 User Count: 29 gomartin xx.yy.73.34 23847 bsp752t 0.0.0.0 6317 bsp xx.yy.135.9 2794 jmterbor xx.yy.21.104 15657 hxjoshi xx.yy.72.144 29975 bsp xx.yy.72.101 4817 sdchen xx.yy.72.108 16926 jamcginn xx.yy.19.144 5311 bsp715t 0.0.0.0 3848 [...]]]></description>
			<content:encoded><![CDATA[<p>SLM Monitor connects to your SLM server retrieves the XML output and parses it for a nice rolled up display like below.</p>
<pre>
Product Id: 10996
User Count: 29
gomartin         xx.yy.73.34     23847
 bsp752t             0.0.0.0     6317
     bsp         xx.yy.135.9     2794
jmterbor        xx.yy.21.104     15657
 hxjoshi        xx.yy.72.144     29975
     bsp        xx.yy.72.101     4817
  sdchen        xx.yy.72.108     16926
jamcginn        xx.yy.19.144     5311
 bsp715t             0.0.0.0     3848
     bsp       xx.yy.240.166     14560
</pre>
<p>To Configure the script modify it to add your servername and port.<br />
Edit this line:</p>
<pre>
SlmCmd -mondts <insert your server> -port </insert><insert your port>
</insert></pre>
<p>In the file.</p>
<p>You can download <a href="/downloads/slm_monitor.pl.gz">slm_monitor.pl.gz</a> v1.0<br />
Note: works with SLM 7.0.0.8 &#8211; I lost access to SLM around this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/software/slm-monitor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Perl script to allocate shared memory (and annoy sysadmins)</title>
		<link>http://www.davidmkerr.com/databases/howto-allocate-shared-memory-in-perl/</link>
		<comments>http://www.davidmkerr.com/databases/howto-allocate-shared-memory-in-perl/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 01:54:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.davidmkerr.com/?p=70</guid>
		<description><![CDATA[I once ran into an instance where the Unix admins didn&#8217;t believe me that i was running out of shared memory despite the errors, I was showing them. I wrote this perl script to allocate chunks of shared memory until it failed to prove to them that yes, regardless of what you have the global [...]]]></description>
			<content:encoded><![CDATA[<p>I once ran into an instance where the Unix admins didn&#8217;t believe me that i was running out of shared memory despite the errors, I was showing them. I wrote this perl script to allocate chunks of shared memory until it failed to prove to them that yes, regardless of what you have the global ulimits set to my user&#8217;s limits were lower.</p>
<pre>
#!/usr/bin/perl -w

use IPC::SysV qw(IPC_PRIVATE IPC_RMID S_IRWXU);

#$size = 314580992;
$size = 50000000;
$id = shmget(IPC_PRIVATE, $size, S_IRWXU) || die "$!";
sleep 10;
shmctl($id, IPC_RMID, 0)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmkerr.com/databases/howto-allocate-shared-memory-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
