<?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: Hex Conversion in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438970#M206985</link>
    <description>0x1f006000 - The 0x indicates that is a hex no.&lt;BR /&gt;&lt;BR /&gt;The simplest way to know which is associated device&lt;BR /&gt;ll /dev/dsk/* | grep 006000&lt;BR /&gt;&lt;BR /&gt;Else, decode it as follows.&lt;BR /&gt;1f - printf "%d\n" 0x1f&lt;BR /&gt;will give 31&lt;BR /&gt;/usr/sbin/lsdev -b 31&lt;BR /&gt;    Character     Block       Driver          Class&lt;BR /&gt;      188          31         sdisk           disk&lt;BR /&gt;&lt;BR /&gt;This is a disk device&lt;BR /&gt;00600&lt;BR /&gt;c0t6d0&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Anil</description>
    <pubDate>Wed, 08 Dec 2004 08:43:40 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2004-12-08T08:43:40Z</dc:date>
    <item>
      <title>Hex Conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438967#M206982</link>
      <description>Can someone tell me how to convert this ?&lt;BR /&gt;&lt;BR /&gt;(device 0x1f006000)&lt;BR /&gt;&lt;BR /&gt;Is this in hex?&lt;BR /&gt;How do I convert it, I've been out of school for quite a while.</description>
      <pubDate>Wed, 08 Dec 2004 08:20:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438967#M206982</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2004-12-08T08:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hex Conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438968#M206983</link>
      <description>I have syslog filling with failed disk messages:&lt;BR /&gt;&lt;BR /&gt;vmunix: LVM: Recovered Path (device 0x1f006000) to PV 0 in VG 0.&lt;BR /&gt;Dec  8 08:27:19 ihshp4 vmunix: SCSI: Write error -- dev: b 31 0x006000, errno: 126, resid: 1024,&lt;BR /&gt;Dec  8 08:27:18 ihshp4 vmunix: LVM: Recovered Path (device 0x1f006000) to PV 0 in VG 0.&lt;BR /&gt;Dec  8 08:27:19 ihshp4 vmunix:  blkno: 3191299, sectno: 6382598, offset: -1027077120, bcount: 1024.&lt;BR /&gt;Dec  8 08:27:18 ihshp4 vmunix: LVM: Restored PV 0 to VG 0.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Dec 2004 08:27:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438968#M206983</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2004-12-08T08:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hex Conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438969#M206984</link>
      <description>Convert to what? I assume decimal?&lt;BR /&gt;In that case just do:&lt;BR /&gt;&lt;BR /&gt;0*16^0 + 0*16^1 + 0*16^2 + 6*16^3 + 0*16^4 + 0*16^5 + 15*16^6 + 1*16^7&lt;BR /&gt;&lt;BR /&gt;/Oskar&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Dec 2004 08:33:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438969#M206984</guid>
      <dc:creator>Oskar Ahner</dc:creator>
      <dc:date>2004-12-08T08:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hex Conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438970#M206985</link>
      <description>0x1f006000 - The 0x indicates that is a hex no.&lt;BR /&gt;&lt;BR /&gt;The simplest way to know which is associated device&lt;BR /&gt;ll /dev/dsk/* | grep 006000&lt;BR /&gt;&lt;BR /&gt;Else, decode it as follows.&lt;BR /&gt;1f - printf "%d\n" 0x1f&lt;BR /&gt;will give 31&lt;BR /&gt;/usr/sbin/lsdev -b 31&lt;BR /&gt;    Character     Block       Driver          Class&lt;BR /&gt;      188          31         sdisk           disk&lt;BR /&gt;&lt;BR /&gt;This is a disk device&lt;BR /&gt;00600&lt;BR /&gt;c0t6d0&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 08 Dec 2004 08:43:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438970#M206985</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-12-08T08:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hex Conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438971#M206986</link>
      <description>#!/bin/ksh&lt;BR /&gt;#convert the 8 character hex input string to decimal and output in device name format of c#t#d#&lt;BR /&gt;#found this in the HP itrc, usefull for decoding dmesg and syslog error entries&lt;BR /&gt;#sample use:&lt;BR /&gt;# scsi_decoder a12b3c44&lt;BR /&gt;# This translates to c43t3d12&lt;BR /&gt;&lt;BR /&gt;Z=$1 #save input argument to $Z&lt;BR /&gt;&lt;BR /&gt;#translate $Z to all upper case and save in $I&lt;BR /&gt;I=`echo $Z|tr '[a-z]' '[A-Z]'`&lt;BR /&gt;&lt;BR /&gt;#get the length of the string in characters and save in $LENGTH_I&lt;BR /&gt;LENGTH_I=`echo $I|wc -m`&lt;BR /&gt;&lt;BR /&gt;#if the input string is the correct length&lt;BR /&gt;if test "$LENGTH_I" -eq 9&lt;BR /&gt;then&lt;BR /&gt;  #remove the first two characters of $I and save to $A&lt;BR /&gt;  A=`echo $I|sed s/..//`&lt;BR /&gt;&lt;BR /&gt;  #now remove the last 4 characters of $A&lt;BR /&gt;  #saving only the 3rd and 4th characters into $B&lt;BR /&gt;  B=`echo $A|sed s/....$//`&lt;BR /&gt;&lt;BR /&gt;  #convert hex $B to decimal and save in $C&lt;BR /&gt;  C=`echo "ibase=16;$B"|bc`&lt;BR /&gt;&lt;BR /&gt;  #remove first 4 characters&lt;BR /&gt;  R=`echo $I|sed s/....//`&lt;BR /&gt;  #and remove last 3 and save in $S&lt;BR /&gt;  S=`echo $R|sed s/...$//`&lt;BR /&gt;  #and convert hex $S to decimal and save in $T&lt;BR /&gt;  T=`echo "ibase=16;$S"|bc`&lt;BR /&gt;&lt;BR /&gt;  #remove first 5 characters&lt;BR /&gt;  F=`echo $I|sed s/.....//`&lt;BR /&gt;  #and remove last two characters and save in $G&lt;BR /&gt;  G=`echo $F|sed s/..$//`&lt;BR /&gt;  #convert hex $G to decimal and save in $D&lt;BR /&gt;  D=`echo "ibase=16;$G"|bc`&lt;BR /&gt;&lt;BR /&gt;  #send output to user in format of c#t#d#&lt;BR /&gt;  echo "This translates to c"$C"t"$T"d"$D" "&lt;BR /&gt;  echo&lt;BR /&gt;else&lt;BR /&gt;  #tell the user if not the correct length&lt;BR /&gt;  echo "The input string must be exactly 8 bytes. "&lt;BR /&gt;fi &lt;BR /&gt;</description>
      <pubDate>Wed, 08 Dec 2004 12:47:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hex-conversion/m-p/3438971#M206986</guid>
      <dc:creator>Ron Thompson</dc:creator>
      <dc:date>2004-12-08T12:47:11Z</dc:date>
    </item>
  </channel>
</rss>

