OS/2, eCS & ArcaOS - Technical > Programming

OS2AHCI interface?

(1/8) > >>

Dariusz Piatkowski:
Having recently made the move from DANIS506 to AHCI I've lost some of the IDE reporting functionality that was provided through little utilities like DiskMon, or even SmartMon.

So I thought I'd take a stab at building the AHCI versions of these, first one up being DiskMon since that provides a real-time snapshot of drive's throughput and temperature metrics, and I thought it would be a good excercise to try out my current GCC environment.

Alright, so here is the thing, I know I need to 're-point' the interface to the OS2AHCI, namely something like this:


--- Code: ---  rc = DosOpen ("\\DEV\\IBMS506$", &hDevice, &ActionTaken, 0,  FILE_SYSTEM,
OPEN_ACTION_OPEN_IF_EXISTS, OPEN_SHARE_DENYNONE |
OPEN_FLAGS_NOINHERIT | OPEN_ACCESS_READONLY, NULL);
  if (rc) exit (rc);

--- End code ---

needs to read more along the lines of this:


--- Code: ---  rc = DosOpen ("\\DEV\\OS2AHCI$", &hDevice, &ActionTaken, 0,  FILE_SYSTEM,
OPEN_ACTION_OPEN_IF_EXISTS, OPEN_SHARE_DENYNONE |
OPEN_FLAGS_NOINHERIT | OPEN_ACCESS_READONLY, NULL);
  if (rc) exit (rc);

--- End code ---

But i'm guessing it's nowhere near as simple as that. I mean I did make the change, the program succeesfully built and attempting to run it locked up the machine...LOL, I was expecting that. Strangely where it locked up was on a temperature fetch, and that may be more due to the fact that DiskMon is using the SMART reporting functionality of SmartMon (or so say the comments). I'm sure it's more complicated, but that is at least my starting point.

OK, so back to the post subject line: where do I obtain the definition of OS2AHCI interface?

I guess the only thing I can compare it to are the code samples that are included with the DANIS506 stuff, and those are very clear. I found nothing on the AOS pages on this, but before I log a ticket or post to the Testers' List I thought I'd ask here first.

Thanks!

Neil Waldhauer:
First, try smartmontools.

http://hobbes.nmsu.edu/download/pub/os2/util/disk/smartmontools-6.6-r4424.zip

Go here for information and source code.

www.smartmontools.org

ivan:
Hi Dariusz,

It sounds as if you are looking at that which I was looking for way back last year - some way to get smartctl.exe from smartmontools to display the output of smartctl -a ahci1 without having to pipe it to a file and then read that file, in other words just like smartmon from Dani's IDE driver package.

No one came up with a way of doing that when I asked so maybe you could produce the necessary graphical interface needed.
 

Lars:
There were versions of OS2AHCI.ADD that would lock up the machine when the IOCTL was called (or the driver opened, for that matter).
What version of OS2AHCI.ADD are you using ? Make sure you use version >= 2.04.
I have smartahci.exe and that seems to work, at least to the extent that it outputs some info without completely freezing the system.

Dave Yeo:
Hi Ivan, just pipe it through less. Would be nice to have colour support, perhaps Dariusz can find some macros or such to enable the ANSI colours.

--- Code: ---SMARTAHCI.EXE -a hd0 | less

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version