how to low-level format a hard disk using AIX? - formatting

I have a server with AIX 6.1 , I formated some hdisks using diag tool, but in some way some of its VGDA survived.
how may I low-level format a hard disk using AIX?
or
how may I clear the VGDA of a specific hdisk?
thanks

dd if=/dev/zero of= with an optional bs= count= will clear off anything to zero.

Related

Openvms: Extracting RMS Indexed file t to Windows as a sequential flat file

I haven't used openvms for 20+ years. It was my 1st OS. I've been asked if it possible to copy the data from RMS files from openvms server to windows as a text file - so that it's readable.
No-one has experience or knowledge of the record structures etc.
The files are xyz.DAT and are relative files. I'm hoping the dat files are fixed length.
My 1st attempt would be to try and use Datatrieve (DTR) but get an error that the image isn't loaded.
Thought it might be as easy using CONVERT/FDL = nnnn.FDL - by changing the Relative to Sequential. The file seems still to be unreadable.
Is there an easy way to stream an RMS index file to a flat ASCII file?
I use to use COBOL and C to access the data in the past but had lots of libraries to help....
I've notice some solution may use odbc to connect but not sure what I can or cannot install on the server.
I can FTP using Filezilla to the server....
Another plan writing C application to read a file and output out as string.....or DCL too.....doesn't have to be quick...
Any ideas
Has mentioned before
The simple solution MIGHT be to to just use: $ TYPE/OUT=test.TXT test.DAT.
This will handle Relatie and Indexed files alike.
It is much the same as $ CONVERT / FDL=NL: test.DAT test.TXT
Both will just read records from the source and transfer the bytes, byte for byte, to the records in a sequential file.
FTP in ASCII mode will transfer that nicely to windows.
You can also use an 'inline' FDL file to generate a 'unix' LF file like:
$ conv /fdl="record; format stream_lf" test.DAT test.TXT
Or CR-LF file using:
$ conv /fdl="record; format stream" test.DAT test.TXT
Both can be transferring in Binary or Ascii with FTP.
MOSTLY - because this really only works well for TEXT ONLY source .DAT file.
There should be no CR, LF, FF or NUL characters in the source or things will break.
As 'habo' points out, use DUMP /RECORD=COUNT=3 to see how 'readable' the source data is.
If you spot 'binary' data using DUMP then you will need to find a record defintion somewhere which maps byte to Integers or Floating points or Dates as needed.
These defintions can be COBOL LIB files, or BASIC MAPS and are often stores IN the CDD (Common Data Dictionary) or indeed in DATATRIEVE .DIC DICTIONARIES
To use such definition you likely need a program to just read following the 'map' and write/print as text. Normally that's not too hard - notably not when you can find an example program on the server to tweak.
If it is just one or two 'suspect' byte ranges, then you can create a DCL loop to read and write and use F$EXTRACT to select the chunks you like.
If you want further help, kindly describe in words what kind of data is expected and perhaps provide the output from DUMP for 3 or 5 rows.
Good luck!
Hein.

Patching AIX binary

I am attached to a running proces using dbx on AIX. There is a bug in the program, the offset in the opcode below is 0x9b8, but should be 0xbe8:
(dbx) listi 0x100001b14
0x100001b14 (..........+0x34) e88109b8 ld r4,0x9b8(r1)
I am able to fix that using the command below:
(dbx) assign 0x100001b14 = 0xe8810be8
but that affects only the running process and its memory. How can I change the on disk binary? I am not able to locate the pattern e88109b8 in the binary file,
otherwise I would use e.g. dd utility to patch it.
Best regards,
Pavel Filipensky

Weird REDIS chars at console?

I have installed the latest version of Redis v2.8.9 from MsOpenTech
The server is up and everything is ok.
But when I invoke the redis-cli.exe and type in the word info : I see each char {each click} with weird info around it :
With previous version (2.8.4) of redis , it doesn't happen and all chars displayed normally.
Question
What are those extra chars ? and how can I make it to be displayed normally ?
nb - windows 8 / 64bit
They look like ANSI character control code used to format and colorize the display. Use an ANSI compliant terminal, or set the FAKETTY environment variable, or use the --raw option.
Apparently it was a bug which was fixed in a newer version :
https://github.com/MSOpenTech/redis/issues/118

Find the date/time a process was created in OpenVMS

I can't seem to find the date/time a process was created in OpenVMS V8.3-1H1.
The sh proc/all PROCESS_NAME command does show a Connect time which at first I though it is the time since the process was created, but after a few tests I discovered that it is not.
I have search the PDF documents I have from HP, the Ask the Wizard archive and openvms.org but to no avail.
The HP OpenVMS DCL Dictionary, for f$getjpi explains the item code LOGINTIM as String, Process creation time. So try a
$ write sys$output f$getjpi(0,"LOGINTIM")
and see if that's what you want/need.

How to edit a device driver file(.sys)

How I can edit a device driver file (.sys) and I want to update the Report Descriptor file. I want to transpose the X and Y value of USB HID device driver. Please help me to transpose the X & Y value in an HID device.
use a binary editor, or if you are really careful, vi. note that whatever you do, leave strings exactly the same length or you will almost definitely crash your operating system.
assuming you are using Windows, good old debug.exe will work fine as a binary editor. the interface is a bit obscure though.
C:\Users\jc>echo bleah > test.sys
C:\Users\jc>debug test.sys
-e100
17DD:0100 62.31 6C.32 65.33 61.34 68.35
-w
Writing 00008 bytes
-q
C:\Users\jc>type test.sys
12345
on the line following -e100, I was typing the new values and hitting the spacebar; when done I hit <enter>.
You can use any static disassembler for Win32/Win64. This way you will better see the code instructions, function names, and be able to find your target easily (otherwise reading machine code directly it's for priviledged minds).
One example can be "PEBrowse Professional" (free) but there are many other out there. The one I cited is verified to open 64-sys of Win10.