Sponsored Content
Full Discussion: solaris mail query
Operating Systems Solaris solaris mail query Post 302073235 by jabberwocky on Thursday 11th of May 2006 07:21:22 AM
Old 05-11-2006
solaris mail query

Hi,

I have deployed the same script on a number of Solaris application servers.
It is run by cron every ten minutes to check the OS for application daemons.
If any of the daemons is found not running, a message is generated to a temporary file.
At the end of the script the there is a check to see if the temporary file
exists. If the file exists, its contents are sent via /usr/ucb/mail through an ms exchange relay server using the following code:

if [ -s /tmp/daemon_check.$$ ]
then

cat /tmp/daemon_check.$$ | /usr/ucb/mail -s "Warning $Host" ourgroup@domain.co.uk

fi

There a is noticable difference in behaviour in the code on various servers.

On a V880 running SunOS 5.8 Generic_117350-28 the code does not work; the only way I can get any mailed response is to change the line

cat /tmp/daemon_check.$$ | /usr/ucb/mail -s "Warning $Host" ourgroup@ourdomain.co.uk

to

/usr/ucb/mail -s "Warning $Host" ourgroup@ourdomain.co.uk < /tmp/daemon_check.$$

The actual output received in MS Outlook has the "To:" field set to "root@bghgapp01.ourdomain.co.uk" and the Subject as "Output from "cron" command"; the contents of the mail is:

your "cron" job on bghgapp01
/usr/local/scripts/daemon_check.ksh

produced the following output:

No bseng process for genhgat
No wfeng process for genhgat

This behaviour is the same on another V880 running SunOS 5.8 Generic_117350-29.

This contrasts with the the output on a V440 running SunOS 5.9 Generic_118558-10; the subject field on the received email is correct - "Warning blpapp01", the "To:" field is OURGROUP which is also correct. The output in the mail body is also correct:

No wfeng process for llophte

The extra, unwanted output:

your "cron" job on bghgapp01
/usr/local/scripts/daemon_check.ksh

produced the following output:

is not present

The code that generates this correct version of the email is:

cat /tmp/daemon_check.$$ | /usr/ucb/mail -s "Warning $Host" ourgroup@ourdomain.co.uk

Can this difference be explained simply by the OS version?

Thanks,

J
 

10 More Discussions You Might Find Interesting

1. Solaris

solaris 10 installation query

Dear all I've downloaded Solaris 10 from Sun's website. The Operating system installation files are on 4 CD's. I boot with the first CD and start the installation. Then it reboots and start the installation al over again. If I take the CD out during the 1st reboot, then it cannot continue... (3 Replies)
Discussion started by: soliberus
3 Replies

2. Solaris

mail problems - how to send mail on solaris

Hello I am new user on solaris... I need to configure my solaris to be able to send mails... I know mailx command mailx -s hello address@address.com but I get an error... you have mail in /var/mail/root # hello... User unknown /dead.letter... Saved message in /dead.letter what... (10 Replies)
Discussion started by: amon
10 Replies

3. Shell Programming and Scripting

query about Attachement in mail

Hi All, I have general query that ...in my script i used uuencode option like below. cd /location (cat test.txt uuencode test.csv test.csv ) | mail -s "test mail" "mail_id" but whenever i run the above command its giving error like below ./testscript.sh: uuencode not found: ... (1 Reply)
Discussion started by: Shahul
1 Replies

4. Shell Programming and Scripting

UNIX Script to query Active Directory: give cn (NT login name) and receive mail (Email address)

Hi folks I need to write UNIX script (with ldapsearch) to query Active Directory. Input is NT login name and output is Email address. Attached a screenshot of Sysinternals "AD Explorer". I need to do the same in CLI. http://i.imgur.com/4s6FB.png I am absolute LDAP/ldapsearch noob. (0 Replies)
Discussion started by: slashdotweenie
0 Replies

5. Solaris

Mail issue solution query- host map: lookup (domain): deferred

Hi all I had a mail issue earlier today where I was not receiving any emails from the servers of one of our clients. The mail queue just showed this: -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- o8S7eSpp020274* 5858 Tue Sep 28 10:42... (0 Replies)
Discussion started by: notreallyhere
0 Replies

6. UNIX for Dummies Questions & Answers

[Solved] mail configuration related query

How do i configure my linux machine to send mail. I have two server out of which one is configured to send mails. However The other is still not sending mails .I have installed sendmail rpms and modified sendmail.mc file to include following parameter. dnl define(`SMART_HOST',... (0 Replies)
Discussion started by: pinga123
0 Replies

7. Shell Programming and Scripting

Executing SQL Query and sending a mail

Hi all, My reqirenet goes like this. Need to execute one select statement within the script and send a mail to the users with the number of records fecthed from the query. Please help.. Thanks. (3 Replies)
Discussion started by: Achiever
3 Replies

8. Solaris

Solaris Update Release Query

As a requirement for Oracle 11g I need Solaris 10 to be on at least update 6. I am currently on update 4. Applying the patch bundle isn't an option as the 11g upgrade pre-req checks needs to see that /etc/release specificies u6 or greater. What I'd like to know is, will installing the... (3 Replies)
Discussion started by: sonic72
3 Replies

9. Solaris

Solaris Upgrade Query

Hello I need to upgrade our Solaris 10 OS Update 9 as we are not ready for u10 yet. I asked MOS for Update 9 which they supplied and I've downloaded. The thing is, it's in a zip file which I have extracted on the server but all the docs I have seen regarding lu, talking iso, images and... (9 Replies)
Discussion started by: sonic72
9 Replies

10. UNIX for Dummies Questions & Answers

Solaris packages and installation query

Hi, Need a small help Bash$> pkginfo | grep -i compress system SUNWbzip The bzip compression utility system SUNWgzip The GNU Zip (gzip) compression utility system SUNWzip The Info-Zip (zip)... (9 Replies)
Discussion started by: mohtashims
9 Replies
install-solaris(1M)													       install-solaris(1M)

NAME
install-solaris - install the Solaris operating system SYNOPSIS
install-solaris install-solaris invokes the Solaris Install program. Depending on graphical capability and available memory at the time of invocation, install-solaris invokes either a text-based installer or a graphical installer. The following minimum requirements for physical memory dictate which features are available during installation: For SPARC machines: 128 MB Minimum physical memory for all installation types 128 MB Minimum physical memory required for windowing system 384 MB Minimum physical memory required for graphical-based installation For x86 machines: 256 MB Minimum physical memory for all installation types 256 MB Minimum physical memory required for windowing system 512 MB Minimum physical memory required for graphical-based installation In some cases, even if the minimum physical memory is present, available virtual memory after system startup can limit the number of fea- tures available. install-solaris exists only on the Solaris installation media (CD or DVD) and should be invoked only from there. Refer to the for more details. install-solaris allows installation of the operating system onto any standalone system. install-solaris loads the software available on the installation media. Refer to the for disk space requirements. Refer to the for more information on the various menus and selections. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcdrom (Solaris instal- | | |lation media) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ pkginfo(1), install(1M), pkgadd(1M), attributes(5) It is advisable to exit install-solaris by means of the exit options in the install-solaris menus. 23 Sep 2005 install-solaris(1M)
All times are GMT -4. The time now is 07:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy