Mail Archives: cygwin/2004/02/23/16:35:03
I'm Cc'ing the Cygwin mailing-list since others may be
interested in a S.M.A.R.T. tool that works with it. And someone
may even be able to help you.
I got it to compile under Cygwin (without -mno-cygwin).
What I did:
mv os_generic.c os_generic.c.old
ln -sf os_win32/os_win32.c os_generic.c
Then configure and make as usual.
During configure I got:
checking for sigset... no
During make I got:
/d/Linux/smartmontools/sm5-Windows/os_generic.c:47: error: conflicting types for `strtoull'
/usr/include/stdlib.h:174: error: previous declaration of `strtoull'
/d/Linux/smartmontools/sm5-Windows/os_generic.c: In function `strtoull':
/d/Linux/smartmontools/sm5-Windows/os_generic.c:49: warning: int format, different type arg (arg 3)
/d/Linux/smartmontools/sm5-Windows/os_generic.c:46: warning: unused parameter `base'
/d/Linux/smartmontools/sm5-Windows/os_generic.c: In function `make_device_names':
/d/Linux/smartmontools/sm5-Windows/os_generic.c:99: warning: unused parameter `devlist'
/d/Linux/smartmontools/sm5-Windows/os_generic.c:99: warning: unused parameter `name'
/d/Linux/smartmontools/sm5-Windows/os_generic.c: In function `ata_close':
/d/Linux/smartmontools/sm5-Windows/os_generic.c:495: warning: unused parameter `fd'
/d/Linux/smartmontools/sm5-Windows/os_generic.c: In function `escalade_command_interface':
/d/Linux/smartmontools/sm5-Windows/os_generic.c:613: warning: unused parameter `fd'
/d/Linux/smartmontools/sm5-Windows/os_generic.c:613: warning: unused parameter `disknum'
/d/Linux/smartmontools/sm5-Windows/os_generic.c:613: warning: unused parameter `command'
/d/Linux/smartmontools/sm5-Windows/os_generic.c:613: warning: unused parameter `select'
/d/Linux/smartmontools/sm5-Windows/os_generic.c:613: warning: unused parameter `data'
/d/Linux/smartmontools/sm5-Windows/os_generic.c: In function `aspi_io_call':
/d/Linux/smartmontools/sm5-Windows/os_generic.c:811: warning: long unsigned int format, HANDLE arg (arg 2)
/d/Linux/smartmontools/sm5-Windows/os_generic.c: In function `aspi_close':
/d/Linux/smartmontools/sm5-Windows/os_generic.c:849: warning: unused parameter `fd'
So, I commented the "Quick hack strtoull() for MSVC 6.0 using
sscanf" part and it compiled. I don't know if it's the right
thing to do.
I guess the unused warnings won't allow it to work on SCSI
drives ?
Anyway, at least smartctl -a /dev/hda worked on my ATA drive:
smartctl version 5.26 Copyright (C) 2002-3 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: MAXTOR 6L060J3
Serial Number: 663200252994
Firmware Version: A93.0500
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 5
ATA Standard is: ATA/ATAPI-5 T13 1321D revision 1
Local Time is: Mon Feb 23 18:18:41 2004 ESAST
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: (0x05) Offline data collection activity was
aborted by an interrupting command from host.
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: ( 35) seconds.
Offline data collection
capabilities: (0x1b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
No 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.
No General Purpose Logging support.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 30) minutes.
SMART Attributes Data Structure revision number: 11
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x0029 100 253 020 Pre-fail Offline - 0
3 Spin_Up_Time 0x0027 066 066 020 Pre-fail Always - 4287
4 Start_Stop_Count 0x0032 100 100 008 Old_age Always - 54
5 Reallocated_Sector_Ct 0x0033 100 100 020 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 093 023 Pre-fail Always - 0
9 Power_On_Hours 0x0012 076 076 001 Old_age Always - 16152
10 Spin_Retry_Count 0x0026 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0013 100 100 020 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 008 Old_age Always - 39
13 Read_Soft_Error_Rate 0x000b 100 100 023 Pre-fail Always - 0
194 Temperature_Celsius 0x0022 080 074 042 Old_age Always - 51
195 Hardware_ECC_Recovered 0x001a 100 003 000 Old_age Always - 6672101
196 Reallocated_Event_Count 0x0010 100 100 020 Old_age Offline - 0
197 Current_Pending_Sector 0x0032 100 100 020 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x001a 198 198 000 Old_age Always - 2
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 10323 -
# 2 Short offline Completed without error 00% 9584 -
# 3 Short offline Completed without error 00% 9582 -
# 4 Short offline Completed without error 00% 4924 -
Please let me know of any other commands I should test. Only
what won't eat my data or the drive itself.
BTW, smartd also compiled, but reports everything in "Event
Viewer". Here's:
The description for Event ID ( 0 ) in Source ( smartd ) cannot
be found. The local computer may not have the necessary
registry information or message DLL files to display messages
from a remote computer. You may be able to use the /AUXSOURCE=
flag to retrieve this description; see Help and Support for
details. The following information is part of the event: smartd
: PID 3384 : smartd version 5.26 Copyright (C) 2002-3 Bruce
Allen.
Then it repeats all the above in each message, so I removed
them:
Home page is http://smartmontools.sourceforge.net/
PID 3384 : Opened configuration file /etc/smartd.conf.
Configuration file /etc/smartd.conf parsed..
Device: /dev/hda, opened.
Device: /dev/hda, not found in smartd database..
Device: /dev/hda, is SMART capable. Adding to "monitor" list..
Monitoring 1 ATA and 0 SCSI devices.
smartd has fork()ed into background mode. New PID=3428..
On Mon, 23 Feb 2004, Christian Franke wrote:
>
> >Any news ?
> >
> >
>
> Glad you asked. The Win32/MSVC6 sources are checked in on
> RELEASE_5_26_WIN32_BRANCH.
>
> Checkout: cvs co -r RELEASE_5_26_WIN32_BRANCH sm5
>
> Build: Open project "./os_win32/smartctl_vc6.dsp" in VC6 (or .NET),
> select "Release" configuration and press F7 to build
> ./os_win32/smartctl.exe.
>
> I will provide a plain Makefile later (The Makefile generation of VC6 is
> somewhat broken).
>
> If you use the web interface to browse the sources, please note that the
> new (branch-only) files (int64.h, posix/*, os_win32/*) appear in the
> "Attic" directories.
>
> Thanks for any comment.
--
How to contact me - http://www.pervalidus.net/contact.html
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -