OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Utilities => Topic started by: ivan on October 24, 2019, 02:40:48 pm

Title: graphic interface for smartahci
Post by: ivan on October 24, 2019, 02:40:48 pm
This may be a strange request but does anyone know of a graphic interface to smartahci like the one for smartmon for IDE drives?  Also is there a way of reducing the information produced by smartahci -a hd1 to just the important info and temp?
Title: Re: graphic interface for smartahci
Post by: Mentore on October 28, 2019, 08:32:20 am
This may be a strange request but does anyone know of a graphic interface to smartahci like the one for smartmon for IDE drives?  Also is there a way of reducing the information produced by smartahci -a hd1 to just the important info and temp?

I feel like some Visual REXX could do the trick. Then I have to say I can't even start up my eCS machine right now, too bad...
Title: Re: graphic interface for smartahci
Post by: Andi B. on October 28, 2019, 09:41:33 am
Isn't
Code: [Select]
smartahci -a hd1 | grep -i "temp" good enough? Should work with find instead of grep too.
Title: Re: graphic interface for smartahci
Post by: ivan on October 28, 2019, 11:22:18 am
Hi Andi,

Sorry that doesn't work because it 'sees everything after the -a as more device names and it requires only one device.

the error message is:
C:\smartahci -a hd1 | grep -i "temp"
smartctl version 5.37 [i386-pc-ibmvac365] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

ERROR: smartctl takes ONE device name as the final command-line argument.
You have provided 3 device names:
hd1
¦
grep

Use smartctl -h to get a usage summary

Edit:
I have found you can only pipe it off to a file which I then have to pick through to get the information I want, Dani managed to get a graphical interface for her IDE version so it must be possible
.
Title: Re: graphic interface for smartahci
Post by: ivan on October 30, 2019, 05:21:01 pm
OK, I have got a little further, I can now get the main information by using  smartahci -A hd1 > some text file  which gives

smartctl 6.6 2017-04-23 r4424 [i386-pc-os2-emx] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   116   099   006    Pre-fail  Always       -       109444736
  3 Spin_Up_Time            0x0003   098   097   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       26
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   076   060   030    Pre-fail  Always       -       47200953
  9 Power_On_Hours          0x0032   094   094   000    Old_age   Always       -       5878
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       29
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       1
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   062   051   045    Old_age   Always       -       38 (Min/Max 24/48)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       20
193 Load_Cycle_Count        0x0032   093   093   000    Old_age   Always       -       14984
194 Temperature_Celsius     0x0022   038   049   000    Old_age   Always       -       38 (0 14 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       1021 (61 65 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       995271562
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       880064779


Which leaves me wondering hoe to get a graphics display like the attachment.

Any Ideas?
Title: Re: graphic interface for smartahci
Post by: Doug Bissett on October 30, 2019, 05:51:16 pm
I will comment here, that I do not trust anything that, so called, smart monitoring tells me. I have (had) one disk that never showed any problem, but just plain wouldn't work because of errors. I have another disk, that has been telling me that total failure has already happened, but it continues to work, with no problems, after 10 years (I do need to turn off the BIOS checking, or it refuses to use the disk). I had another one, that told me that all was well, and it became unusable 3 days later.

Use it if you want to, but be very wary of what it tells you. Better to spend your time doing backups.
Title: Re: graphic interface for smartahci
Post by: ivan on October 30, 2019, 06:18:43 pm
I agree with you Doug especially about backups.  If used properly the SMART information can be useful (in the graphic the attributes marked with * are the ones to watch.  I have had a couple of disks that worked but it took them up to 5 minutes to spin up so they got pensioned off before the stopped spinning at all.  Relocated sector count is another one to watch because disks only have a limited number of sectors to relocate and when they are used up problems start.

SMART data isn't for general use, you have to know what you are reading and how it interacts with the disk electronics firmware.
Title: Re: graphic interface for smartahci
Post by: Dave Yeo on October 31, 2019, 12:48:02 am
OK, I have got a little further, I can now get the main information by using  smartahci -A hd1 > some text file  which gives
...
Which leaves me wondering hoe to get a graphics display like the attachment.

Any Ideas?

Might be as simple as setting the correct terminal (doubtful as I don't see any ansi) or more likely, need compiling with ansi support. I don't have an ahci adapter so can't test but assuming it shares the same source as smartmon, it should be able to output the correct ansi.
Title: Re: graphic interface for smartahci
Post by: Rick C. Hodgin on October 31, 2019, 02:42:29 am
OK, I have got a little further, I can now get the main information by using  smartahci -A hd1 > some text file  which gives

Code: [Select]
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   116   099   006    Pre-fail  Always       -       109444736
  3 Spin_Up_Time            0x0003   098   097   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       26
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   076   060   030    Pre-fail  Always       -       47200953
  9 Power_On_Hours          0x0032   094   094   000    Old_age   Always       -       5878
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       29
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       1
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   062   051   045    Old_age   Always       -       38 (Min/Max 24/48)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       20
193 Load_Cycle_Count        0x0032   093   093   000    Old_age   Always       -       14984
194 Temperature_Celsius     0x0022   038   049   000    Old_age   Always       -       38 (0 14 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       1021 (61 65 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       995271562
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       880064779

Which leaves me wondering hoe to get a graphics display like the attachment.

Any Ideas?

It looks like the Worst column is used for the indicator.  When it's 100, it has red, yellow, yellow, then full greens.  When it was 99, it drops down one, same with 92.  When it was 82 or 75, it had fewer greens.

It seems to just be a projection of that value relative to what it should be.  Some values seem to be up to 100.  Others 200.  Others 255.

Something like (off the top of my head, untested):
Code: [Select]
char ansi_red[]     = "whatever the code is for ANSI red";
char ansi_yellow[]  = "whatever the code is for ANSI yellow";
char ansi_green[]   = "whatever the code is for ANSI green";
char ansi_normal[]  = "whatever the code is for ANSI normal";

// See http://ascii-table.com/ansi-escape-sequences.php
// Possibly the codes are ... don't know, haven't used them since DOS days in 90s:
// ansi_red    = "\033[1;31;40m";
// ansi_yellow = "\033[1;33;40m";
// ansi_green  = "\033[1;32;40m";
// ansi_normal = "\033[0;37;40m";

char* get_indicator(int value, int max_value, int& len)
{
    int   s, d;
    char* ind;

    // Make sure the parameters are in range
    max_value = max(max_value, 1);
    value = min(value, max_value);

    // Get the length we'll need
    len = (int)(10.0f * (float)value / (float)max_value);

    // Allocate the maximum length we'll need for the indicator
    ind = malloc(   ((len >= 1) ? sizeof(ansi_red)    : 0)
                  + ((len >= 2) ? sizeof(ansi_yellow) : 0)
                  + ((len >= 4) ? sizeof(ansi_green)  : 0)
                  + len
                  + sizeof(ansi_normal) + 1  );

    // Render it in ANSI
    for (s = 0, d = 0; s < len; ++s)
    {
        // Add any ANSI codes:
        if (s == 0)
        {
            // Add red
            memcpy(ind + d, ansi_red, sizeof(ansi_red) - 1);
            d += sizeof(ansi_red) - 1;

        } else if (s == 1) {
            // Add yellow
            memcpy(ind + d, ansi_yellow, sizeof(ansi_yellow) - 1);
            d += sizeof(ansi_yellow) - 1;

        } else if (s == 3) {
            // Add green
            memcpy(ind + d, ansi_green, sizeof(ansi_green) - 1);
            d += sizeof(ansi_green) - 1;
        }

        // Store the thick hyphen character
        ind[d++] = 22;
    }

    // Add the trailing restore to normal coloring
    memcpy(ind + d, ansi_normal, sizeof(ansi_normal) - 1);
    d += sizeof(ansi_normal) - 1;
    ind[d] = 0;

    // Return our result
    return ind;
    // Note:  len is updated to the number of thick hyphen characters to be displayed, not the string length
}

If you are able to parse that data in raw text content, you could generate the display using something like ANSI escape codes and the ASCII 22 character.  Or paint it on the terminal using color attributes.  In either case, something like the above should work.

Make sure you free() the return value later.
Title: Re: graphic interface for smartahci
Post by: Rick C. Hodgin on November 01, 2019, 02:00:06 am
It looks like the Worst column is used for the indicator.  When it's 100, it has red, yellow, yellow, then full greens.  When it was 99, it drops down one, same with 92.  When it was 82 or 75, it had fewer greens.

It seems to just be a projection of that value relative to what it should be.  Some values seem to be up to 100.  Others 200.  Others 255.

Something like (off the top of my head, untested):
Code: [Select]
// Snip

If you are able to parse that data in raw text content, you could generate the display using something like ANSI escape codes and the ASCII 22 character.  Or paint it on the terminal using color attributes.  In either case, something like the above should work.

Make sure you free() the return value later.

Here's an actual program that displays some colorize results.  It doesn't handle the ID#... header line properly, but it does demonstrate the general idea.

Code: [Select]
// Set your font small enough so you can see the screen
// [C:\] mode 120,40

// Compiled in Borland C++ for OS/2 Version 2.0

#include <os2.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>

#define max(a,b) ((a) >= (b) ? (a) : (b))
#define min(a,b) ((a) <= (b) ? (a) : (b))

char text[] = "  === START OF READ SMART DATA SECTION ===\r\n"
"SMART Attributes Data Structure revision number: 10\r\n"
"Vendor Specific SMART Attributes with Thresholds:\r\n"
      /*           111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999 */
      /* 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 */
"ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE\r\n"
"  1 Raw_Read_Error_Rate     0x000f   116   099   006    Pre-fail  Always       -       109444736\r\n"
"  3 Spin_Up_Time            0x0003   098   097   000    Pre-fail  Always       -       0\r\n"
"  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       26\r\n"
"  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0\r\n"
"  7 Seek_Error_Rate         0x000f   076   060   030    Pre-fail  Always       -       47200953\r\n"
"  9 Power_On_Hours          0x0032   094   094   000    Old_age   Always       -       5878\r\n"
" 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0\r\n"
" 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       29\r\n"
"183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0\r\n"
"184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0\r\n"
"187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0\r\n"
"188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       1\r\n"
"189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0\r\n"
"190 Airflow_Temperature_Cel 0x0022   062   051   045    Old_age   Always       -       38 (Min/Max 24/48)\r\n"
"191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0\r\n"
"192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       20\r\n"
"193 Load_Cycle_Count        0x0032   093   093   000    Old_age   Always       -       14984\r\n"
"194 Temperature_Celsius     0x0022   038   049   000    Old_age   Always       -       38 (0 14 0 0 0)\r\n"
"197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0\r\n"
"198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0\r\n"
"199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0\r\n"
"240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       1021 (61 65 0)\r\n"
"241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       995271562\r\n"
"242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       880064779\r\n";

// See http://ascii-table.com/ansi-escape-sequences.php
char ansi_red[]     = "\033[1;31;40m";
char ansi_yellow[]  = "\033[1;33;40m";
char ansi_green[]   = "\033[1;32;40m";
char ansi_normal[]  = "\033[0;37;40m";

char* get_indicator(int value, int max_value)
{
    int   s, d, len;
    char* ind;

    // Make sure the parameters are in range
    max_value = max(max_value, 1);
    value = min(value, max_value);

    // Get the length we'll need
    len = (int)(10.0f * (float)value / (float)max_value);

    // Allocate the maximum length we'll need for the indicator
    ind = (char*)malloc(  ((len >= 1) ? sizeof(ansi_red)    : 0)
+ ((len >= 2) ? sizeof(ansi_yellow) : 0)
+ ((len >= 4) ? sizeof(ansi_green)  : 0)
+ 10
+ sizeof(ansi_normal) + 1  );

    // Render it in ANSI
    for (s = 0, d = 0; s < len; ++s)
    {
// Add any ANSI codes:
if (s == 0)
{
    // Add red
    memcpy(ind + d, ansi_red, sizeof(ansi_red) - 1);
    d += sizeof(ansi_red) - 1;

} else if (s == 1) {
    // Add yellow
    memcpy(ind + d, ansi_yellow, sizeof(ansi_yellow) - 1);
    d += sizeof(ansi_yellow) - 1;

} else if (s == 3) {
    // Add green
    memcpy(ind + d, ansi_green, sizeof(ansi_green) - 1);
    d += sizeof(ansi_green) - 1;
}

// Store the thick hyphen character
ind[d++] = 22;
    }

    // Add the trailing restore to normal coloring
    memcpy(ind + d, ansi_normal, sizeof(ansi_normal) - 1);
    d += sizeof(ansi_normal) - 1;

    // Add in any trailing spaces
    for ( ; s < 10; ++s)
ind[d++] = 32;

    // NULL terminate and return
    ind[d] = 0;
    return ind;
}

int verify_hex(char* p, int len)
{
    int   i;
    char  c;


    // Must begin with 0x
    if (!memicmp(p, "0x", 2) == 0)
return 0;

    // Every character must be 0_9a_fA_F
    for (i = 2; i < len; ++i)
    {
c = p[i];
if (!(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'f') && !(c >= 'A' && c <= 'F'))
    return 0;
    }

    // It's hex
    return 1;
}

int verify_dec(char* p, int len)
{
    int i;


    // Every character must be 0_9
    for (i = 0; i < len; ++i)
    {
if (p[i] < '0' || p[i] > '9')
    return 0;
    }

    // It's dec
    return 1;
}

int display_line(int tnOffset)
{
    int     lnLength, lnValue, lnWorst;
    int     llTest1, llTest2, llTest3, llTest4;
    char    c;
    char*   p;
    char*   p2;


    // Find out where this line ends
    for (lnLength = 0, p = text + tnOffset; *p != 0; ++lnLength, ++p)
    {
// Is it CR or LF?
if (*p == 13 || *p == 10)
{
    // We're done here
    break;
}
    }

    // Verify the signatures
    llTest1 = verify_hex(text + tnOffset + 28, 6); // hex at 28,6 flag
    llTest2 = verify_dec(text + tnOffset + 37, 3); // dec at 37,3 value
    llTest3 = verify_dec(text + tnOffset + 43, 3); // dec at 43,3 worst
    llTest4 = verify_dec(text + tnOffset + 49, 3); // dec at 49,3 thresh
    if (llTest1 && llTest2 && llTest3 && llTest4)
    {
// It's an indicator line
// Print up to the worst part
p2  = text + tnOffset + 43;
c   = *p2;
*p2 = 0;
printf("%s", text + tnOffset);
*p2 = c;

// Grab the value
lnValue = 100; // assume 100 atoi(text + tnOffset + 37);
lnWorst = atoi(text + tnOffset + 43);

// Print the indicator
printf("%s", (p2 = get_indicator(lnWorst, lnValue)));
free(p2);

// Print the trailing part
c = *p;
*p = 0;
printf("%s\n", text + tnOffset + 48);
*p = c;

    } else {
// Just a regular line
c = *p;
*p = 0;
printf("%s\n", text + tnOffset);
*p = c;
    }

    // Skip past any CR/LF combos
    for ( ; *p != 0; ++lnLength)
    {
c = text[tnOffset + lnLength];
if (c != 13 && c != 10)
    break;
    }

    // All done
    return lnLength;
}

int main(int argc, char* argv[])
{
    int lnI;

    // Code could be added here to read a file from the command
    // line and load into char* text, rather than using the hard-coded
    // example.  It could also be used to read from STDIN so it can
    // be piped to as in smartdrv > colorize.

    // For illustration purposes only.  Should be modified and extended if used.

    // Display each line
    for (lnI = 0; text[lnI] != 0; )
lnI += display_line(lnI);

    return 0;
}
Title: Re: graphic interface for smartahci
Post by: Andi B. on November 01, 2019, 11:16:06 am
Hi Andi,
Sorry that doesn't work because it 'sees everything after the -a as more device names and it requires only one device.
....
I don't think that's true. Here is what I get -
Code: [Select]
{0}[m:\] smartahci -a hd1 | grep -i "temp"
194 Temperature_Celsius     0x0022   111   104   000    Old_age   Always       -       39

{0}[m:\]

{0}[m:\] smartahci
smartctl version 5.37 [i386-pc-ibmvac365] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

I guess you've no grep installed. As mentioned above you can use find instead.
Code: [Select]
{1025}[m:\] smartahci -a hd1 | find /i "temp"
194 Temperature_Celsius     0x0022   111   104   000    Old_age   Always       -       39

But the semi-graphic output you posted is from a different program namely smartmon. If you look into the readme you will see this is from
Code: [Select]
SMARTMON.EXE is maintained by Andrew Belov <andrew_belov@newmail.ru>.
Maybe you can convince Andrew to update his program to os2ahci. Or you look into the included source code and try to do it yourself.

Btw. I'm not sure if this version of smartahci was really build by Bruce Allen. I seem to remember David did this version. Please correct me if I'm wrong.
Title: Re: graphic interface for smartahci
Post by: ivan on November 01, 2019, 12:41:12 pm
Hi Andi,

I have both smartahci and smartctl (smartmontools v6.6 r4424 from hobbes)installed on my test machine.  Both give the same information to the -A command with the difference being that smartahci requires the hd1 disk identifier while smartctl uses ahci1 for ahci drives and hd1 for ide disks.

I have to admit that I like the GUI from smartmon that I grabbed from my old Acer notebook.  As for me trying to modify any program, I don't stand a chance unless it is written in assembler, I am a hardware engineer not programmer.

I know there is a GUI for smartmontools for everything except OS/2 but again the problem is porting it - where would I start?.

 
Title: Re: graphic interface for smartahci
Post by: Rick C. Hodgin on November 01, 2019, 01:09:13 pm
As for me trying to modify any program, I don't stand a chance unless it is written in assembler, I am a hardware engineer not programmer.

Hi Ivan.  Have you ever designed a CPU?
Title: Re: graphic interface for smartahci
Post by: ivan on November 01, 2019, 01:57:59 pm
Hi Rick,

Not one of the latest ones but I did before the 8080 came out - it was a monster made up of discrete components on a bread board just to show ir could be done.
Title: Re: graphic interface for smartahci
Post by: Rick C. Hodgin on November 01, 2019, 02:36:40 pm
Hi Rick,

Not one of the latest ones but I did before the 8080 came out - it was a monster made up of discrete components on a bread board just to show ir could be done.

There was a movie I saw in the mid-90s called TimeCop.  A somewhat interesting movie, but there was a scene where a designer / visionary was creating his new CPU and you could see the design schematics on the huge floor display.  I remember thinking how neat that was.  Since then I've come across some documentaries I've found interesting:

Fairchild documentary on making transistors (https://www.youtube.com/watch?v=z47Gv2cdFtA)
Designer of the 6502 (https://www.youtube.com/watch?v=Ne1ApyqSvm0)
Reconstructing the 6502 from schematics (https://www.youtube.com/watch?v=fWqBmmPQP40)

And of course there's the recent book "But How Do It Know?" made into a video with the Scott CPU:
How a CPU works (https://www.youtube.com/watch?v=cNN_tTXABUA)

I wrote a single-step capable emulator for the Scott CPU. :-)

I've been working on two CPUs of my own.  One is a 40-bit in-order 80386 with several newer instructions.  It's 40-bit because that's 1 TB of data, and I can't imagine a CPU needing more than that, but I can imagine it needing more than 4 GB (32-bit).  It has a few models, the top model of which is four-core, supports a type of hyperthreading I call Love Threading because cores can sacrificially come over and help the other core out on its serial workload, making loop processing faster, for example.  And several other interesting extensions / features.

The other is a radical design I've never seen before.  I call it Inspire.  I hope to have it published by the end of next year.

-----
If you ever want help learning about GUI programming let me know.  I used to program almost entirely in assembly, then later C and C++.  Today I use multiple tools because I recognize that not every job needs to be fast.  At the higher levels you can sometimes do things that are pretty and awesome from a user's point of view, even if they're very inefficient from a hardware point of view.  Sometimes it's about productivity, not efficiency, at least when inefficiency on modern hardware runs far faster than efficiency did on the hardware of a couple decades ago.

I'd like to hear about your CPU project sometime.  PM me or email privately if you wish.
Title: Re: graphic interface for smartahci
Post by: Rick C. Hodgin on November 01, 2019, 02:42:57 pm
Hi Rick,

Not one of the latest ones but I did before the 8080 came out - it was a monster made up of discrete components on a bread board just to show ir could be done.

This reminds me, by the way ... Busicom, the company that originally contracted Intel to build their 4004 CPU that started the whole x86 affair, had developed the entire CPU in that same breadboard fashion.  They had the software, hardware, and everything designed, in the lab, in an impractical way, so that when the 4004-series chips came out, they would be ready.

There's a documentary about that too from the Computer Science Museum:  Intel 4004 Microprocessor 35th Anniversary (https://www.youtube.com/watch?v=j00AULJLCNo)

Today, in 2019, the 4004 is actually 48+ years old.  It will turn 50 in May 2021 I believe.
Title: Re: graphic interface for smartahci
Post by: ivan on November 01, 2019, 06:16:26 pm
Ah, those were the days.

I've seen a lot of changes in my 80 years and I'm not sure that it is all that much better.  We now have computers built to only run windows 10 and even if you buy separate items they are still designed with windows use in mind especially motherboards and graphics cards.  Still we battle on with what we can get hence my various AMD Ryzen based computers I have built.
Title: Re: graphic interface for smartahci
Post by: Pete on November 01, 2019, 11:43:31 pm
Hi All

I have both smartahci.exe - aka smartctl version 5.37 - and smartctl.exe 6.6 2017-04-23 r4424 installed. They simply seem to be different versions of smartmontools.

I can confirm grep works with both smartahci.exe and smartctl.exe:-

[M:\SYS\BIN]smartctl -A ahci0 | grep -i "temp"
194 Temperature_Celsius     0x0022   030   100   000    Old_age   Always       -
       30 (Min/Max 16/41)
231 Temperature_Celsius     0x0032   099   099   000    Old_age   Always       -
       1

[M:\SYS\BIN]smartahci -A hd0 | grep -i "temp"
194 Temperature_Celsius     0x0022   030   100   000    Old_age   Always       -
       30 (Lifetime Min/Max 16/41)
231 Temperature_Celsius     0x0032   099   099   000    Old_age   Always       -
       1


The smartctl.exe seems to be a later build than smartahci.exe and returns less "Unknown_Attribute" entries when run against my SSD:-

Output of smartahci -A hd0 > smartahci_hd0.txt

smartctl version 5.37 [i386-pc-ibmvac365] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 48
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   000    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       9786
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1332
100 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       912496
101 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       132352
170 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
171 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
172 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
174 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       1331
175 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
176 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
177 Unknown_Attribute       0x0032   099   099   000    Old_age   Always       -       538
178 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       0
180 Unknown_Attribute       0x0002   100   100   000    Old_age   Always       -       654
183 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       6
187 Reported_Uncorrect      0x0033   100   100   000    Pre-fail  Always       -       0
194 Temperature_Celsius     0x0022   029   100   000    Old_age   Always       -       29 (Lifetime Min/Max 16/41)
195 Hardware_ECC_Recovered  0x0032   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0012   100   100   000    Old_age   Always       -       0
201 Soft_Read_Error_Rate    0x0032   100   100   000    Old_age   Always       -       0
204 Shock_Count_Write_Opern 0x0032   100   100   000    Old_age   Always       -       0
231 Temperature_Celsius     0x0032   099   099   000    Old_age   Always       -       1
233 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       839
234 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       653
241 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       714
242 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       791
250 Read_Error_Retry_Rate   0x0032   100   100   000    Old_age   Always       -       0


Output of smartctl -A ahci0 > smartctl_ahci0.txt

smartctl 6.6 2017-04-23 r4424 [i386-pc-os2-emx] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 48
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   000    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       9790
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1333
100 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       912640
101 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       132368
170 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
171 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
172 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
174 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       1332
175 Program_Fail_Count_Chip 0x0032   100   100   000    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   000    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   099   099   000    Old_age   Always       -       538
178 Used_Rsvd_Blk_Cnt_Chip  0x0002   100   100   000    Old_age   Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0002   100   100   000    Old_age   Always       -       654
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       6
187 Reported_Uncorrect      0x0033   100   100   000    Pre-fail  Always       -       0
194 Temperature_Celsius     0x0022   025   100   000    Old_age   Always       -       25 (Min/Max 16/41)
195 Hardware_ECC_Recovered  0x0032   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0012   100   100   000    Old_age   Always       -       0
201 Unknown_SSD_Attribute   0x0032   100   100   000    Old_age   Always       -       0
204 Soft_ECC_Correction     0x0032   100   100   000    Old_age   Always       -       0
231 Temperature_Celsius     0x0032   099   099   000    Old_age   Always       -       1
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age   Always       -       839
234 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       653
241 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       714
242 Total_LBAs_Read         0x0032   100   100   000    Old_age   Always       -       792
250 Read_Error_Retry_Rate   0x0032   100   100   000    Old_age   Always       -       0


Regards

Pete

Title: Re: graphic interface for smartahci
Post by: Pete on November 20, 2019, 04:03:52 am
Hi All

I have to correct my above post as it only applies when os2ahci.add V1.32 is installed.

Neither smartahci.exe or smartctl.exe can be used with os2ahci.add V2.03 on 5 systems here as attempting to use either results in a locked system requiring the use of the Reset/Power Off button.

The version of smartahci is that supplied in the package with os2ahci.add V2.03 - would have been nice if AN had checked that it worked... Or is the problem just on my systems - same problem on 2 laptops and 3 desktops all running either eCS2.2b2+ or ArcaOSV5.02+.

Is os2ahci.add V2.03 the latest release of this driver? - If there is a later version what version of smartahci/smartctl is supplied?


Regards

Pete

Title: Re: graphic interface for smartahci
Post by: Dave Yeo on November 20, 2019, 04:44:40 am
Is os2ahci.add V2.03 the latest release of this driver? - If there is a later version what version of smartahci/smartctl is supplied?

The latest beta has,
Code: [Select]
O:\OS2\BOOT>bldlevel OS2AHCI.ADD
Build Level Display Facility Version 6.12.675 Sep 25 2001
(C) Copyright IBM Corporation 1993-2001
Signature:       @#Arca Noae LLC:2.07#@##1## 24 Aug 2019 15:17:12     DAZAR1
::::::@@AHCI Driver (c) 2019 Arca Noae LLC
Vendor:          Arca Noae LLC
Revision:        2.07
Date/Time:       24 Aug 2019 15:17:12
Build Machine:   DAZAR1
File Version:    2.7
Description:     AHCI Driver (c) 2019 Arca Noae LLC
and
Code: [Select]
O:\sys\bin>SMARTAHCI.EXE
smartctl version 5.37 [i386-pc-ibmvac365] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

No AHCI hardware to test though.
Title: Re: graphic interface for smartahci
Post by: Pete on November 20, 2019, 04:48:02 pm
Hi Dave

So, os2ahci.add has been updated but smartahci is the same version.

Now all I need is someone to test whether smartahci works with the updated os2ahci... I suspect the result will be a system lockup requiring a reboot.


Regards

Pete
Title: Re: graphic interface for smartahci
Post by: Doug Bissett on November 20, 2019, 06:12:35 pm
Quote
Now all I need is someone to test whether smartahci works with the updated os2ahci... I suspect the result will be a system lockup requiring a reboot.

No, it works just as badly, and just as well, as the old version works with IDE. The data is misleading, and often completely wrong. It also changes between disk manufacturers. If you understand what it is actually saying, and exactly what to look for, it MAY tell you something useful. It has been my experience that , so called, SMART monitoring is a total waste of time, and effort. You are far better off to simply do proper, tested, backups.

Here is a sample output (the program name is actually SMARTAHCI.EXE, not SMARTCTL.EXE):
Code: [Select]
smartctl version 5.37 [i386-pc-ibmvac365] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     ST1000DM010-2EP102
Serial Number:    Z9ANJZV0
Firmware Version: CC43
User Capacity:    1,000,204,886,016 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Wed Nov 20 09:23:56 2019   
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (   0) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: (   1) minutes.
Extended self-test routine
recommended polling time: ( 103) minutes.
Conveyance self-test routine
recommended polling time: (   2) minutes.
SCT capabilities:        (0x1085) SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   083   063   006    Pre-fail  Always       -       231254441
  3 Spin_Up_Time            0x0003   097   097   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       838
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   085   060   045    Pre-fail  Always       -       358959151
  9 Power_On_Hours          0x0032   086   086   000    Old_age   Always       -       12719
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       835
183 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
184 Unknown_Attribute       0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   066   061   040    Old_age   Always       -       34 (Lifetime Min/Max 31/35)
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       1162
194 Temperature_Celsius     0x0022   034   013   000    Old_age   Always       -       34 (0 13 0 0)
195 Hardware_ECC_Recovered  0x001a   002   001   000    Old_age   Always       -       231254441
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       21556440871248
241 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       14553047179
242 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       45958338958

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

I don't know why anybody would want a "graphical" interface, just redirect the output to a file, and look at it in an editor (that is what I did here). You could also do a simple REXX thing, to track whatever might interest you. I also suggest that you look up what the disk manufacturer means by the various numbers. They aren't always what the program says they are.

As a sample of "BAD information, this is from the second HDD in the machine:
Code: [Select]
smartctl version 5.37 [i386-pc-ibmvac365] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     ST3320613AS
Serial Number:    9SZ2YC9J
Firmware Version: CC2H
User Capacity:    320,072,933,376 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Wed Nov 20 09:44:22 2019   
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 625) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: (   1) minutes.
Extended self-test routine
recommended polling time: (  71) minutes.
Conveyance self-test routine
recommended polling time: (   2) minutes.
SCT capabilities:        (0x103f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   116   082   006    Pre-fail  Always       -       109681403
  3 Spin_Up_Time            0x0003   100   096   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   098   098   020    Old_age   Always       -       2111
  5 Reallocated_Sector_Ct   0x0033   020   020   036    Pre-fail  Always   FAILING_NOW 3290
  7 Seek_Error_Rate         0x000f   081   060   030    Pre-fail  Always       -       138637869
  9 Power_On_Hours          0x0032   065   065   000    Old_age   Always       -       31024
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   037   020    Old_age   Always       -       1974
184 Unknown_Attribute       0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       -       6293
188 Unknown_Attribute       0x0032   100   096   000    Old_age   Always       -       47245623365
189 High_Fly_Writes         0x003a   053   053   000    Old_age   Always       -       47
190 Airflow_Temperature_Cel 0x0022   065   048   045    Old_age   Always       -       35 (Lifetime Min/Max 33/37)
194 Temperature_Celsius     0x0022   035   052   000    Old_age   Always       -       35 (0 16 0 0)
195 Hardware_ECC_Recovered  0x001a   020   010   000    Old_age   Always       -       109681403
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       1
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       210796994918617
241 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       588313026
242 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       2780383231

SMART Error Log Version: 1
ATA Error Count: 4255 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 4255 occurred at disk power-on lifetime: 24723 hours (1030 days + 3 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 51 00 00 00 00 00  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  b0 d4 00 82 4f c2 a0 00      00:01:30.182  SMART EXECUTE OFF-LINE IMMEDIATE
  b0 d0 00 00 4f c2 a0 00      00:01:29.928  SMART READ DATA
  b0 d0 00 00 4f c2 a0 00      00:01:28.424  SMART READ DATA
  b0 d0 00 00 4f c2 a0 00      00:01:16.395  SMART READ DATA
  b0 d4 00 81 4f c2 a0 00      00:01:15.870  SMART EXECUTE OFF-LINE IMMEDIATE

Error 4254 occurred at disk power-on lifetime: 24723 hours (1030 days + 3 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 51 00 00 00 00 00  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  b0 d4 00 81 4f c2 a0 00      00:01:15.870  SMART EXECUTE OFF-LINE IMMEDIATE
  b0 d0 00 00 4f c2 a0 00      00:01:15.366  SMART READ DATA
  b0 d0 00 00 4f c2 a0 00      00:01:12.805  SMART READ DATA
  b0 da 01 00 4f c2 a0 00      00:01:03.492  SMART RETURN STATUS
  b0 d0 01 00 4f c2 a0 00      00:00:46.946  SMART READ DATA

Error 4253 occurred at disk power-on lifetime: 24632 hours (1026 days + 8 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 94 e4 01 00  Error: UNC at LBA = 0x0001e494 = 124052

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 80 80 e4 01 40 00      00:04:12.891  READ DMA EXT
  25 03 80 00 e4 01 40 00      00:04:12.833  READ DMA EXT
  25 03 80 80 3f 60 40 00      00:04:12.830  READ DMA EXT
  25 03 80 00 3f 60 40 00      00:04:12.806  READ DMA EXT
  25 03 80 80 43 00 40 00      00:04:12.792  READ DMA EXT

Error 4252 occurred at disk power-on lifetime: 24521 hours (1021 days + 17 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 ed c0 5f 00  Error: UNC at LBA = 0x005fc0ed = 6275309

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 80 f0 ac 5f e0 00      01:01:39.451  READ DMA EXT
  25 03 80 70 ac 5f e0 00      01:01:38.752  READ DMA EXT
  25 03 80 f0 ab 5f e0 00      01:01:37.594  READ DMA EXT
  25 03 80 70 ab 5f e0 00      01:01:37.036  READ DMA EXT
  25 03 80 f0 aa 5f e0 00      01:01:37.031  READ DMA EXT

Error 4251 occurred at disk power-on lifetime: 24519 hours (1021 days + 15 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 78 b1 68 00  Error: UNC at LBA = 0x0068b178 = 6861176

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  42 03 08 78 b1 68 e0 00      00:20:56.237  READ VERIFY SECTOR(S) EXT
  42 03 08 70 b1 68 e0 00      00:20:53.507  READ VERIFY SECTOR(S) EXT
  42 03 10 b0 b1 68 e0 00      00:20:53.430  READ VERIFY SECTOR(S) EXT
  42 03 10 a0 b1 68 e0 00      00:20:50.697  READ VERIFY SECTOR(S) EXT
  42 03 10 90 b1 68 e0 00      00:20:47.873  READ VERIFY SECTOR(S) EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended captive    Completed: unknown failure    90%     24723         -
# 2  Short captive       Completed: unknown failure    90%     24723         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Note the "fail" line. About 8 years ago, this disk was in my brother's machine. The BIOS refused to use the disk, because of those lines (with no way to ignore them). After some analysis, we replaced the disk (not because it wasn't working, but because the machine refused to use it). I put the disk into a USB enclosure (which doesn't care about this stuff), and started to copy the data. OOOPS! the new disk had the same problem. After replacing the SATA cable, and resetting the controller, it was okay. Fortunately, we got that before the disk was corrupted (I have never found a way to reset bad numbers). Anyway, my brother's problem was solved (although his new disk has some high numbers, that aren't at "fail" point, yet), and I have been using the "bad" disk, with no problems, other than I need to set the BIOS to ignore SMART data, and future bad spots may not have anywhere to go.

Bottom line is: Don't believe what SMART monitoring says.
Title: Re: graphic interface for smartahci
Post by: Pete on November 20, 2019, 07:07:05 pm
Hi Doug

I can see the smartctl (aka smartahci) version used but which os2ahci.add is in use?


Regards

Pete
Title: Re: graphic interface for smartahci
Post by: Doug Bissett on November 20, 2019, 07:55:27 pm
Quote
I can see the smartctl (aka smartahci) version used but which os2ahci.add is in use?

Sorry, I meant to include that, and forgot. It is:
Signature:       @#Arca Noae LLC:2.06#@##1## 26 Nov 2018 09:15:52     DAZAR1
::::::@@AHCI Driver (c) 2018 Arca Noae LLC
Vendor:          Arca Noae LLC
Revision:        2.06
Date/Time:       26 Nov 2018 09:15:52
Build Machine:   DAZAR1
File Version:    2.6
Description:     AHCI Driver (c) 2018 Arca Noae LLC
Title: Re: graphic interface for smartahci
Post by: Pete on November 21, 2019, 12:18:12 am
Hi Doug

Thanks. Confirms that the problem I am seeing is with the os2ahci.add v2.03 driver.

And now I am wondering if smartctl v6.6 2017-04-23 r4424 - http://hobbes.nmsu.edu/download/pub/os2/util/disk/smartmontools-6.6-r4424.zip - is less misleading/wrong. Yes, this build works with ahci, uses ahci0 instead of hd0 to specify an ahci controlled disk.


Regards

Pete
Title: Re: graphic interface for smartahci
Post by: Doug Bissett on November 21, 2019, 03:12:43 am
Quote
Confirms that the problem I am seeing is with the os2ahci.add v2.03 driver.

Not necessarily. SMARTAHCI.EXE was tweaked by Arca Noae to work with AHCI, It was sourced from the IDE version.

Quote
And now I am wondering if smartctl v6.6 2017-04-23 r4424 - http://hobbes.nmsu.edu/download/pub/os2/util/disk/smartmontools-6.6-r4424.zip - is less misleading/wrong. Yes, this build works with ahci, uses ahci0 instead of hd0 to specify an ahci controlled disk.

I don't know where that version actually came from (and I never wasted my time looking at it). I doubt if it was used by Arca Noae for their version (the only reason I tried the AN version, was because I do testing for Arca Noae, and they asked). I expect that v6.6 works, but it has no "official" standing in OS/2. The Arca Noae version does have Arca Noae behind it (and that is about as close to being "official" as you can get with OS/2 now). It should be pretty easy to extract data from a disk. Formatting it would be the hard part, and that hasn't changed. The access to the disk is the only difference from the IDE version, which probably explains the version used (probably just a port address change).

BTW, os2ahci.add v2.07 also works (not, yet released).
Title: Re: graphic interface for smartahci
Post by: Pete on November 21, 2019, 06:43:31 pm
Hi Doug

Well, smartahci works with the os2ahci v1.32 driver but locks the system solid when os2ahci v2.03 is installed - it is the same smartahci that you report as working with os2ahci v2.06. the difference between smartahci working and locking up the system seems to be reliant on the os2ahci version in use.

I suggest you try the later smartctl package as it is a much later version than that used by AN for smartahci just to see if the accuracy of data is improved.


Regards

Pete
Title: Re: graphic interface for smartahci
Post by: Andi B. on November 21, 2019, 08:21:21 pm
It's a know issue that some os2ahci versions crash the system rock solid when trying to read smart information. I think 2.04 was the version which fixed this issue.
Title: Re: graphic interface for smartahci
Post by: Neil Waldhauer on November 22, 2019, 03:23:27 pm
For the current Arca Noae AHCI driver, smartctl from Hobbes (listed as smartmontools) works. But how do I get a nice display like smartmon and DaniS506 used to give me?

The data is there if I use smartctl -a ahci1

OK, smartctl -A ahci1 seems to give a black and white version of the smartmon display.
Title: Re: graphic interface for smartahci
Post by: Dave Yeo on November 22, 2019, 04:38:07 pm
If you mean the coloured (ANSI) output, I'd guess it is a compile time option or needs to be forced on on OS/2. It's a shame that no one seems to follow the license and make the source available.