Decoding the PORT.STATUS "Device"
Moderators: chulett, rschirm, roy
Decoding the PORT.STATUS "Device"
The PORT.STATUS command outputs a DEVICE and INODE. I know that there is some method of XORing or doing some similar manipulation to that number in order to get a major and minor device number but cannot recall how to do that and have played around with reverse-engineering the displayed device number to my system and have made no progress whatsoever; i.e. I get a DEVICE of "655396" for a mounted Major,Minor number of 33,2.
Hello Craig,
no, that doesn't address the issue. What I am writing is utility to analyze locks on this system and to get rid of spurious locks caused by network issues terminating sessions which the deadlock daemon doesn't catch. But in order to do that I need to trace back froma Device/inode value from UniVerse to the actual disk object.
no, that doesn't address the issue. What I am writing is utility to analyze locks on this system and to get rid of spurious locks caused by network issues terminating sessions which the deadlock daemon doesn't catch. But in order to do that I need to trace back froma Device/inode value from UniVerse to the actual disk object.
LIST.READU Command Output decoding
It was interesting to read - thanks for that. I decided to open up a call and send it straight to Sunil or Len since I know that they know the answer without having to check but I'll probably have to fight my way through support first. I've already have been told that they can't help without knowing the exact version of DataStage (hmm... LIST.READU output hasn't changed since I first used it in the early 1980s...)
Ok, it turns out that I was getting the DEVICE number using LIST.READU on one machine, then trying to figure out the the Major,Minor devices from another machine! Once I went back and started checking my work I found the error and then the formula became obvious. For those interested:
Code: Select all
Device = "655396" ;** This is the DEVICE number from LIST.READU
BinDevice = OCONV(Device,'MB')
Major = ICONV(BinDevice[1,LEN(BinDevice)-16],"MB")
Minor = ICONV(RIGHT(BinDevice,16),"MB")
</a>