04-17-2012
try and modify this:
Quote:
#!/bin/bash
for a in "$(du -s $1)"
do
spc=$(echo $a|cut -d" " -f1)
if [ $spc -gt 100000 ]
then
echo "alert on $1, the space is $spc"|mail
wyw@wyw.world -s "Alert space"
fi
done
pass a directory as argument.
adjust the max value when needed
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am trying to write a script to Count Files in a directory located on a remote server and send an email Notification if it exceeds a limit. The code given below doesnot check the condition and sends the mail everytime irrespective of the condition. I have put this script in the cron. Can... (10 Replies)
Discussion started by: amitsayshii
10 Replies
2. Shell Programming and Scripting
Hi !
I am a newbie and never officially wrote a shell script before.
The requirement for this script is :
1) Read a file called 'bpm.log' and identify if it has a specific text such as 'this is the text'. Its a static value and that is the only text we need to read.
2) If that... (2 Replies)
Discussion started by: atechcorp
2 Replies
3. Shell Programming and Scripting
Hi Experts,
I have a script like
$ORACLE_HOME/bin/sqlplus username/password # << ENDSQL
set pagesize 0 trim on feedback off verify off echo off newp none timing off
set serveroutput on
set heading off
spool Schemaerrtmp.txt
select ' TIMESTAMP COMPUTER NAME ... (5 Replies)
Discussion started by: welldone
5 Replies
4. Shell Programming and Scripting
Hi Guys,
I have a postfix server which is deferring emails. Now I need to send notification to a specific email address if:
The sender of the deferred email is: abc@example.com
Contains specific subjects: a file (/opt/subjects) contains all the subjects in place
Then need to send a... (0 Replies)
Discussion started by: linuxrulz
0 Replies
5. UNIX for Advanced & Expert Users
All,
I am new to shell scripting and trying to get the count of files that starts with error and with extension .out, if the count is greater than 0 and zip the file and send an email with the content of error.out file, here is my script
cd /temp
testcount =$('find . -name '*.out' -print |... (4 Replies)
Discussion started by: luckydoll
4 Replies
6. Shell Programming and Scripting
Hi.
I'm new on this forum and I need if possible someone to help me with one script.
The script should act like this:
- should be run by crontab and have next parameters:
script_name $par1 $par2 $par3 $par4
where script will search in dir $par1 for files with mask $par2 and if number of... (2 Replies)
Discussion started by: atrailm
2 Replies
7. UNIX for Dummies Questions & Answers
I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms.
Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
8. Shell Programming and Scripting
i have below code to count number of rows in file1.txt, if the row count is more than one then i have sending an email along with file1.txt attached and fail the process(do nothing if count is <=1),
if I test individually count part works good but when i include the email part its not working,... (1 Reply)
Discussion started by: srini_106
1 Replies
9. Shell Programming and Scripting
i have below code to count number of rows in file1.txt, if the row count is more than one then i have sending an email along with file1.txt attached and fail the process(do nothing if count is <=1),
if I test individually count part works good but when i include the email part its not working,... (4 Replies)
Discussion started by: srini_106
4 Replies
10. Shell Programming and Scripting
Hi Unix Members,
Can anyone guide me to write one shell script to monitor the attach screen processes and when interrupted mail us. ,
like the processes - /bin/ciserver , /bin/clock , /bin/cserver , /bin/main
Please looking forward you guys help. (6 Replies)
Discussion started by: biswajitnitd
6 Replies
dtest(1) USER COMMANDS dtest(1)
NAME
dtest - simple uDAPL send/receive and RDMA test
SYNOPSIS
dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-s]
dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-h HOSTNAME]
DESCRIPTION
dtest is a simple test used to exercise and verify the uDAPL interfaces. At least two instantiations of the test must be run. One acts as
the server and the other the client. The server side of the test, once invoked listens for connection requests, until timing out or killed.
Upon receipt of a cd connection request, the connection is established, the server and client sides exchange information necessary to per-
form RDMA writes and reads.
OPTIONS
-P=PROVIDER
use PROVIDER to specify uDAPL interface using /etc/dat.conf (default OpenIB-cma)
-b=BUFFER_SIZE
use buffer size BUFFER_SIZE for RDMA(default 64)
-B=BURST_COUNT
use busrt count BURST_COUNT for interations (default 10)
-v, verbose output(default off)
-c, use consumer notification events (default off)
-p, use polling (default wait for event)
-d, delay in seconds before close (default off)
-s, run as server (default - run as server)
-h=HOSTNAME
use HOSTNAME to specify server hostname or IP address (default - none)
EXAMPLES
dtest -P OpenIB-cma -v -s
Starts a server process with debug verbosity using provider OpenIB-cma.
dtest -P OpenIB-cma -h server1-ib0
Starts a client process, using OpenIB-cma provider to connect to hostname server1-ib0.
SEE ALSO
dapltest(1)
AUTHORS
Arlin Davis
<ardavis@ichips.intel.com>
BUGS
uDAPL 1.2 February 23, 2007 dtest(1)