Results 1 to 6 of 6

Thread: Need script to save my files after every 6 second interval

  1. #1
    Join Date
    Jul 2010
    Posts
    58

    Need script to save my files after every 6 second interval

    I just currently originate out by means of the intention of my harddrive (WD Caviar Green WD20EARS 2 TB) is affliction commencing a serious tribulations. The harddrive parks the head each 7 seconds if there's no action. The greatest numeral of parks/unparks is 300.000 intended for a server, this be able to be actually terrible and my harddrive determine to die extremely hurriedly if something is not being completed regarding it. Therefore I sympathetically ask if somebody would desire to write a script to save a number of text to a file each 6 seconds or save a file the entire 6 seconds on a unambiguous location in my /home/ etc. For the reason by means of the intention of systems fail: hard drives fail, creating it impossible to get your data commencing them; systems and software crash, from time to time corrupting or eliminating your significant documents. And people fail too: encompass you ever unintentionally erased a file by means of the intention of you essential. I have comprised nad completed it too many times. By means of a backup, you are predominantly protected merely the extremely most recent changes, if several, are lost when I restore a backed-up file.

  2. #2
    Join Date
    Nov 2008
    Posts
    1,185

    Re: Need script to save my files after every 6 second interval

    If I might recommend, writing to a file for the entire 6 seconds is not probable to fix the tribulations. It might, additional than it almost certainly would not, for the reason with the intention of the drive determine to accumulation the filesave. Perhaps if you ran `sync` command subsequent to every save, it would run. On the other hand, I tranquil would like to recommend with the intention of this is not the most excellent method to go regarding this, at least not this early in the game. The suitable thing to do, would be to examine if your HDD is capable of several advanced characteristic and controls (it's modern, so be supposed to encompass some settable characteristic) and utilize `hdparm` or `sdparm` to adjust or put out of action the powersaving characteristic of the drive, to put out of action.

  3. #3
    Join Date
    Nov 2009
    Posts
    1,035

    Re: Need script to save my files after every 6 second interval

    I got assist commencing from a friend and I was told to add the "sync" with the intention of you in addition contained in your script to essentially write the data to the hard drive as an alternative of caching it. And to run this in an everlasting loop commencing startup I added the script to the /etc/rc.local regarding the solution utilizing hdparm. I have comprised and got a long register of alternative and non of them got my concentration except ". To put out of action Seagate auto-powersaving mode". I am undecided to utilize approximately several obtainable alternative in hdparm in view of the fact with the intention of some of them might be "(tremendously hazardous)" as written by the menu. Other than if the predicament might be solved in this way as an alternative, it would be great!

  4. #4
    Join Date
    May 2008
    Posts
    859

    Re: Need script to save my files after every 6 second interval

    I would rather observe an hdparm solution, on the other hand in view of the fact with the intention of you are utilizing a WD drive, a Seagate alternative would not be suggested. Despite the warnings in hdparm, I have comprised certainly not had it nuke no matter which, and I have even endeavour some of the nukerizer alternative other than, the warnings be obliged to be there for a reason, so your prudence is wise. Until a superior explanation presents itself, keep in mind to divergence the endless loop off of your rc.local script by ending the script command by means of a "&" or putting it into a utility and forking off the function call, or your rc.local script determine to by no means come to an end execution. The complete point is to encompass the script running continuously or do you mean the rc.local file implementation itself. An endless loop determine to run continuously, other than if your rc.local script for no reason terminates for the reason with the intention of it is sitting there working an endless loop, your boot procedure might not totally finish, and the apparatus determine to immediately sit there running the (rc.local file) endless loop everlastingly, and never shift on to essentially doing whatever you turned it on to do.

  5. #5
    Join Date
    May 2008
    Posts
    962

    Re: Need script to save my files after every 6 second interval

    The above scripts determine to accomplish the similar thing: the endless loop determine to begin running, and run everlastingly. On the other hand, if this is rc.local, the primary illustration determine to remain at the point of implementation where the endless loop is coded, and by no means ever exit, leaving the apparatus everlastingly not finishing the boot procedure. The second illustration, determine to fork the endless loop itself, off into the background where it determine to contentedly run on its own, and cracking it commencing the rc.local script, permitting the rc.local script to terminate implementation and thus the apparatus to comprehensive booting. Alternately, if you position this diminutive code into a separate file with the intention of you are calling commencing within rc.local, you would call by means of the intention of exterior script I am in addition interested in be familiar by means of what type of drive you has. Other than meanwhile, I give the impression of being at the -B alternative, and it is not manufacturer specific I do not be familiar by means of if this determine to fix it for your drive.

  6. #6
    Join Date
    Mar 2010
    Posts
    732

    Re: Need script to save my files after every 6 second interval

    These are obviously the mainly significant and hardest to recreate, for the reason that you or additional generated them commencing imagination and hard work or for the reason with the intention of you paid for them. This contains changes you have comprised made to personal settings. These are easier to do the entire in excess of again than your documents, other than you would hate to lose them it takes time to go back to the beginning them. This category contains installed system software (first and foremost Linux) and submission software (such as OpenOffice, Firefox, and the Apache Web server). Such software is able to frequently be restored by reinstalling, other than not constantly. The backups be able to be started mechanically by your system at certain times of the day. Most of them determine to discuss how to utilize the Linux scheduler tool, recognized as cron, to do this. Or you be able to physically start a backup, if at all possible at the end of the day subsequent to you are done utilizing the system.

Similar Threads

  1. Replies: 1
    Last Post: 19-10-2010, 08:36 AM
  2. Shell script to add the extension to doc and pdf files
    By Tailor in forum Software Development
    Replies: 4
    Last Post: 24-02-2010, 10:51 PM
  3. Script to convert SWF files into Images
    By Anathakrishnan in forum Software Development
    Replies: 3
    Last Post: 25-03-2009, 09:43 AM
  4. Delete files with logoff/on script
    By Pine Le in forum Windows Security
    Replies: 1
    Last Post: 03-06-2008, 11:19 PM
  5. Need a script to delete temporary ASP.NET files
    By Mak66 in forum Windows Server Help
    Replies: 2
    Last Post: 13-02-2008, 07:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,986,631.20704 seconds with 16 queries