script to monitor partition cant execute


 
Thread Tools Search this Thread
Operating Systems Solaris script to monitor partition cant execute
# 8  
Old 06-27-2008
hi

try that

echo | mailx -s "Oracle filesystem 0 has less than 100k free." adzuan@nc.com.my
# 9  
Old 06-27-2008
With the format you're using for mailx, it will definately hang forever.
this format will "from command line" give you a new line, where you type in a message, and every newline will do the same, until you type in a . "dot"
then it will send all the text you typed in with the subject.

mailx expects a message of some sort, by default, not just a subject!

The correct format within a script is:

Code:
mailx -s "subject" email_address < FILENAME > /dev/null 2>&1
# or if you don't want to use a file
mailx -s "subject" email_address << EOD > /dev/null 2>&1
EOD

if you don't redirect to /dev/null it'll complain about an empty message, and cron will not like that.
# 10  
Old 07-01-2008
Hi All....First i would like to say thanks a lot to u guys for contributing an idea.

To csenewbie, tq for suggesting to try the mailx command manually

To denn, tq for giving me an idea to successfully run the script from crontab
-------------------------------------------------------------------------
Today i managed to run the script and it work fine.

This is the mailx command that i used in the script.

mailx -r oraadm@juwpkl.gov.my -s "Oracle filesystem $i has less than 5000000k free." adzuan@nc.com.my
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Script monitor website wth default tomcat script

Hi all, on our application server we have the following script that monitor the status of the website, my problem here is that i have edite the retries from 3 to 5, and the timewait to 120 second, so the script should check 5 times every 2 minutes, and if the fifth check fails it must restart... (0 Replies)
Discussion started by: charli1
0 Replies

2. Infrastructure Monitoring

Searching for Saas Monitor service which monitor my servers which are sitting in different providers

Sorry if this is the wrong forum Searching for Saas Monitor service which monitor my servers which are sitting in different providers . This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard. The info I need is CPU / RAM / my servers status (... (1 Reply)
Discussion started by: umen
1 Replies

3. Red Hat

Shrink LVM partition & create new Linux Primary partition

Hello All, I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows, /boot - Linux Partition & another is LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc). Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies

4. Filesystems, Disks and Memory

Ask concept soft partition vs hard partition

Hi Experts I would like to know different between soft partition concept and hard partition concept on solaris. Here is little explanation between soft partition concept and hard partition concept on solaris. Soft Partition: 1TB total space available in storage in all mapped to the OS to... (2 Replies)
Discussion started by: edydsuranta
2 Replies

5. Solaris

Partition overlaps another partition while creating new parition in solaris

hi all while formatting hard disk i am getting following error. Partition 1 ends at 266338338 It must be between 34 and 143374704. label error: EFI Labels do not support overlapping partitions Partition 8 overlaps partition 1. Warning: error writing EFI. Label failed. I have formatted the... (2 Replies)
Discussion started by: nikhil kasar
2 Replies

6. Shell Programming and Scripting

Monitor log file and execute command

I would like to monitor a log file using a shell script and as soon as a line with a certain string in it appears I would like to run a program. I have been playing around with doing this using tail -f, but cannot get it to work. I found something similar here:... (1 Reply)
Discussion started by: danielsbrewer
1 Replies

7. Shell Programming and Scripting

script execute or no execute

o hola.. Tengo un script que se ejecuta bajo una tarea del CronJOb del unix, tengo la version 11 de unix, mi script tiene un ciclo que lee unos archivos .txt luego cada uno de esos archivos debe pasar por un procedimiento almacenado el cual lo tengo almacenado en mi base de datos oracle 10g,... (4 Replies)
Discussion started by: Kespinoza97
4 Replies

8. UNIX for Dummies Questions & Answers

I've created a partition with GNU Parted, how do I mount the partition?

I've created a partition with GNU Parted, how do I mount the partition? The manual information at http://www.gnu.org/software/parted/manual/parted.html is good, but I am sure about how I mount the partition afterwards. Thanks, --Todd (1 Reply)
Discussion started by: jtp51
1 Replies

9. UNIX for Dummies Questions & Answers

understanding logical partition, physical partition

hi, 1) is logical partition the same as physical partition except that one is physical and the other is logical? 2) then it must a one to one ratio? (3 Replies)
Discussion started by: yls177
3 Replies
Login or Register to Ask a Question