06-23-2008
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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there an easy way to find all stale mounts on a system? (2 Replies)
Discussion started by: derf912
2 Replies
2. Solaris
hi,
i have currently below mounts in solaris box and i want to create new mount points.
please let me know how can i do it?
bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/ 1000M 350M 609M 37% /
/dev 1000M 350M ... (3 Replies)
Discussion started by: rags_s11
3 Replies
3. AIX
I have 2 mounts with me. Each 200 Gigs. I have some heavy duty processing, that may require more than 200 Gigs at time. Is there anyway that I can make the two points a clubbed up directory. Or create a symbolic link (bleahhh). Here are factors:
1. two mounts are two different hard drives. (just... (0 Replies)
Discussion started by: seemit
0 Replies
4. UNIX for Dummies Questions & Answers
I have a Netra T1 server running Solaris 8, It was installed by jump start, it does not have a cdrom drive.
Recetly it crashed so I rebooted it from >LOM poweron
and it came to run level 3, all file systems listed in /etc/vfstab are mounted, but /dev and / root are not writeable though in... (3 Replies)
Discussion started by: Tirmazi
3 Replies
5. Solaris
Hi,
How can i check if a particular Netapps NAS share being used on some other servers - ie: being accessed, mounted?
example:
somedir - rw, intr servernetapp.net.com:/vol/vol100/somedir is being mounted on some filesystem on other server.
is it possible to check on the NIS? (1 Reply)
Discussion started by: greencored
1 Replies
6. Solaris
Hi,
I was wondering, whether there is a limit regarding the max number of nfs mounts in
Oracle Solaris 10 (newest update).
The data center plans to migrate from a fibre channel based storage environment (hitachi) to a nfs based storage environment (netapp). Regarding the Solaris 10 database... (1 Reply)
Discussion started by: schms
1 Replies
7. Red Hat
I donot know much about CIFS but i have been asked to look into an issue related to mounting CIFS filesystem
On my redhat 5.6 the /etc/fstab file has the following entry
//172.25.x.x/de0/ /dir1/de0 cifs username=bodsadm,password=12345,dir_mode=0777,file_mode=0777,uid=de0adm,gid=sapsys,rw 0 0... (2 Replies)
Discussion started by: Tirmazi
2 Replies
8. UNIX for Advanced & Expert Users
Hello,
Iam trying to clone AS IS two mounts like below
/class_test/sa
/class_dev/fd
from one server onto another.
I want to use tar and gzip to compress. Please let me know the options I have to use.
Also I want to untar it in the destination server, so let me know how to do... (3 Replies)
Discussion started by: baanprog
3 Replies
9. Red Hat
We have 2 servers in cluster. Node1 has an ext3 mount for backups and the other connects using NFS to this node1.
I believe the reason it is configured in this manner is to not duplicate backups since this is a Database server. Not sure this was the reason though. Right now if node1 goes down all... (5 Replies)
Discussion started by: ikn3
5 Replies
10. Solaris
I have several Solaris 11.2 zones. when I reboot them I have to go in and do mountall to mount the NFS mounts.
any ideas where to troubleshoot why they are not automounting? (2 Replies)
Discussion started by: os2mac
2 Replies
SCRIPT(1) User Commands SCRIPT(1)
NAME
script - make typescript of terminal session
SYNOPSIS
script [options] [file]
DESCRIPTION
script makes a typescript of everything displayed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves the dialogue in this file. If no filename is given, the dialogue is saved in the file type-
script.
OPTIONS
-a, --append
Append the output to file or to typescript, retaining the prior contents.
-c, --command command
Run the command rather than an interactive shell. This makes it easy for a script to capture the output of a program that behaves
differently when its stdout is not a tty.
-e, --return
Return the exit code of the child process. Uses the same format as bash termination on signal termination exit code is 128+n.
-f, --flush
Flush output after each write. This is nice for telecooperation: one person does `mkfifo foo; script -f foo', and another can
supervise real-time what is being done using `cat foo'.
--force
Allow the default output destination, i.e. the typescript file, to be a hard or symbolic link. The command will follow a symbolic
link.
-q, --quiet
Be quiet (do not write start and done messages to standard output).
-t[file], --timing[=file]
Output timing data to standard error, or to file when given. This data contains two fields, separated by a space. The first field
indicates how much time elapsed since the previous output. The second field indicates how many characters were output this time.
This information can be used to replay typescripts with realistic typing and output delays.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
NOTES
The script ends when the forked shell exits (a control-D for the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
It is not recommended to run script in non-interactive shells. The inner shell of script is always interactive, and this could lead to
unexpected results. If you use script in the shell initialization file, you have to avoid entering an infinite loop. You can use for
example the .profile file, which is read by login shells only:
if test -t 0 ; then
script
exit
fi
You should also avoid use of script in command pipes, as script can read more input than you would expect.
ENVIRONMENT
The following environment variable is utilized by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed.
(Most shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism), scriptreplay(1)
HISTORY
The script command appeared in 3.0BSD.
BUGS
script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
script is primarily designed for interactive terminal sessions. When stdin is not a terminal (for example: echo foo | script), then the
session can hang, because the interactive shell within the script session misses EOF and script has no clue when to close the session. See
the NOTES section for more information.
AVAILABILITY
The script command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils
/util-linux/>.
util-linux June 2014 SCRIPT(1)