<?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: ioscan format in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417113#M353922</link>
    <description>Thanks Duncan,&lt;BR /&gt;&lt;BR /&gt;I agree. I have tried COLUMNS=80 &amp;amp; COLUMNS=100, and the output shows different. So, for the timebeing I have added this variable in the script and slightly adjusted the fields in awk. So, it is working, but not sure howlong. Because it is being working for sometime and then broken, fixed,broken... So, will keep quiet now until it breaks next time.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Shahul</description>
    <pubDate>Mon, 11 May 2009 12:29:27 GMT</pubDate>
    <dc:creator>Shahul</dc:creator>
    <dc:date>2009-05-11T12:29:27Z</dc:date>
    <item>
      <title>ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417104#M353913</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am doing #ioscan -funC tape on my server, and I get the following output.&lt;BR /&gt;&lt;BR /&gt;Class     I  H/W Path       Driver   S/W State   H/W Type     Description&lt;BR /&gt;==========================================================================&lt;BR /&gt;tape     39  0/2/0/0.22.0.255.0.6.0   atdd     CLAIMED     DEVICE       IBM     ULT3580-TD3&lt;BR /&gt;                           /dev/rmt/39m             /dev/rmt/39mnb           /dev/rmt/c151t6d0BESTn &lt;BR /&gt;                           /dev/rmt/39mb            /dev/rmt/c151t6d0BEST    /dev/rmt/c151t6d0BESTnb&lt;BR /&gt;                           /dev/rmt/39mn            /dev/rmt/c151t6d0BESTb &lt;BR /&gt;tape     46  0/2/0/0.22.0.255.0.7.0   atdd     CLAIMED     DEVICE       IBM     ULT3580-TD3&lt;BR /&gt;                           /dev/rmt/46m             /dev/rmt/46mnb           /dev/rmt/c151t7d0BESTn &lt;BR /&gt;                           /dev/rmt/46mb            /dev/rmt/c151t7d0BEST    /dev/rmt/c151t7d0BESTnb&lt;BR /&gt;                           /dev/rmt/46mn            /dev/rmt/c151t7d0BESTb &lt;BR /&gt;tape     27  0/2/0/0.22.0.255.1.0.0   atdd     CLAIMED     DEVICE       IBM     ULT3580-TD3&lt;BR /&gt;                           /dev/rmt/27m             /dev/rmt/27mnb           /dev/rmt/c152t0d0BESTn &lt;BR /&gt;                           /dev/rmt/27mb            /dev/rmt/c152t0d0BEST    /dev/rmt/c152t0d0BESTnb&lt;BR /&gt;                           /dev/rmt/27mn            /dev/rmt/c152t0d0BESTb &lt;BR /&gt;tape     37  0/2/0/0.22.0.255.1.1.0   atdd     CLAIMED     DEVICE       IBM     ULT3580-TD3&lt;BR /&gt;                           /dev/rmt/37m             /dev/rmt/37mnb           /dev/rmt/c152t1d0BESTn &lt;BR /&gt;                           /dev/rmt/37mb            /dev/rmt/c152t1d0BEST    /dev/rmt/c152t1d0BESTnb&lt;BR /&gt;                           /dev/rmt/37mn            /dev/rmt/c152t1d0BESTb &lt;BR /&gt;tape     38  0/5/0/0.22.0.255.0.10.0  atdd     CLAIMED     DEVICE       IBM     ULT3580-TD3&lt;BR /&gt;                           /dev/rmt/38m              /dev/rmt/c150t10d0BEST  &lt;BR /&gt;                           /dev/rmt/38mb             /dev/rmt/c150t10d0BESTb &lt;BR /&gt;                           /dev/rmt/38mn             /dev/rmt/c150t10d0BESTn &lt;BR /&gt;                           /dev/rmt/38mnb            /dev/rmt/c150t10d0BESTnb&lt;BR /&gt;tape     44  0/5/0/0.22.0.255.0.11.0  atdd     SCAN        DEVICE       IBM     ULT3580-TD3&lt;BR /&gt;                           /dev/rmt/44m              /dev/rmt/c150t11d0BEST  &lt;BR /&gt;                           /dev/rmt/44mb             /dev/rmt/c150t11d0BESTb &lt;BR /&gt;                           /dev/rmt/44mn             /dev/rmt/c150t11d0BESTn &lt;BR /&gt;                           /dev/rmt/44mnb            /dev/rmt/c150t11d0BESTnb&lt;BR /&gt;&lt;BR /&gt;You can see here, some of the dvices have 3 columns of device files and some has two columns. And this behaviour is not persistent, it changes. Sometimes, all of them listed in 3 columns. Because of this inconsistency, my scripts are picking wrong fields. Could someone tell me how can I make sure ioscan lists devices in same format each time?</description>
      <pubDate>Mon, 11 May 2009 08:19:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417104#M353913</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2009-05-11T08:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417105#M353914</link>
      <description>As the ioscan list removed all the tabs here, I will clarify that, last two tape devices has two columns of device files and all the rest have 3 columns.</description>
      <pubDate>Mon, 11 May 2009 08:21:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417105#M353914</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2009-05-11T08:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417106#M353915</link>
      <description>Hi,&lt;BR /&gt;&amp;gt;&amp;gt;my scripts are picking wrong fields.&lt;BR /&gt;&lt;BR /&gt;Can you let me know which fields you are picking from your script.&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Mon, 11 May 2009 08:25:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417106#M353915</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-05-11T08:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417107#M353916</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;FDor example, if you take first TWO devices, I need to pick something like this.&lt;BR /&gt;&lt;BR /&gt;39mnb   151   6  0&lt;BR /&gt;46mnb   151   7  0&lt;BR /&gt;&lt;BR /&gt;See, I can get around the problem by grepping and filtering,etc from ioscan output. But it will be easy, if ioscan lists all tape devices in same format everytime. I can't see a reason why ioscan should list differently, because all tape devices have got same number of devices, same sort of FC paths. May be something to do with the terminal window size, but probably there is a way to fix that.</description>
      <pubDate>Mon, 11 May 2009 08:33:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417107#M353916</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2009-05-11T08:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417108#M353917</link>
      <description>I doubt its down to terminal window sizes, as if you are using it in a shell pipeline, the stdout of ioscan isn't attached to a terminal anyway. More likely down to some fixed width calculations in ioscan - note that last two entries in the example you have have a slightly longer length - this probably means that the text formatter on the output for ioscan determines there isn't enough space to fit in another column.&lt;BR /&gt;&lt;BR /&gt;I guess one of our awk or perl gurus should be ablt to give you a method of getting this output 100% consistent (maybe just one device file per line?)&lt;BR /&gt;&lt;BR /&gt;However, what about approaching the problem from a different direction:&lt;BR /&gt;&lt;BR /&gt;lssf /dev/rmt/*mnb | grep -v '???' &lt;BR /&gt;&lt;BR /&gt;will give you a list of valid devices and hardware paths for the /dev/rmt/Xmnb devices, and:&lt;BR /&gt;&lt;BR /&gt;lssf /dev/rmt/c*t*d*BESTnb | grep -v '???' &lt;BR /&gt;&lt;BR /&gt;will get you a similar list - now you just need to compare hardware paths between the 2 outputs to match up. The output of lssf is much more consistent.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;BR /&gt;</description>
      <pubDate>Mon, 11 May 2009 08:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417108#M353917</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2009-05-11T08:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417109#M353918</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is the script&lt;BR /&gt;&lt;BR /&gt;ioscan -fnC tape &amp;gt;/tmp/data&lt;BR /&gt;awk '{if (substr($0,13,2)==" /")&lt;BR /&gt;      {&lt;BR /&gt;       a=substr($0,23,5)&lt;BR /&gt;       b=substr($0,39,3)&lt;BR /&gt;       c=substr($0,43,1)&lt;BR /&gt;       print a" "b" "c&lt;BR /&gt;       }&lt;BR /&gt;     }'&lt;BR /&gt;copy this lines into a file &lt;BR /&gt;sh myfile&lt;BR /&gt;&lt;BR /&gt;39mnb 151 6&lt;BR /&gt;46mnb 151 7&lt;BR /&gt;27mnb 152 0&lt;BR /&gt;37mnb 152 1&lt;BR /&gt;&lt;BR /&gt;Suraj&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 May 2009 09:01:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417109#M353918</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-05-11T09:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417110#M353919</link>
      <description>Hi,&lt;BR /&gt;Forget to print the last 0 as said by you last field be always 0 (Zero)&lt;BR /&gt;&lt;BR /&gt;Insted of this line&lt;BR /&gt;print a" "b" "c&lt;BR /&gt;&lt;BR /&gt;use this line&lt;BR /&gt;print a" "b" "c" "0&lt;BR /&gt;&lt;BR /&gt;output will be&lt;BR /&gt;39mnb 151 6 0&lt;BR /&gt;46mnb 151 7 0&lt;BR /&gt;27mnb 152 0 0&lt;BR /&gt;37mnb 152 1 0&lt;BR /&gt;&lt;BR /&gt;Suraj&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 May 2009 09:06:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417110#M353919</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-05-11T09:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417111#M353920</link>
      <description>Hi Suraj,&lt;BR /&gt;&lt;BR /&gt;I have tried that, didn't work. if I read it correctly, Your script is again depends on the charecter positions in ioscan output and the number of charecters on the output. If that is the case it doesn't work, because ioscan output changes each time. for eg. I have ran an #ioscan -funC tape now, it is showing all the devices in 3 columns. My logic is working when all the devices are listed in 3 columns, it breaks when the format changes.&lt;BR /&gt;&lt;BR /&gt;awk '{if ($0~/tape/){gsub(/\./," ");id1=$8; id2=$9;} else if($0~/mnb/){gsub(/\//," ");sub(/c/,"");sub(/t[0-9]/," ");print $6, $9, id1, id2}}'&lt;BR /&gt;&lt;BR /&gt;I am really looking for why ioscan shows one format in the morning, another format in the afternoon.&lt;BR /&gt;&lt;BR /&gt;TIA &lt;BR /&gt;Shahul</description>
      <pubDate>Mon, 11 May 2009 11:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417111#M353920</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2009-05-11T11:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417112#M353921</link>
      <description>ok, I take it back - ioscan *does* pay attention to terminal settings!&lt;BR /&gt;&lt;BR /&gt;Some quick playing around showed that if you adjust the COLUMNS environment variable, it changes the output of ioscan.&lt;BR /&gt;&lt;BR /&gt;So try running:&lt;BR /&gt;&lt;BR /&gt;export COLUMNS=4096&lt;BR /&gt;ioscan -funC tape&lt;BR /&gt;&lt;BR /&gt;Rememeber to reset COLUMNS appropriately after the ioscan is run.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Mon, 11 May 2009 12:23:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417112#M353921</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2009-05-11T12:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417113#M353922</link>
      <description>Thanks Duncan,&lt;BR /&gt;&lt;BR /&gt;I agree. I have tried COLUMNS=80 &amp;amp; COLUMNS=100, and the output shows different. So, for the timebeing I have added this variable in the script and slightly adjusted the fields in awk. So, it is working, but not sure howlong. Because it is being working for sometime and then broken, fixed,broken... So, will keep quiet now until it breaks next time.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Shahul</description>
      <pubDate>Mon, 11 May 2009 12:29:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417113#M353922</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2009-05-11T12:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417114#M353923</link>
      <description>why don't you use the "compact" format option.  It produces fields delimited by ":" and no extraneous spaces.  I'd think think that'd be easier to reliably parse.....&lt;BR /&gt;&lt;BR /&gt;something like "ioscan -FunC tape"????</description>
      <pubDate>Mon, 11 May 2009 17:20:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417114#M353923</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-05-11T17:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417115#M353924</link>
      <description>OldSchool,&lt;BR /&gt;&lt;BR /&gt;Probably cos the lines he's interested in aren't effected by the "-F" option - that does compact all the output *except* for the device file information, which is still displayed on seperate lines&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 May 2009 18:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417115#M353924</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2009-05-11T18:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: ioscan format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417116#M353925</link>
      <description>Duncan: "compact all the output *except* for the device file information"&lt;BR /&gt;&lt;BR /&gt;ahh..wasn't aware of that....should've looked..thanks for the info</description>
      <pubDate>Mon, 11 May 2009 19:24:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioscan-format/m-p/4417116#M353925</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-05-11T19:24:36Z</dc:date>
    </item>
  </channel>
</rss>

