Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers


UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 06-22-2008   -   Original Discussion by krisdasword
krisdasword krisdasword is offline
Registered User
Join Date: Jun 2008
Last Activity: 14 May 2009, 4:01 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


I'm new to Linux and to this forum too. Now, I need some info.

I have an application which writes some data onto one mount(logs and others).

Now, I want to have some convention or script where if the mount(where the application is writing data) reaches certain amount of memory or if it becomes full, then it should automatically write the data to the other mount in a specific directory.

How can I go about it?

Thanks in advance,
Sponsored Links
Old Unix and Linux 06-23-2008   -   Original Discussion by krisdasword
zaxxon's Unix or Linux Image
zaxxon zaxxon is offline Forum Staff  
code tag tagger
Join Date: Sep 2007
Last Activity: 15 November 2017, 7:27 AM EST
Location: St. Gallen, Switzerland
Posts: 6,574
Thanks: 176
Thanked 560 Times in 481 Posts
You can write a script that checks with "df" how much space is left and cut out the percentage with awk for example and write it into a variable, which is tested with "test" and/or "if". Only problem will be to tell your application to write into the other directory. Not sure how much of an option you have to configure it's output directory and if it must be restarted or if something like a "kill -1" can make it recognize the changed configuration.
The script itself is easy and a good excercise when being new to Linux/Unix Linux
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Max. number of NFS mounts schms Solaris 1 01-21-2011 10:05 AM
How to check NAS mounts being used ? greencored Solaris 1 09-17-2010 08:03 PM
Combining Mounts seemit AIX 0 06-19-2008 06:31 PM
new mounts rags_s11 Solaris 3 06-15-2008 07:40 AM
Unix Stale Mounts derf912 UNIX for Dummies Questions & Answers 2 08-01-2006 03:15 PM

All times are GMT -4. The time now is 03:50 AM.