Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Testers needed: is smartmontools is 64-bit clean?
@ 2003-06-29 15:08 Bruce Allen
  2003-06-29 16:17 ` Kalle Olavi Niemitalo
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Allen @ 2003-06-29 15:08 UTC (permalink / raw)


Smartmontools is a package for monitoring the SMART status of ATA and
SCSI disks. SMART is a feature built into most modern disks that
continuously monitors the health and operational status of the disk.

Recently, in response to an inquiry from a PPC user, I removed the
"little endian x86 bias" from the code.  Before generating a new
release, I would also like to verify that the code is 64-bit clean.
Could a few linux AXP users from this group please download
smartmontools from CVS and test that it works correctly for them?

To test the code, please see http://smartmontools.sourceforge.net/ for
instructions on how to download the latest code from CVS.  Please do
NOT use one of the existing releases (such as 5.1-14) as it does not
have the latest code base. Then send or post the output of smartctl -a
for any ATA or SCSI devices that you have.  Also, please try running
self-tests with the smartctl -t option, and send or post additional
smartctl -a output when those tests have completed.

Thanks!

Bruce Allen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testers needed: is smartmontools is 64-bit clean?
  2003-06-29 15:08 Testers needed: is smartmontools is 64-bit clean? Bruce Allen
@ 2003-06-29 16:17 ` Kalle Olavi Niemitalo
  2003-06-29 16:43   ` Kalle Olavi Niemitalo
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Olavi Niemitalo @ 2003-06-29 16:17 UTC (permalink / raw)


ballen@uwm.edu (Bruce Allen) writes:

> Before generating a new release, I would also like to verify
> that the code is 64-bit clean.

In a few places, the code was trying to print (64-bit) size_t
values with "%d".  The following patches cast these to (32-bit)
int, which ought to be large enough.

--- atacmds.c.~1.107.~	Mon Jun 23 07:55:56 2003
+++ atacmds.c	Sun Jun 29 18:58:42 2003
@@ -726,14 +726,14 @@ int ataVersionInfo (const char** descrip
   if (sizeof(minor_str) != sizeof(char *)*(1+MINOR_MAX)){
     pout("Internal error in ataVersionInfo().  minor_str[] size %d\n"
 	 "is not consistent with value of MINOR_MAX+1 = %d\n", 
-	 sizeof(minor_str)/sizeof(char *), MINOR_MAX+1);
+	 (int) (sizeof(minor_str)/sizeof(char *)), MINOR_MAX+1);
     fflush(NULL);
     abort();
   }
   if (sizeof(actual_ver) != sizeof(int)*(1+MINOR_MAX)){
     pout("Internal error in ataVersionInfo().  actual_ver[] size %d\n"
 	 "is not consistent with value of MINOR_MAX = %d\n",
-	 sizeof(actual_ver)/sizeof(int), MINOR_MAX+1);
+	 (int) (sizeof(actual_ver)/sizeof(int)), MINOR_MAX+1);
     fflush(NULL);
     abort();
   }
--- scsicmds.c.~1.49.~	Fri Jun 20 16:24:04 2003
+++ scsicmds.c	Sun Jun 29 18:58:40 2003
@@ -196,7 +196,7 @@ static int linux_do_scsi_cmnd_io(int dev
             (DXFER_TO_DEVICE == iop->dxfer_dir) && (iop->dxferp)) {
             int trunc = (iop->dxfer_len > 256) ? 1 : 0;
 
-            pout("]\n  Outgoing data, len=%d%s:\n", iop->dxfer_len,
+            pout("]\n  Outgoing data, len=%d%s:\n", (int) iop->dxfer_len,
                  (trunc ? " [only first 256 bytes shown]" : ""));
             dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1);
         }
@@ -242,7 +242,7 @@ static int linux_do_scsi_cmnd_io(int dev
             if (con->reportscsiioctl > 1) {
                 int trunc = (iop->dxfer_len > 256) ? 1 : 0;
 
-                pout("  Incoming data, len=%d%s:\n", iop->dxfer_len,
+                pout("  Incoming data, len=%d%s:\n", (int) iop->dxfer_len,
                      (trunc ? " [only first 256 bytes shown]" : ""));
                 dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1);
             }
@@ -259,7 +259,7 @@ static int linux_do_scsi_cmnd_io(int dev
         memcpy(iop->sensep, wrk.buff, len);
         iop->resp_sense_len = len;
         if (con->reportscsiioctl > 1) {
-            pout("  >>> Sense buffer, len=%d:\n", len);
+            pout("  >>> Sense buffer, len=%d:\n", (int) len);
             dStrHex(wrk.buff, len , 1);
         }
     }

> Then send or post the output of smartctl -a for any ATA or SCSI
> devices that you have.

This is from an Alphastation 500/266 with two SCSI disks.
First, the old noisy one:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
| 
| Device: DEC      RZ29B    (C) DEC Version: 0014
| Serial number: 01185069
| Device type: disk
| Local Time is: Sun Jun 29 19:09:04 2003 EEST
| Device does not support SMART
| 
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:          0        0         0         0          0          0.000           0
| write:         0        0         0         0          0          0.000           0
| Device does not support Self Test logging

I normally keep the disk spun down.  In this mode, the output
changes to:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
| 
| Device: DEC      RZ29B    (C) DEC Version: 0014
| Serial number: 01185069
| Device type: disk
| Local Time is: Sun Jun 29 19:10:50 2003 EEST
| device is NOT READY (media absent, spun down, etc)
| SMART Health Status: OK
| 
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:          0        0         0         0          0          0.000           0
| write:         0        0         0         0          0          0.000           0
| Device does not support Self Test logging

"SMART Health Status: OK"?  That doesn't look right.

Then, the newer disk:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
| 
| Device: QUANTUM  ATLAS10K3_18_WLS Version: 020W
| Serial number: 342210449270
| Device type: disk
| Local Time is: Sun Jun 29 19:13:01 2003 EEST
| Device supports SMART and is Enabled
| Temperature Warning Enabled
| SMART Health Status: OK
| Current Drive Temperature:     39 C
| Manufactured in week 14 of year 2002
| Current start stop count:      73 times
| Recommended start stop count:  4294967295 times
| 
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:       1426        0         0         0          0          0.227           0
| write:         0        0         0         0          0          0.168           0
| 
| Non-medium error count:        2
| No self-tests have been logged
| Long (extended) Self Test duration: 672 seconds [11.2 minutes]

> Also, please try running self-tests with the smartctl -t
> option, and send or post additional smartctl -a output when
> those tests have completed.

Will do.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testers needed: is smartmontools is 64-bit clean?
  2003-06-29 16:17 ` Kalle Olavi Niemitalo
@ 2003-06-29 16:43   ` Kalle Olavi Niemitalo
  2003-06-30  4:43     ` Bruce Allen
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Olavi Niemitalo @ 2003-06-29 16:43 UTC (permalink / raw)


Kalle Olavi Niemitalo <kon@iki.fi> writes:

> ballen@uwm.edu (Bruce Allen) writes:
>> Also, please try running self-tests with the smartctl -t
>> option, and send or post additional smartctl -a output when
>> those tests have completed.
>
> Will do.

After -t short and -t long:

| smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen
| Home page is http://smartmontools.sourceforge.net/
| 
| Device: QUANTUM  ATLAS10K3_18_WLS Version: 020W
| Serial number: 342210449270
| Device type: disk
| Local Time is: Sun Jun 29 19:40:31 2003 EEST
| Device supports SMART and is Enabled
| Temperature Warning Enabled
| SMART Health Status: OK
| Current Drive Temperature:     39 C
| Manufactured in week 14 of year 2002
| Current start stop count:      73 times
| Recommended start stop count:  4294967295 times
| 
| Error counter log:
|           Errors Corrected    Total      Total   Correction     Gigabytes    Total
|               delay:       [rereads/    errors   algorithm      processed    uncorrected
|             minor | major  rewrites]  corrected  invocations   [10^9 bytes]  errors
| read:       1493        0         0         0          0          0.227           0
| write:         0        0         0         0          0          0.172           0
| 
| Non-medium error count:        2
| 
| SMART Self-test log
| Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
|      Description                              number   (hours)
| # 1  Background long   Completed                   -   230                   - [-   -    -]
| # 2  Background short  Completed                   -   230                   - [-   -    -]
| 
| Long (extended) Self Test duration: 672 seconds [11.2 minutes]

While the tests were running, smartctl -a displayed a message to
that effect.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testers needed: is smartmontools is 64-bit clean?
  2003-06-29 16:43   ` Kalle Olavi Niemitalo
@ 2003-06-30  4:43     ` Bruce Allen
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Allen @ 2003-06-30  4:43 UTC (permalink / raw)


Thanks a lot for the posts and patches!

I'll incorporate the ATA-side patches immediately.  The SCSI-side
patches look right, but they'll have to wait until Doug Gilbert (who
handles the SCSI side) takes a look at them.  He can also address the
question about the (surprising!) SMART status of the sleeping device.

Cheers,
    Bruce


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-30  4:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-29 15:08 Testers needed: is smartmontools is 64-bit clean? Bruce Allen
2003-06-29 16:17 ` Kalle Olavi Niemitalo
2003-06-29 16:43   ` Kalle Olavi Niemitalo
2003-06-30  4:43     ` Bruce Allen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox