<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Show disk ioscan in one line in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887087#M96689</link>
    <description>Hi (again) Nash:&lt;BR /&gt;&lt;BR /&gt;Output using awk uses a space as the default field separator.  Hence:&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3"|awk '{print $1" "$2" "$3}'&lt;BR /&gt;&lt;BR /&gt;...is better written as:&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3"|awk '{print $1,$2,$3}'&lt;BR /&gt;&lt;BR /&gt;The comma indictes the interposition of the output separator.&lt;BR /&gt;&lt;BR /&gt;You can change the default space separtor to any character you need by setting the OFS value like this:&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3"|awk 'BEGIN{OFS="."};{print $1,$2,$3}'&lt;BR /&gt;&lt;BR /&gt;...which produces the output:&lt;BR /&gt;&lt;BR /&gt;1.2.3&lt;BR /&gt;&lt;BR /&gt;A free, very nice tutorial to 'awk' can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/gawk/manual/gawk.html" target="_blank"&gt;http://www.gnu.org/software/gawk/manual/gawk.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Thu, 26 Oct 2006 08:07:36 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-10-26T08:07:36Z</dc:date>
    <item>
      <title>Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887081#M96683</link>
      <description>I am trying to get ioscan output for disk to be shown in one line. &lt;BR /&gt;&lt;BR /&gt;So far I managed to do as below and include it in my script.&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/ioscan -fnCdisk |grep -v "Class" |/usr/bin/awk '{print $1" "$5" "$6" "$7" "$8" "$2" "$3" "$4"="}'|/usr/bin/sed -e :a -e '/sdisk=/N; s/sdisk=\n//; ta' |/usr/bin/awk '{print $1":"$2":"$3":"$4":"$5":"$6":"$7":"$8":"$9}' |grep -v "="&lt;BR /&gt;&lt;BR /&gt;However, this wont work if there is no device file for the hardware.&lt;BR /&gt;&lt;BR /&gt;Anyone has a better solution?&lt;BR /&gt;Thanks.&lt;BR /&gt;Nash</description>
      <pubDate>Thu, 26 Oct 2006 06:53:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887081#M96683</guid>
      <dc:creator>nz_1</dc:creator>
      <dc:date>2006-10-26T06:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887082#M96684</link>
      <description>I use the attached.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 26 Oct 2006 06:59:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887082#M96684</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-10-26T06:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887083#M96685</link>
      <description>Hi Nash:&lt;BR /&gt;&lt;BR /&gt;When parsing the output of 'ioscan', using its '-F' option to produce colon-delimited fields eases the burden, particularly since missing fields are bounded by consecutive colons.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 26 Oct 2006 06:59:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887083#M96685</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-10-26T06:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887084#M96686</link>
      <description>Hi James&lt;BR /&gt;&lt;BR /&gt;Yes, -F option eases the burden but the the device files are still shown in a separate line.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 26 Oct 2006 07:05:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887084#M96686</guid>
      <dc:creator>nz_1</dc:creator>
      <dc:date>2006-10-26T07:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887085#M96687</link>
      <description>Hi Pete&lt;BR /&gt;&lt;BR /&gt;I will find myself an awk book.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;p.s. Next task - combine vgdisplay, diskinfo and ioscan</description>
      <pubDate>Thu, 26 Oct 2006 07:08:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887085#M96687</guid>
      <dc:creator>nz_1</dc:creator>
      <dc:date>2006-10-26T07:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887086#M96688</link>
      <description>&lt;!--!*#--&gt;I'm not sure what sort of output you desire.&lt;BR /&gt;But extracting the disks' paths is quite simple (piped to head for brevity)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;$ /usr/sbin/ioscan -kFdsdisk|awk -F: '/CLAIMED/&amp;amp;&amp;amp;!/DVD|CD|SUBDISK/{print$11}'|head&lt;BR /&gt;0/0/1/1.2.0&lt;BR /&gt;0/0/2/0.0.0&lt;BR /&gt;0/0/2/0.2.0&lt;BR /&gt;0/10/0/0.107.21.19.0.0.0&lt;BR /&gt;0/10/0/0.107.21.19.0.0.1&lt;BR /&gt;0/10/0/0.107.21.19.0.0.2&lt;BR /&gt;0/10/0/0.107.21.19.0.0.3&lt;BR /&gt;0/10/0/0.107.21.19.0.0.4&lt;BR /&gt;0/10/0/0.107.21.19.0.0.5&lt;BR /&gt;0/10/0/0.107.21.19.0.0.6&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Oct 2006 07:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887086#M96688</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-10-26T07:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887087#M96689</link>
      <description>Hi (again) Nash:&lt;BR /&gt;&lt;BR /&gt;Output using awk uses a space as the default field separator.  Hence:&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3"|awk '{print $1" "$2" "$3}'&lt;BR /&gt;&lt;BR /&gt;...is better written as:&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3"|awk '{print $1,$2,$3}'&lt;BR /&gt;&lt;BR /&gt;The comma indictes the interposition of the output separator.&lt;BR /&gt;&lt;BR /&gt;You can change the default space separtor to any character you need by setting the OFS value like this:&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3"|awk 'BEGIN{OFS="."};{print $1,$2,$3}'&lt;BR /&gt;&lt;BR /&gt;...which produces the output:&lt;BR /&gt;&lt;BR /&gt;1.2.3&lt;BR /&gt;&lt;BR /&gt;A free, very nice tutorial to 'awk' can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/gawk/manual/gawk.html" target="_blank"&gt;http://www.gnu.org/software/gawk/manual/gawk.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 26 Oct 2006 08:07:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887087#M96689</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-10-26T08:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887088#M96690</link>
      <description>&lt;!--!*#--&gt;If you need to convert the HW paths of the disks which are easily retreivable through ioscan's -F switch, as shown above, I am afraid you need to do a little scripting.&lt;BR /&gt;The controller or card No. (well the digits after the c in /dev/dsk/c?t?d?) can be taken from the instance Nos. that ext_bus class like&lt;BR /&gt; &lt;BR /&gt;$ /usr/sbin/ioscan -kFCext_bus|awk -F: '$10~/fcparray|c720/{printf"%2d %s\n",$13,$11}'&lt;BR /&gt; 0 0/0/1/0&lt;BR /&gt; 1 0/0/1/1&lt;BR /&gt; 2 0/0/2/0&lt;BR /&gt; 3 0/0/2/1&lt;BR /&gt;11 0/10/0/0.107.21.19.0&lt;BR /&gt; 4 0/12/0/0.117.6.19.0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The target and device or lun part is simply the last to period delimited digits of the disk paths' from my first posting.&lt;BR /&gt; &lt;BR /&gt;But don't despair, the Solaris device tree even sucks more ;-)&lt;BR /&gt;  &lt;BR /&gt;HTH</description>
      <pubDate>Thu, 26 Oct 2006 08:15:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887088#M96690</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-10-26T08:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Show disk ioscan in one line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887089#M96691</link>
      <description>Thank you all for the feedback. Here is my primitive script.&lt;BR /&gt;Nash</description>
      <pubDate>Mon, 27 Nov 2006 20:03:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/show-disk-ioscan-in-one-line/m-p/3887089#M96691</guid>
      <dc:creator>nz_1</dc:creator>
      <dc:date>2006-11-27T20:03:01Z</dc:date>
    </item>
  </channel>
</rss>

