Forum Index  ViceVersa HOME         FAQ and Knowledge Base

 FAQForum FAQ   SearchSearch Forum  RegisterRegister 
 ProfileProfile   Log inLog in 

SMART not stopping backup.

 
Post new topic   Reply to topic     Forum Index -> Support
Author Message
KenMathers



Joined: 03 Apr 2008
Posts: 4

PostPosted: Thu Apr 03, 2008 4:19 am    Post subject: SMART not stopping backup. Reply with quote

I've set up the global_start.bat file to run smartctl.exe.
I have a disk that I know is dodgy so I set the smartctl.exe to check it before running the backup. (Although neither the source or destination is on the dodgy disk)
The backup profile is launched by VVLauncher.
When I look at the log file I see that it clearly ran the script and the script reported that the disk will fail within 24 hrs.
But the script also says that it gave an exit code of zero and the script continued.
I'm using ViceVersa Pro 2 Build 2014 and I just downloaded the global_start.bat and smartctl.exe from this forum today.
Any ideas?

2008-04-03 16:42:30 : SMART support is: Enabled
2008-04-03 16:42:30 : === START OF READ SMART DATA SECTION ===
2008-04-03 16:42:30 : SMART overall-health self-assessment test result: FAILED!
2008-04-03 16:42:30 : Drive failure expected in less than 24 hours. SAVE ALL DATA.
2008-04-03 16:42:30 : Failed Attributes:
2008-04-03 16:42:30 : ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
2008-04-03 16:42:30 : 5 Reallocated_Sector_Ct 0x0033 001 001 010 Pre-fail Always FAILING_NOW 2460
2008-04-03 16:42:30 : End Script Output
2008-04-03 16:42:30 : Script return code: 0
2008-04-03 16:42:30 : Checking source C:\Change_Address\ ...
Back to top
TGRMN Software
Site Admin


Joined: 10 Jan 2005
Posts: 8763

PostPosted: Thu Apr 03, 2008 10:59 am    Post subject: Reply with quote

Hi, the manual for the smartctl.exe program says

Quote:
RETURN VALUES
The return values of smartctl are defined by a bitmask. If all is well
with the disk, the return value (exit status) of smartctl is 0 (all
bits turned off). If a problem occurs, or an error, potential error,
or fault is detected, then a non-zero status is returned.


If you run the smartctl.exe command on the drive without using ViceVersa does it return the right code ?
Are you using Windows 2000 ? (I know there could be a problem with return codes on Windows 2000)

thanks
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
KenMathers



Joined: 03 Apr 2008
Posts: 4

PostPosted: Thu Apr 03, 2008 8:16 pm    Post subject: Bat file needs modifying Reply with quote

OK. I'm not a programmer so I only stumbled on this by accident following your question. You asked what the exit status is when I run the script outside ViceCersa. And when I ran it (global_start.bat) as supplied, I had no way to know. So I added lines at the end of the script:
echo %ERRORLEVEL%
Pause

And this showed the error code as 24.
But it occured to me that VV would not see that code and after google'ing I found that the script needs to pass that errorlevel out when it exits. (Obvious to all you programmers out there but not to Joe Blogs on the street)
So the solution was to add the following (after removing my test lines) to the global_start.bat that I downloaded from your web site:
Exit %ERRORLEVEL%
Now the Backup stops as expected and the log file shows:
2008-04-04 09:06:21 : End Script Output
2008-04-04 09:06:21 : Script return code: 24
2008-04-04 09:06:21 : [ERROR] Script "C:\Program Files\ViceVersa Pro 2\GlobalScripts\Global_start.bat" returned an exit code not equal to 0. Stopping execution.
2008-04-04 09:06:21 : Exit Code: 2. Execution not completed. [ERROR]
2008-04-04 09:06:21 : ************************************************************
2008-04-04 09:06:21 : END ID: 20084320621-1702488-4940

Problem solved...
Back to top
TGRMN Software
Site Admin


Joined: 10 Jan 2005
Posts: 8763

PostPosted: Mon Apr 07, 2008 11:25 am    Post subject: Reply with quote

thanks for checking this! We will update the SMART script with echo %ERRORLEVEL%
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
pb



Joined: 04 Sep 2007
Posts: 32

PostPosted: Thu Apr 24, 2008 10:43 pm    Post subject: Reply with quote

TGRMN Software wrote:
thanks for checking this! We will update the SMART script with echo %ERRORLEVEL%


TGRMN: Note that echo %ERRORLEVEL% will only alert the user; apparently you need exit %ERRORLEVEL% to return the exit status to the prog.

Also note that there are newer versions of the smartctl program available.

--peter
Back to top
TGRMN Software
Site Admin


Joined: 10 Jan 2005
Posts: 8763

PostPosted: Wed Aug 20, 2008 6:05 am    Post subject: Reply with quote

The script was amended and updated with the latest version of the SMART program. thanks
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Support All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group
Copyright © TGRMN Software. TGRMN Software products: