<?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>- rdircio</title>
	<atom:link href="http://kraftek.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://kraftek.com/blog</link>
	<description>Roberto Dircio - Solaris/Linux notes</description>
	<lastBuildDate>Sat, 19 May 2012 00:14:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Scan for disks in fiber channel adapters (hba,qlogic)</title>
		<link>http://kraftek.com/blog/2012/05/scan-for-disks-in-fiber-channel-adapters-hbaqlogic/</link>
		<comments>http://kraftek.com/blog/2012/05/scan-for-disks-in-fiber-channel-adapters-hbaqlogic/#comments</comments>
		<pubDate>Fri, 18 May 2012 21:36:33 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=696</guid>
		<description><![CDATA[ls /sys/class/fc_host/ &#124; while read h;do echo $h echo 1 &#62; /sys/class/fc_host/$h/issue_lip echo &#8220;- &#8211; -&#8221; &#62; /sys/class/scsi_host/$h/scan done]]></description>
			<content:encoded><![CDATA[<p>ls /sys/class/fc_host/ | while read h;do<br />
echo $h<br />
echo 1 &gt; /sys/class/fc_host/$h/issue_lip<br />
echo &#8220;- &#8211; -&#8221; &gt; /sys/class/scsi_host/$h/scan<br />
done</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/scan-for-disks-in-fiber-channel-adapters-hbaqlogic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oncall rotation bash script</title>
		<link>http://kraftek.com/blog/2012/05/oncall-rotation-bash-script/</link>
		<comments>http://kraftek.com/blog/2012/05/oncall-rotation-bash-script/#comments</comments>
		<pubDate>Fri, 18 May 2012 07:18:46 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=694</guid>
		<description><![CDATA[We have a formula for shifts and a list of people, we need to fill a calendar with them. These are the iterations for each week &#8220;formula.txt&#8221;, each row is a week, the first value is the iteration number, the other 4 values in the row are the number for a team member, these iterations [...]]]></description>
			<content:encoded><![CDATA[<p>We have a formula for shifts and a list of people, we need to fill a calendar with them.</p>
<p>These are the iterations for each week &#8220;formula.txt&#8221;, each row is a week, the first value is the iteration number, the other 4 values in the row are the number for a team member, these iterations are the sequence of combinations so that people are not oncall too frequently:</p>
<p style="padding-left: 30px;">1 1 2 3 4<br />
2 5 6 7 8<br />
3 4 3 2 1<br />
4 8 7 6 5<br />
5 2 1 4 3<br />
6 6 5 8 7<br />
7 3 4 1 2<br />
8 7 8 5 6</p>
<p>the numbers for the team members are in &#8220;roster.txt&#8221;:</p>
<p style="padding-left: 30px;">1 FFlinstone    XXJA01<br />
2 Jdoe    XXJD02<br />
3 OOsbourne    XXHR01<br />
4 AHitchcock    XXDD02<br />
5 ARose    XXAW04<br />
6 EAPoe    XXFP01<br />
7 ACooper    XXBC06<br />
8 BJovi    XXSL01</p>
<p>this is &#8220;oncall.ksh&#8221;</p>
<p style="padding-left: 30px;">#!/bin/bash</p>
<p>start_date=20120604<br />
end_date=20120902<br />
formula_current_row=5</p>
<p>formula_rows=8</p>
<p>get_roster()<br />
{<br />
for p in `grep ^$1 formula.txt | awk &#8216;{ print $2&#8243; &#8220;$3&#8243; &#8220;$4&#8243; &#8220;$5 }&#8217;`;do<br />
echo -n &#8220;`grep ^$p roster.txt|awk &#8216;{ print $3&#8243; &#8221; }&#8217;`&#8221;<br />
done<br />
echo &#8220;&#8221;<br />
}</p>
<p>get_weekend_roster()<br />
{<br />
for p in `grep ^$1 formula.txt | awk &#8216;{ print $2&#8243; &#8220;$3&#8243; &#8220;$2&#8243; &#8220;$3 }&#8217;`;do<br />
echo -n &#8220;`grep ^$p roster.txt|awk &#8216;{ print $3&#8243; &#8221; }&#8217;`&#8221;<br />
done<br />
echo &#8220;&#8221;<br />
}</p>
<p>get_oncall()<br />
{<br />
tmpw=0<br />
W=`date -d &#8220;$start_date $tmpw day&#8221; +&#8221;%W&#8221;`<br />
for ((tmpw = 0; $(date -d &#8220;$start_date $tmpw day&#8221; +%s) &lt;= $(date -d &#8220;$end_date&#8221; +%s); tmpw += 1))<br />
do<br />
P=$W<br />
W=`date -d &#8220;$start_date $tmpw day&#8221; +&#8221;%W&#8221;`<br />
if [ "$P" != "$W" ];then<br />
let formula_current_row+=1<br />
if [ $formula_current_row -gt $formula_rows ];then<br />
formula_current_row=1<br />
fi<br />
fi<br />
D=`date -d &#8220;$start_date $tmpw day&#8221; +&#8221;%Y-%m-%d  %a%t&#8221;`<br />
ISWEEKEND=`echo $D|egrep -i &#8216;sat|sun&#8217;|wc -l`<br />
echo -n &#8220;$D &#8221;<br />
if [ $ISWEEKEND -gt 0 ];then<br />
get_weekend_roster $formula_current_row<br />
else<br />
get_roster $formula_current_row<br />
fi<br />
done<br />
}</p>
<p>generate_sql()<br />
{<br />
echo &#8220;use OnCall;&#8221;<br />
get_oncall | while read l;do<br />
ISWEEKEND=`echo $l|egrep -i &#8216;sat|sun&#8217;|wc -l`<br />
if [ $ISWEEKEND -gt 0 ];then<br />
echo $l | awk &#8216;{ print &#8220;insert into Detail (Date,Shift_C1_Pri,Shift_C1_Sec) values (\&#8221;"$1&#8243;\&#8221;,\&#8221;"$3&#8243;\&#8221;,\&#8221;"$4&#8243;\&#8221;) on DUPLICATE KEY UPDATE Shift_C1_Pri=\&#8221;"$3&#8243;\&#8221;,Shift_C1_Sec=\&#8221;"$4&#8243;\&#8221;;&#8221; }&#8217;<br />
else<br />
echo $l | awk &#8216;{ print &#8220;insert into Detail (Date,Shift_A1_Pri,Shift_A1_Sec,Shift_A2_Pri,Shift_A2_Sec) values (\&#8221;"$1&#8243;\&#8221;,\&#8221;"$3&#8243;\&#8221;,\&#8221;"$4&#8243;\&#8221;,\&#8221;"$5&#8243;\&#8221;,\&#8221;"$6&#8243;\&#8221;) on DUPLICATE KEY UPDATE Shift_A1_Pri=\&#8221;"$3&#8243;\&#8221;,Shift_A1_Sec=\&#8221;"$4&#8243;\&#8221;,Shift_A2_Pri=\&#8221;"$5&#8243;\&#8221;,Shift_A2_Sec=\&#8221;"$6&#8243;\&#8221;;&#8221; }&#8217;<br />
fi<br />
done<br />
}</p>
<p>get_oncall<br />
generate_sql &gt; from_${start_date}_to_${end_date}.sql</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/oncall-rotation-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TSM logs</title>
		<link>http://kraftek.com/blog/2012/05/tsm-logs/</link>
		<comments>http://kraftek.com/blog/2012/05/tsm-logs/#comments</comments>
		<pubDate>Fri, 18 May 2012 00:45:29 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=690</guid>
		<description><![CDATA[Again another basic tivoli thing… in solaris TSM logs are at: /var/tivoli]]></description>
			<content:encoded><![CDATA[<p>Again another basic tivoli thing… in solaris TSM logs are at:<br />
/var/tivoli</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/tsm-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using dlpiping to test an llt link on a veritas cluster</title>
		<link>http://kraftek.com/blog/2012/05/using-dlpiping-to-test-an-llt-link-on-a-veritas-cluster/</link>
		<comments>http://kraftek.com/blog/2012/05/using-dlpiping-to-test-an-llt-link-on-a-veritas-cluster/#comments</comments>
		<pubDate>Thu, 17 May 2012 22:54:45 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=687</guid>
		<description><![CDATA[if an llt link shows down, you can always inject some traffic through the wire and see if you can catch it on the other side. We first, on one side of the cluster find out the mac address of our interface, then start a “dlpiping server” process on it. # /opt/VRTSllt/getmac /dev/ce:0 /dev/ce:0 08:00:10:A7:1E:DC [...]]]></description>
			<content:encoded><![CDATA[<p>if an llt link shows down, you can always inject some traffic through the wire and see if you can catch it on the other side.<br />
We first, on one side of the cluster find out the mac address of our interface, then start a “dlpiping server”<br />
process on it.<br />
# /opt/VRTSllt/getmac /dev/ce:0<br />
/dev/ce:0 08:00:10:A7:1E:DC<br />
# /opt/VRTSllt/dlpiping -s /dev/ce:0<br />
Now, on the other side of the link, on the other server, we query for the mac address in the wire.<br />
# /opt/VRTSllt/dlpiping -c /dev/ce:0 08:00:10:A7:1E:DC<br />
08:00:10:A7:1E:DC is alive<br />
if it says that the mac is alive then we have a good link.</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/using-dlpiping-to-test-an-llt-link-on-a-veritas-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux multipath entries for EMC arrays</title>
		<link>http://kraftek.com/blog/2012/05/linux-multipath-entries-for-emc-arrays/</link>
		<comments>http://kraftek.com/blog/2012/05/linux-multipath-entries-for-emc-arrays/#comments</comments>
		<pubDate>Thu, 17 May 2012 17:26:30 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=685</guid>
		<description><![CDATA[add this to your /etc/multipath.conf: devices { ## Device attributes for EMC SYMMETRIX device { vendor "EMC " product "SYMMETRIX" path_grouping_policy multibus getuid_callout "/sbin/scsi_id -g -u -s /block/%n" path_selector "round-robin 0" features "0" hardware_handler "0" failback immediate } ## Device attributes for EMC CLARiiON device { vendor "DGC" product "*" path_grouping_policy group_by_prio getuid_callout "/sbin/scsi_id -g [...]]]></description>
			<content:encoded><![CDATA[<p>add this to your /etc/multipath.conf:</p>
<pre>devices {
## Device attributes for EMC SYMMETRIX
device {
vendor "EMC "
product "SYMMETRIX"
path_grouping_policy multibus
getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
path_selector "round-robin 0"
features "0"
hardware_handler "0"
failback immediate
}
## Device attributes for EMC CLARiiON
device {
vendor "DGC"
product "*"
path_grouping_policy group_by_prio
getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
prio_callout "/sbin/mpath_prio_emc /dev/%n"
hardware_handler "1 emc"
features "1 queue_if_no_path"
no_path_retry 300
path_checker emc_clariion
failback immediate
}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/linux-multipath-entries-for-emc-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh version</title>
		<link>http://kraftek.com/blog/2012/05/ssh-version/</link>
		<comments>http://kraftek.com/blog/2012/05/ssh-version/#comments</comments>
		<pubDate>Thu, 17 May 2012 14:39:52 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=682</guid>
		<description><![CDATA[use: ssh -V]]></description>
			<content:encoded><![CDATA[<p>use:</p>
<p>ssh -V</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/ssh-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>find wwns/wwpns in solaris 10 with fcinfo</title>
		<link>http://kraftek.com/blog/2012/05/find-wwnswwpns-in-solaris-10-with-fcinfo/</link>
		<comments>http://kraftek.com/blog/2012/05/find-wwnswwpns-in-solaris-10-with-fcinfo/#comments</comments>
		<pubDate>Tue, 15 May 2012 04:08:53 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=679</guid>
		<description><![CDATA[fcinfo hba-port &#124; grep -i &#8216;port wwn&#8217;]]></description>
			<content:encoded><![CDATA[<p>fcinfo hba-port | grep -i &#8216;port wwn&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/find-wwnswwpns-in-solaris-10-with-fcinfo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>save captured packets using snoop</title>
		<link>http://kraftek.com/blog/2012/05/save-captured-packets-using-snoop/</link>
		<comments>http://kraftek.com/blog/2012/05/save-captured-packets-using-snoop/#comments</comments>
		<pubDate>Thu, 10 May 2012 09:44:34 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=670</guid>
		<description><![CDATA[to capture all packets to and from &#8220;192.168.5.182&#8243; and save the conversation in &#8220;snoopy.log&#8221; snoop -d e1000g2 -o snoopy.log -v 192.168.5.182 to view the output snoop -vi snoopy.log]]></description>
			<content:encoded><![CDATA[<p>to capture all packets to and from &#8220;192.168.5.182&#8243; and save the conversation in &#8220;snoopy.log&#8221;</p>
<p><em>snoop -d e1000g2 -o snoopy.log -v 192.168.5.182</em></p>
<p>to view the output</p>
<p><em>snoop -vi snoopy.log</em></p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/save-captured-packets-using-snoop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>get system serial number with ipmitool</title>
		<link>http://kraftek.com/blog/2012/05/get-system-serial-number-with-ipmitool/</link>
		<comments>http://kraftek.com/blog/2012/05/get-system-serial-number-with-ipmitool/#comments</comments>
		<pubDate>Fri, 04 May 2012 13:44:11 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=667</guid>
		<description><![CDATA[ipmitool sunoem getval /SYS/product_serial_number]]></description>
			<content:encoded><![CDATA[<p>ipmitool sunoem getval /SYS/product_serial_number</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/get-system-serial-number-with-ipmitool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>test link in solaris 10 nics</title>
		<link>http://kraftek.com/blog/2012/05/test-link-in-solaris-10-nics/</link>
		<comments>http://kraftek.com/blog/2012/05/test-link-in-solaris-10-nics/#comments</comments>
		<pubDate>Fri, 04 May 2012 03:53:11 +0000</pubDate>
		<dc:creator>rdircio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kraftek.com/blog/?p=665</guid>
		<description><![CDATA[You need to plumb them to see if they have link, so x=20;dladm show-dev&#124; awk &#8216;{ print $1 }&#8217;  &#124; while read i;do ifconfig $i plumb;((x++)) ;ifconfig $i 100.100.100.$x/24 broadcast + up;done;dladm-show-dev]]></description>
			<content:encoded><![CDATA[<p>You need to plumb them to see if they have link, so</p>
<p>x=20;dladm show-dev| awk &#8216;{ print $1 }&#8217;  | while read i;do ifconfig $i plumb;((x++)) ;ifconfig $i 100.100.100.$x/24 broadcast + up;done;dladm-show-dev</p>
]]></content:encoded>
			<wfw:commentRss>http://kraftek.com/blog/2012/05/test-link-in-solaris-10-nics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

