Home » Infrastructure » Unix » Not getting proper format in email (solaris 10)
Not getting proper format in email [message #359077] Thu, 13 November 2008 12:25 Go to next message
sonumalhi
Messages: 62
Registered: April 2008
Member
Hi Guys

I have written the following the script to monitor the ASM diskgroups and send the email to the group about the current usage of Diskgroups.

Scripts is working fine but the only problem I am facing is the format is not proper in the email which makes us very hard to read it.
Here is scripts which I am using..

. ./.profile

ORACLE_SID='+ASM1'; export ORACLE_SID
sqlplus -s / as sysdba << EOF
set echo off pages 30 feed off lines 200
spool asm.txt
set lines 100
col "% Used" format 999
col "TOTAL GB" format 99999
SELECT name,
trunc(free_mb/1024) as "FREE GB",
trunc((total_mb/1024)) as "TOTAL GB"
FROM V\$ASM_DISKGROUP order by 2 desc;
spool off

EOF

mailx -s "ASM STATUS ON GRID " "xxx@yy.com" > /dev/null < /export/home/oracle/asm.txt


I am attachiung the o/p for both asm.txt and mail.

NAME FREE GB TOTAL GB
------------------------------ ---------- --------
ARCH 1418 1542
INDIGO_UNDO 383 384
INDIGO_PARAMETRIC_INDEXES 301 1923
PDCA_INDEX 268 449
ZFRC_INDEX 211 386
ZV_DATA 189 192
ZV_INDEX 189 192
INDIGO_DATA 175 5386
INDIGO_TEMP 160 384
INDIGO_SYSAPP 150 577
INDIGO_INDEX 137 3847
DATA 93 545
INDIGO_PARAMETRIC_DATA 84 1667
INDEX 69 193
PDCA_DATA 58 449
ZFRC_DATA 40 161
TEMP 6 99
INDIGO_REDO 3 24
REDO_LOGS 0 8


Mail 0/p

NAME FREE GB TOTAL GB
------------------------ ---------- --------
ARCH 1418 1542
INDIGO_UNDO 383 384
INDIGO_PARAMETRIC_INDEXES 301 1923
PDCA_INDEX 268 449
ZFRC_INDEX 211 386
ZV_DATA 189 192
ZV_INDEX 189 192
INDIGO_DATA 175 5386
INDIGO_TEM 160 384
INDIGO_SYSAPP 150 577
INDIGO_INDEX 137 3847
DATA 93 545
INDIGO_PARAMETRIC_DATA 84 1667
INDEX 69 193
PDCA_DATA 58 449
ZFRC_DATA 40 161
TEMP 6 99
INDIGO_REDO 3 24
REDO_LOGS 0 8


Anything that we are missing here.
Thanks In Advance.

Mehtab

Re: Not getting proper format in email [message #359078 is a reply to message #359077] Thu, 13 November 2008 12:27 Go to previous messageGo to next message
sonumalhi
Messages: 62
Registered: April 2008
Member
OOPS.....
Both format looks same after I posted ...
But they are different.
Re: Not getting proper format in email [message #359081 is a reply to message #359078] Thu, 13 November 2008 12:33 Go to previous messageGo to next message
sonumalhi
Messages: 62
Registered: April 2008
Member
Please see the attachement
Re: Not getting proper format in email [message #359324 is a reply to message #359081] Fri, 14 November 2008 15:32 Go to previous message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
The reason is the same both for the mail program and for the forum.

If you only display the spool file in programs that can't handle plain text correctly because they default displaying everything as HTML, you could add an

set markup HTML on


before the spool command.

Previous Topic: perform export timestamping my dumpfile while utilizing parameter
Next Topic: how to find Forms version installed on Unix box?
Goto Forum:
  


Current Time: Thu Dec 08 16:17:05 CST 2016

Total time taken to generate the page: 0.10322 seconds