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

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>roberto dircio palacios-macedo's notepad</title>
    <link>http://www.kraftek.com/blog/</link>
    <description>solaris/linux/java notes open to all since 2004</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Fri, 27 Aug 2010 16:50:22 GMT</pubDate>

    <image>
        <url>http://www.kraftek.com/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: roberto dircio palacios-macedo's notepad - solaris/linux/java notes open to all since 2004</title>
        <link>http://www.kraftek.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>stream a webcam, using highly compressed h264 instead of typical mpg</title>
    <link>http://www.kraftek.com/blog/index.php?/archives/336-stream-a-webcam,-using-highly-compressed-h264-instead-of-typical-mpg.html</link>
            <category>Linux</category>
    
    <comments>http://www.kraftek.com/blog/index.php?/archives/336-stream-a-webcam,-using-highly-compressed-h264-instead-of-typical-mpg.html#comments</comments>
    <wfw:comment>http://www.kraftek.com/blog/wfwcomment.php?cid=336</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.kraftek.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=336</wfw:commentRss>
    

    <author>nospam@example.com (rdircio)</author>
    <content:encoded>
    &lt;p&gt;Got a logitech webcam c300, it uses the &amp;quot;uvcvideo&amp;quot; kernel module.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Typically you would&amp;#160; grab video using &amp;quot;motion&amp;quot; and stream it on mpeg, well that&#039;s rubbish if you want better compression, so let&#039;s do it using the best of the best: h264.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font size=&quot;1&quot;&gt;&lt;em&gt;&amp;#160;#!/bin/ksh&lt;br /&gt;&lt;br /&gt;DEV=/dev/logitechcam&lt;br /&gt;ps -ef | grep -i vlc | grep -v grep |grep -i logitechcam | awk &#039;{ print $2 }&#039;| while read P;do&lt;br /&gt;kill -9 $P&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;VLC=&amp;quot;/usr/local/bin/cvlc v4l2://$DEV :input=2 :input-slave=alsa://hw:2,0&amp;#160; --alsa-samplerate=32000 --v4l2-controls-reset --v4l2-auto-white-balance=1 --v4l2-do-white-balance=1 --v4l2-autogain=1 --sout &amp;quot;&lt;br /&gt;&lt;br /&gt;CAM=&amp;quot;transcode{vcodec=h264,acodec=mp4a,width=320,height=240,vb=64,ab=24,channels=1,venc=x264}:standard{access=http,dst=0.0.0.0:8090/stream.flv}&amp;quot;&lt;br /&gt;&lt;br /&gt;#CAM=&amp;quot;transcode{vcodec=mjpg,width=320,height=240}:duplicate{dst=std{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a}.mux=mpjpeg,dst=0.0.0.0:8090/m.mjpg}}&amp;quot;&lt;br /&gt;&lt;br /&gt;${VLC} &amp;quot;#$CAM&amp;quot;&lt;br /&gt;&lt;/em&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;this produces a very decent quality stream at around 100kbps, audio also included!&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Enjoy!&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 26 Aug 2010 13:53:51 -0500</pubDate>
    <guid isPermaLink="false">http://www.kraftek.com/blog/index.php?/archives/336-guid.html</guid>
    
</item>
<item>
    <title>Test nics to see if we're on the desired vlan</title>
    <link>http://www.kraftek.com/blog/index.php?/archives/334-Test-nics-to-see-if-were-on-the-desired-vlan.html</link>
            <category>Linux</category>
    
    <comments>http://www.kraftek.com/blog/index.php?/archives/334-Test-nics-to-see-if-were-on-the-desired-vlan.html#comments</comments>
    <wfw:comment>http://www.kraftek.com/blog/wfwcomment.php?cid=334</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.kraftek.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=334</wfw:commentRss>
    

    <author>nospam@example.com (rdircio)</author>
    <content:encoded>
    &lt;p&gt;You want to know if one of your nics is in the vlan you need it to be? Quite tedious if you want to do it manually.&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;check this small script to config the ip, ping and unconfig&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;em&gt;for i in 1 2 3 4 5 6 7 8 9 10 11;do set -x;ifconfig eth$i inet 10.203.102.102 netmask 255.255.254.0 up; ping -c 5 10.203.102.1; ifconfig eth$i down; done&lt;/em&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt; &lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 20 Aug 2010 09:35:54 -0500</pubDate>
    <guid isPermaLink="false">http://www.kraftek.com/blog/index.php?/archives/334-guid.html</guid>
    
</item>
<item>
    <title>Create LVM structures</title>
    <link>http://www.kraftek.com/blog/index.php?/archives/333-Create-LVM-structures.html</link>
            <category>Linux</category>
    
    <comments>http://www.kraftek.com/blog/index.php?/archives/333-Create-LVM-structures.html#comments</comments>
    <wfw:comment>http://www.kraftek.com/blog/wfwcomment.php?cid=333</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.kraftek.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=333</wfw:commentRss>
    

    <author>nospam@example.com (rdircio)</author>
    <content:encoded>
    &lt;p&gt;for eaach disk to include in a volume group, initialize it as a LVM disk:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;em&gt; pvcreate /dev/sdX&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;create a volume group with that disk:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;em&gt;vgcreate myvg&amp;#160; /dev/sdX&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Create a 20gb volume called &amp;quot;myvol&amp;quot; inside the &amp;quot;myvg&amp;quot; volume group:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;em&gt;lvcreate -L 20g -n myvol myvg&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Make a filesystem in the new volume: &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;em&gt;mkfs.ext3 /dev/mapper/myvg-myvol&lt;/em&gt; &lt;/p&gt; 
    </content:encoded>

    <pubDate>Fri, 06 Aug 2010 03:27:43 -0500</pubDate>
    <guid isPermaLink="false">http://www.kraftek.com/blog/index.php?/archives/333-guid.html</guid>
    
</item>
<item>
    <title>Adding udev rules</title>
    <link>http://www.kraftek.com/blog/index.php?/archives/331-Adding-udev-rules.html</link>
            <category>Linux</category>
    
    <comments>http://www.kraftek.com/blog/index.php?/archives/331-Adding-udev-rules.html#comments</comments>
    <wfw:comment>http://www.kraftek.com/blog/wfwcomment.php?cid=331</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.kraftek.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=331</wfw:commentRss>
    

    <author>nospam@example.com (rdircio)</author>
    <content:encoded>
    &lt;p&gt;I inspected all the devices i wanted to add to udev using &amp;quot;udevadm info&amp;quot; for each path i knew was the device i needed.&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;font size=&quot;1&quot;&gt;&lt;em&gt;udevadm info -a -p $(udevadm info -q path -n /dev/video1)&lt;br /&gt;udevadm info -a -p $(udevadm info -q path -n /dev/video0)&lt;br /&gt;udevadm info -a -p $(udevadm info -q path -n /dev/input/mouse1)&lt;br /&gt;udevadm info -a -p $(udevadm info -q path -n /dev/input/event1)&lt;br /&gt;udevadm info -a -p $(udevadm info -q path -n /dev/input/event2)&lt;br /&gt;udevadm info -a -p $(udevadm info -q path -n /dev/input/mouse2)&lt;/em&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;Then just created the udev file /etc/udev/rules.d/95-my.rules&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;&lt;em&gt;&lt;font size=&quot;1&quot;&gt;KERNEL==&amp;quot;video*&amp;quot;, SUBSYSTEM==&amp;quot;video4linux&amp;quot;, ATTR{name}==&amp;quot;saa7133*&amp;quot;, SYMLINK+=&amp;quot;tvcard&amp;quot;&lt;br /&gt;SUBSYSTEM==&amp;quot;video4linux&amp;quot;, ATTR{name}==&amp;quot;gspca main driver&amp;quot;, SYMLINK+=&amp;quot;geniuscam&amp;quot;&lt;br /&gt;KERNEL==&amp;quot;mouse*&amp;quot;, ATTRS{name}==&amp;quot;Microsoft Basic Optical Mouse&amp;quot;, SYMLINK+=&amp;quot;input/cecimouse&amp;quot;&lt;br /&gt;KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;AT Translated Set 2 keyboard&amp;quot;, SYMLINK+=&amp;quot;input/cecikb&amp;quot;&lt;br /&gt;KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;Logitech Logitech USB Keyboard&amp;quot;, SYMLINK+=&amp;quot;input/betokb&amp;quot;&lt;br /&gt;KERNEL==&amp;quot;mouse*&amp;quot;, ATTRS{name}==&amp;quot;USB Optical Mouse&amp;quot;, SYMLINK+=&amp;quot;input/betomouse&amp;quot;&lt;/font&gt;&lt;/em&gt;&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;
&lt;p&gt;reboot, and i get pretty aliases for all my devs :)&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 12 Jul 2010 17:38:55 -0500</pubDate>
    <guid isPermaLink="false">http://www.kraftek.com/blog/index.php?/archives/331-guid.html</guid>
    
</item>
<item>
    <title>Get asterisk music-on-hold live from an icecast+ices2 server </title>
    <link>http://www.kraftek.com/blog/index.php?/archives/330-Get-asterisk-music-on-hold-live-from-an-icecast+ices2-server.html</link>
            <category>Linux</category>
    
    <comments>http://www.kraftek.com/blog/index.php?/archives/330-Get-asterisk-music-on-hold-live-from-an-icecast+ices2-server.html#comments</comments>
    <wfw:comment>http://www.kraftek.com/blog/wfwcomment.php?cid=330</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.kraftek.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=330</wfw:commentRss>
    

    <author>nospam@example.com (rdircio)</author>
    <content:encoded>
    &lt;p&gt;My asterisk version is 1.6.2.6&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;My freepbx version is 2.7.0.1&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;To get music-on-hold from a live source, i made a script (/scripts/streamx.ksh):&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;font size=&quot;1&quot;&gt;&lt;em&gt;#!/bin/ksh&lt;br /&gt;/usr/bin/ogg123 -q -b 128 -p 32 -d wav -f - http://kraftek.com:8000/stream.ogg| sox -t wav - -r 8000 -c 1 -t raw - vol 0.10 &lt;/em&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;and configured /etc/asterisk/musiconhold_additional.ksh with:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;em&gt;&lt;font size=&quot;1&quot;&gt;[default]&lt;br /&gt;mode=custom&lt;br /&gt;application=/scripts/streamx.ksh&lt;/font&gt;&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;And that is it!, just dial a conference room and you&#039;ll get live music on hold while waiting for your friends to join :)&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 12 Jul 2010 13:19:34 -0500</pubDate>
    <guid isPermaLink="false">http://www.kraftek.com/blog/index.php?/archives/330-guid.html</guid>
    
</item>
<item>
    <title>See a live list of open connections to mysql</title>
    <link>http://www.kraftek.com/blog/index.php?/archives/329-See-a-live-list-of-open-connections-to-mysql.html</link>
            <category>Linux</category>
    
    <comments>http://www.kraftek.com/blog/index.php?/archives/329-See-a-live-list-of-open-connections-to-mysql.html#comments</comments>
    <wfw:comment>http://www.kraftek.com/blog/wfwcomment.php?cid=329</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.kraftek.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=329</wfw:commentRss>
    

    <author>nospam@example.com (rdircio)</author>
    <content:encoded>
    watch &#039;mysql -e &amp;quot;show processlist;&amp;quot;&#039; 
    </content:encoded>

    <pubDate>Tue, 06 Jul 2010 11:43:54 -0500</pubDate>
    <guid isPermaLink="false">http://www.kraftek.com/blog/index.php?/archives/329-guid.html</guid>
    
</item>

</channel>
</rss>