Guest Posted March 21, 2018 Share Posted March 21, 2018 ssd 512 GB fabios-iMac-Pro:~ fabio$ /Users/fabio/Downloads/smarter-3 disk0 Got a ATA like disk.. 2018-03-21 22:17:30.170 smarter-3[486:5650] { 182 = { "Pre-fail" = 0; RawValue = 0; Threshold = 10; Value = 100; WorstValue = 100; flag = 1; }; 199 = { "Pre-fail" = 0; RawValue = 3; Threshold = 0; Value = 99; WorstValue = 99; flag = 1; }; 195 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 9 = { "Pre-fail" = 0; RawValue = 4821; Threshold = 0; Value = 99; WorstValue = 99; flag = 1; }; 241 = { "Pre-fail" = 0; RawValue = 24441189400; Threshold = 0; Value = 99; WorstValue = 99; flag = 1; }; 5 = { "Pre-fail" = 1; RawValue = 0; Threshold = 10; Value = 100; WorstValue = 100; flag = 1; }; 187 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 235 = { "Pre-fail" = 0; RawValue = 790; Threshold = 0; Value = 99; WorstValue = 99; flag = 1; }; 183 = { "Pre-fail" = 1; RawValue = 0; Threshold = 10; Value = 100; WorstValue = 100; flag = 1; }; 181 = { "Pre-fail" = 0; RawValue = 0; Threshold = 10; Value = 100; WorstValue = 100; flag = 1; }; 179 = { "Pre-fail" = 1; RawValue = 0; Threshold = 10; Value = 100; WorstValue = 100; flag = 1; }; 177 = { "Pre-fail" = 1; RawValue = 33; Threshold = 0; Value = 99; WorstValue = 99; flag = 1; }; 12 = { "Pre-fail" = 0; RawValue = 3948; Threshold = 0; Value = 96; WorstValue = 96; flag = 1; }; 190 = { "Pre-fail" = 0; RawValue = 25; Threshold = 0; Value = 75; WorstValue = 75; flag = 1; }; } Got ATA-like disk.. S.M.A.R.T. status: Ok fabios-iMac-Pro:~ fabio$ mechanical drive 6 Tb fabios-iMac-Pro:~ fabio$ /Users/fabio/Downloads/smarter-3 disk5 Got a ATA like disk.. 2018-03-21 22:19:24.309 smarter-3[530:7412] { 194 = { "Pre-fail" = 0; RawValue = 51539607576; Threshold = 0; Value = 24; WorstValue = 24; flag = 1; }; 191 = { "Pre-fail" = 0; RawValue = 972; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 5 = { "Pre-fail" = 1; RawValue = 0; Threshold = 10; Value = 100; WorstValue = 100; flag = 1; }; 199 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 188 = { "Pre-fail" = 0; RawValue = 549764202624; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 240 = { "Pre-fail" = 0; RawValue = 69226282878105; Threshold = 0; Value = 100; WorstValue = 100; flag = 0; }; 10 = { "Pre-fail" = 1; RawValue = 0; Threshold = 97; Value = 100; WorstValue = 100; flag = 1; }; 193 = { "Pre-fail" = 0; RawValue = 15103; Threshold = 0; Value = 93; WorstValue = 93; flag = 1; }; 7 = { "Pre-fail" = 1; RawValue = 142803507; Threshold = 45; Value = 82; WorstValue = 82; flag = 1; }; 242 = { "Pre-fail" = 0; RawValue = 155260308113; Threshold = 0; Value = 100; WorstValue = 100; flag = 0; }; 190 = { "Pre-fail" = 0; RawValue = 404095000; Threshold = 40; Value = 76; WorstValue = 76; flag = 1; }; 4 = { "Pre-fail" = 0; RawValue = 3416; Threshold = 20; Value = 97; WorstValue = 97; flag = 1; }; 198 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 0; }; 187 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 12 = { "Pre-fail" = 0; RawValue = 1719; Threshold = 20; Value = 99; WorstValue = 99; flag = 1; }; 1 = { "Pre-fail" = 1; RawValue = 8756046; Threshold = 44; Value = 69; WorstValue = 69; flag = 1; }; 195 = { "Pre-fail" = 0; RawValue = 8756046; Threshold = 0; Value = 1; WorstValue = 1; flag = 1; }; 184 = { "Pre-fail" = 0; RawValue = 0; Threshold = 99; Value = 100; WorstValue = 100; flag = 1; }; 9 = { "Pre-fail" = 0; RawValue = 44994077395126; Threshold = 0; Value = 98; WorstValue = 98; flag = 1; }; 192 = { "Pre-fail" = 0; RawValue = 309; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 241 = { "Pre-fail" = 0; RawValue = 10157335003; Threshold = 0; Value = 100; WorstValue = 100; flag = 0; }; 189 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 3 = { "Pre-fail" = 1; RawValue = 0; Threshold = 0; Value = 86; WorstValue = 86; flag = 1; }; 197 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; } Got ATA-like disk.. S.M.A.R.T. status: Ok NVME 1tb Samsung 960 pro fabios-iMac-Pro:~ fabio$ /Users/fabio/Downloads/smarter-3 disk1 Got a NVMe disk.. h is what is expected si is what is expected Error: S.M.A.R.T. attribute check failed for disk 1 with status -536870178 fabios-iMac-Pro:~ fabio$ Link to comment Share on other sites More sharing options...
vector sigma Posted March 21, 2018 Share Posted March 21, 2018 Thanks fabiosun, I'm preparing another modified smarter cmd.. but I'm thinking Link to comment Share on other sites More sharing options...
Slice Posted March 21, 2018 Author Share Posted March 21, 2018 21 minutes ago, vector sigma said: Not sure about python, this is what I have.. the one shipped with the OS: FrancescoRs-MacBook-Pro:~ vectorsigma$ python -V Python 2.7.10 FrancescoRs-MacBook-Pro:~ vectorsigma$ and FrancescoRs-MacBook-Pro:~ vectorsigma$ which python /usr/bin/python FrancescoRs-MacBook-Pro:~ vectorsigma$ please ensure is the stock one. Anyway this is only used to set the image to the package. About HWMonitorSMC.app I have Xcode 9.2 and the log should show errors or something like that: "HWMonitorSMC.app v2.x requires Xcode 9 +" unless the app is built to another location but these are the clear settings: xcodebuild -quiet -project HWMonitorSMC.xcodeproj \ -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu` \ -sdk macosx \ -configuration Release \ CONFIGURATION_BUILD_DIR="${SRCROOT}/compilations/HWMonitorSMC2" \ SYMROOT="${SRCROOT}/compilations/HWMonitorSMC2/obj" I have python installed with macport needed for another projects iMac-2:hwsensors3 slice$ which python /opt/local/bin/python iMac-2:hwsensors3 slice$ Python 2.7.13 (default, Apr 25 2017, 11:00:18) And Xcode 9.2, although I have also Xcode8.3.3 on second partition. Link to comment Share on other sites More sharing options...
vector sigma Posted March 21, 2018 Share Posted March 21, 2018 3 minutes ago, Slice said: /opt/local/bin/python Yep, not the stock one. I think that you can add a module and be fine, or I can make a new command line to set an image and get rid of python 4 minutes ago, Slice said: And Xcode 9.2, although I have also Xcode8.3.3 on second partition. Ensure you are using Xcode 9.2 then. Please show the log. Link to comment Share on other sites More sharing options...
vector sigma Posted March 21, 2018 Share Posted March 21, 2018 (edited) .. i.e. set Xcode 9.2 as default application to open any .xcodeproj (right click->open with->Other... select Xcode9.2 and set it as default) Edited March 21, 2018 by vector sigma Link to comment Share on other sites More sharing options...
vector sigma Posted March 21, 2018 Share Posted March 21, 2018 (edited) fabiosun, Cyberdevs please try this: smarter.zip Edited March 21, 2018 by vector sigma 2 Link to comment Share on other sites More sharing options...
Guest Posted March 21, 2018 Share Posted March 21, 2018 fabios-iMac-Pro:~ fabio$ /Users/fabio/Downloads/smarter-4 disk1 Got a NVMe disk.. h is what is expected si is what is expected 2018-03-21 22:59:08.447 smarter-4[500:6055] { 914 = { "914 Number of error Log Entries (UInt64)" = 0; flag = 1; }; 912 = { "912 Unsafe Shutdowns (UInt64)" = 0; flag = 1; }; 910 = { "910 Power Cycles (UInt64)" = 0; flag = 1; }; 908 = { "908 Host Write Commands (UInt64)" = 0; flag = 1; }; 906 = { "906 Data Units Written (UInt64)" = 0; flag = 1; }; 904 = { "904 Percentage Used (UInt8)" = 0; flag = 1; }; 902 = { "902 Available Spare (UInt8)" = 0; flag = 1; }; 900 = { "900 Critical Warning (UInt8)" = 0; flag = 1; }; 913 = { "913 Media and Data Integrity Errors (UInt64)" = 0; flag = 1; }; 911 = { "911 Power On Hours (UInt64)" = 0; flag = 1; }; 909 = { "909 Controller Busy Time (UInt64)" = 0; flag = 1; }; 907 = { "907 Host Read Commands (UInt64)" = 0; flag = 1; }; 905 = { "905 Data unitd read (UInt64)" = 0; flag = 1; }; 903 = { "903 Available Spare Threshold (UInt8)" = 0; flag = 1; }; 901 = { "901 Temperature kelvin (UInt16)" = 65263; flag = 1; }; } Got a NVMe disk.. h is what is expected si is what is expected Error: S.M.A.R.T. check downgraded result for disk1 from VERIFIED to UNKNOWN because some error(-536870178) occured. S.M.A.R.T. status: Unknown fabios-iMac-Pro:~ fabio$ you win Link to comment Share on other sites More sharing options...
vector sigma Posted March 21, 2018 Share Posted March 21, 2018 Not entirely, we only get the temperature Link to comment Share on other sites More sharing options...
Guest Posted March 21, 2018 Share Posted March 21, 2018 better of nothing Link to comment Share on other sites More sharing options...
vector sigma Posted March 21, 2018 Share Posted March 21, 2018 unless other bitfield are ok Link to comment Share on other sites More sharing options...
Slice Posted March 22, 2018 Author Share Posted March 22, 2018 I tested HWMonitor2 on MacBookPro 2012 with Apple SSD 128Gb. All works except SSD life = 0%. It means dead? Link to comment Share on other sites More sharing options...
Slice Posted March 23, 2018 Author Share Posted March 23, 2018 I cam compile. It fine! iMac-2:hwsensors3 slice$ make pkg ** Building HWSensor's extensions r112 ** ..using the sdk: macosx10.11 ** Building HWMonitorSMC.app v1 ** ** Building HWMonitorSMC.app v2 ** ** Building HWSensors-3_r112.pkg ** [partutil] [seticon] [Pre] [HWMonitorSMC] [kextsToSLE] [FakeSMC] [IntelCPUMonitor] [AmdCPUMonitor] [GeforceSensor] [NVClockX] [RadeonMonitor] [X3100] [F718x] [ITEIT87x] [PC8739x] [W836x] [ACPIMonitor] [VoodooBatterySMC] [kextsToESP] [Post] Package name: HWSensors-3_r112.pkg iMac-2:hwsensors3 slice$ Link to comment Share on other sites More sharing options...
Slice Posted March 23, 2018 Author Share Posted March 23, 2018 But the package does not contain HWMonitor2 Link to comment Share on other sites More sharing options...
Cyberdevs Posted March 23, 2018 Share Posted March 23, 2018 On 3/22/2018 at 2:26 AM, vector sigma said: fabiosun, Cyberdevs please try this: smarter.zip Spoiler Got a NVMe disk.. h is what is expected si is what is expected 2018-03-23 10:27:08.275 smarter-4[3279:217917] { 914 = { "914 Number of error Log Entries (UInt64)" = 0; flag = 1; }; 912 = { "912 Unsafe Shutdowns (UInt64)" = 0; flag = 1; }; 910 = { "910 Power Cycles (UInt64)" = 0; flag = 1; }; 908 = { "908 Host Write Commands (UInt64)" = 0; flag = 1; }; 906 = { "906 Data Units Written (UInt64)" = 0; flag = 1; }; 904 = { "904 Percentage Used (UInt8)" = 0; flag = 1; }; 902 = { "902 Available Spare (UInt8)" = 0; flag = 1; }; 900 = { "900 Critical Warning (UInt8)" = 0; flag = 1; }; 913 = { "913 Media and Data Integrity Errors (UInt64)" = 0; flag = 1; }; 911 = { "911 Power On Hours (UInt64)" = 0; flag = 1; }; 909 = { "909 Controller Busy Time (UInt64)" = 0; flag = 1; }; 907 = { "907 Host Read Commands (UInt64)" = 0; flag = 1; }; 905 = { "905 Data unitd read (UInt64)" = 0; flag = 1; }; 903 = { "903 Available Spare Threshold (UInt8)" = 0; flag = 1; }; 901 = { "901 Temperature kelvin (UInt16)" = 65263; flag = 1; }; } Got a NVMe disk.. h is what is expected si is what is expected Error: S.M.A.R.T. check downgraded result for disk0 from VERIFIED to UNKNOWN because some error(-536870178) occured. S.M.A.R.T. status: Unknown The last one is working. Spoiler Got a ATA like disk.. 2018-03-23 10:29:28.460 smarter-4[3281:218734] { 194 = { "Pre-fail" = 0; RawValue = 36; Threshold = 0; Value = 107; WorstValue = 107; flag = 1; }; 5 = { "Pre-fail" = 1; RawValue = 0; Threshold = 140; Value = 200; WorstValue = 200; flag = 1; }; 240 = { "Pre-fail" = 0; RawValue = 1072; Threshold = 0; Value = 99; WorstValue = 99; flag = 1; }; 199 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 196 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 10 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 193 = { "Pre-fail" = 0; RawValue = 181427; Threshold = 0; Value = 140; WorstValue = 140; flag = 1; }; 7 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 242 = { "Pre-fail" = 0; RawValue = 4704679194; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 4 = { "Pre-fail" = 0; RawValue = 200; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 198 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 0; }; 12 = { "Pre-fail" = 0; RawValue = 169; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; 1 = { "Pre-fail" = 1; RawValue = 0; Threshold = 51; Value = 100; WorstValue = 100; flag = 1; }; 9 = { "Pre-fail" = 0; RawValue = 2521; Threshold = 0; Value = 97; WorstValue = 97; flag = 1; }; 192 = { "Pre-fail" = 0; RawValue = 35; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 241 = { "Pre-fail" = 0; RawValue = 4645587437; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 200 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 0; }; 3 = { "Pre-fail" = 1; RawValue = 2333; Threshold = 21; Value = 173; WorstValue = 173; flag = 1; }; 197 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 200; WorstValue = 200; flag = 1; }; 11 = { "Pre-fail" = 0; RawValue = 0; Threshold = 0; Value = 100; WorstValue = 100; flag = 1; }; } Got ATA-like disk.. S.M.A.R.T. status: Ok 1 Link to comment Share on other sites More sharing options...
vector sigma Posted March 23, 2018 Share Posted March 23, 2018 (edited) 17 hours ago, Slice said: I tested HWMonitor2 on MacBookPro 2012 with Apple SSD 128Gb. All works except SSD life = 0%. It means dead? Actually the code that read s.m.a.r.t. attributes is the same as app v1 and it look for attributes 177 that is under specific vendor data. That means that vendor can use the same location or not. ...why I mentioned to import smartmontools's code. In fact they are using a database for that: https://github.com/smartmontools/smartmontools/blob/master/smartmontools/drivedb.h ..but will be a long task.. Anyway I can tell that I sobstituted my old OCZ Vertex III (2011/2012) with a Samsung EVO because the app was reporting a life of 0%, the same was in Windows with another tool.... and also the bios UEFI was giving me an error about that. NOTE: I've decopiled iStat Menu and TechTool Pro and clearly uses smartmontools 9 hours ago, Slice said: I cam compile. It fine! iMac-2:hwsensors3 slice$ make pkg ** Building HWSensor's extensions r112 ** ..using the sdk: macosx10.11 ** Building HWMonitorSMC.app v1 ** ** Building HWMonitorSMC.app v2 ** ** Building HWSensors-3_r112.pkg ** [partutil] [seticon] [Pre] [HWMonitorSMC] [kextsToSLE] [FakeSMC] [IntelCPUMonitor] [AmdCPUMonitor] [GeforceSensor] [NVClockX] [RadeonMonitor] [X3100] [F718x] [ITEIT87x] [PC8739x] [W836x] [ACPIMonitor] [VoodooBatterySMC] [kextsToESP] [Post] Package name: HWSensors-3_r112.pkg iMac-2:hwsensors3 slice$ ok, that means that the app is compiled somewhere else other than: "${SRCROOT}/compilations/HWMonitorSMC2" can you tell me if the app is there (hwswnsor3/compilations/HWMonitorSMC2/) or you can locate it manually? EDIT Please sobstitute this files: makefile.zip makebin.zip makepkg.zip and tell me if that solve the problem Edited March 23, 2018 by vector sigma added new makefile + scripts Link to comment Share on other sites More sharing options...
Slice Posted March 23, 2018 Author Share Posted March 23, 2018 @vector sigma I am on weekend now and have no access to those computer so I can check only on monday evening. Thank you for the efforts. Concerning MacBookPro it really has dead SSD. The HWMonitor is right. 1 Link to comment Share on other sites More sharing options...
vector sigma Posted March 23, 2018 Share Posted March 23, 2018 35 minutes ago, Slice said: I am on weekend now and have no access to those computer so I can check only on monday evening. Thank you for the efforts. No problem. Anyway I commited those changes. 35 minutes ago, Slice said: Concerning MacBookPro it really has dead SSD. The HWMonitor is right. Bad for the ssd, good for HWMonitor. 1 Link to comment Share on other sites More sharing options...
Slice Posted March 24, 2018 Author Share Posted March 24, 2018 This is logical mistake for (currentAttributeIndex = 0; currentAttributeIndex < kSMARTAttributeCount; currentAttributeIndex++) { IOATASmartAttribute currentAttribute = smartDataVendorSpecifics.vendorAttributes[currentAttributeIndex]; if (currentAttribute.attributeId == kWindowSMARTsDriveTempAttribute || currentAttribute.attributeId == kWindowSMARTsDriveTempAttribute2) { UInt8 raw = currentAttribute.rawvalue[0]; temp = [NSNumber numberWithUnsignedInt:raw]; foundTemperature = YES; break; } if (currentAttribute.attributeId == kSMARTsDriveWearLevelingCount) { UInt8 raw = currentAttribute.current; life = [NSNumber numberWithUnsignedInt:raw]; // foundLife = YES; break; } } If foundTemperature then not search anything else... May be if (!foundTemperature && .... and without break? Link to comment Share on other sites More sharing options...
vector sigma Posted March 24, 2018 Share Posted March 24, 2018 Hi Slice. Honestly I want to rewrite all. There are two function: - (NSNumber *)getSMARTLifeForInterface:(IOATASMARTInterface **)smartInterface - (NSNumber *)getSMARTTempForInterface:(IOATASMARTInterface **)smartInterface and both mixed things, I want this much clear as possible and without using instance variables (global) that can be overwritten or not (life and temp). 1 Link to comment Share on other sites More sharing options...
Slice Posted April 6, 2018 Author Share Posted April 6, 2018 Currently I made changes as I proposed and wait for better solution. 1 Link to comment Share on other sites More sharing options...
vector sigma Posted April 6, 2018 Share Posted April 6, 2018 3 hours ago, Slice said: Currently I made changes as I proposed and wait for better solution. Hi, I'll take a look to it tonight. Currently I've created new code in both obj-c and what I think is the first world class in swift able to read s.m.a.r.t. attributes. Only I have problems dumping memory for nvme disks since I don't have one. @fabiosun done tens of tests in PM but always we receive kIOReturnCannotWire (i.e. can't wire down physical memory) and honestly I can't understand if this error is due to a small buffer or something else (like I cannot read memory from kernel space). So I decided to install High Sierra in virtualbox with a emulated nvme disk that really have s.m.a.r.t. attributes (tested with smartmontools), but that VM has really bad performances and is not currently able to run Xcode. I need to fix this problem, host boot with clover so if you have some advice I'll be really gratefull. Link to comment Share on other sites More sharing options...
Slice Posted April 6, 2018 Author Share Posted April 6, 2018 May be you can find here some answers to your questions https://www.dropbox.com/s/e1vgy2fyeohzr3i/NVM_Express_1_2_Gold_20141209.pdf?dl=0 NVM_Express_-_SCSI_Translation_Reference-1_5_20150624_Gold.pdf NVMe_Management_-_Technical_Note_on_Basic_Management_Command_1.0a.pdf 2 Link to comment Share on other sites More sharing options...
vector sigma Posted April 6, 2018 Share Posted April 6, 2018 Thanks, tonight I'll take a good look! Link to comment Share on other sites More sharing options...
magnifico Posted April 6, 2018 Share Posted April 6, 2018 3 hours ago, vector sigma said: Grazie, stasera darò una buona occhiata! Che test ti occorrono , ho Nvme ..fammi sapere Hellò Sergey , how are you? Link to comment Share on other sites More sharing options...
Slice Posted April 6, 2018 Author Share Posted April 6, 2018 @magnifico I am fine. Did you already tested new HWMonitorSMC2? The forum don't allow me to upload such big files so it can be downloaded from sf repository, the link is in my signature. Link to comment Share on other sites More sharing options...
Recommended Posts