LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-19-2004, 03:57 PM   #1
trees
Member
 
Registered: Dec 2003
Location: Earth... I think!?
Distribution: Debian
Posts: 32

Rep: Reputation: 15
bash - how to take input as a variable?


Hello,

We are writing a backup script and were wondering - is there a way to have a script watch over the whole process?

For example:
The backup is running - backing up a client.
All of a sudden, disk defrag kicks in on the client side and slows down the process from 70MB/min to 70KB/min.
Is there a way to have a script watch for *KB/min and do an action if it sees it?

Also how can I transfer i/o between the scripts, have one 2>> and another take it as a variable?



Thanks!
 
Old 02-19-2004, 05:09 PM   #2
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 45
I don't know how 'technically' I would do this (google is usually the best at providing the example code), but could you not run a 2nd script that monitors file transfer speed between the client and server, then if the speed drops below a certain speed to perform the action you requested. You could run the script to monitor the speed every 30 seconds or so.

But on another note, is it wise to allow a defrag to occur whilst you are backing up anyway? Could it not potentially corrupt the backup?

If you manage to find a solution please post it up!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
csh: variable input of the form x.y.z not accepted kpachopoulos Programming 1 07-24-2005 05:39 PM
bash, how to get variable name from variable Duudson Programming 6 01-06-2005 05:38 PM
bash month variable johniccp Linux - Newbie 1 12-06-2004 02:41 PM
Variable with bash pinkysioux Programming 6 04-15-2004 09:46 PM
my mouse input is takes as keyboard input in BASH e1000 Slackware 5 12-08-2003 04:00 PM


All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration