Do not want repetition

We have a script to tracking down errors from log file.
We are receiving any new errors via email.
Now we do not want repetition of errors.
We want if there is same error message counter more than once, it should be appears only once.
We also want total count of errors on the top of our error log file.
Like total errors counter are 200.
Script:
SrchKey={"SRV|ERROR|EJP|EJQ|PMSVC|WCSVC|WRSCM|WRSRV|IWK|JVMSHR|JVMDUMP|UTE|SECJ|A
DMN0022E|HMGR01|IZ30962|SQL error|500|down"}
LogFile={opt/IBM/Oracle/PortalServer/log/SystemOut.log}
MailTo={"[email protected]"}
{[ ! -f /home/dn/alert.last ]} {&& touch /home/dn/alert.last}
{egrep $SrchKey $LogFile} > {home/dn/alert.new}
{if [ -s /home/dn/alert.new ] };then
{diff /home/dn/alert.new /home/dn/alert.last }> {/home/dn/alert.m
sg}
cp {home/dn/alert.new} { /home/dn/alert.last}
{[ -s /home/dn/alert.msg ] }&&
{mailx -v -s "Error/Warning message from Prod" $MailTo < /home/dn/alert.msg}
else
echo {"Nothing to report, sir." | mailx -s "No Alert Today" ${MailTo}}
{fi}
Any help will be appreiciated.
DN
Edited by: SDHN on Jul 9, 2009 10:23 AM

I have noticed in production, we do not have codes with http:// or test \
but we have repeating error messages issues.
Our code in production as below:
SrchKey="SRV|ERROR|EJP|EJQ|PMSVC|WCSVC|WRSCM|WRSRV|IWK|JVMSHR|JVMDUMP|UTE|SECJ|ADMN0022E|HMGR01|IZ30962|SQL error|500|down"
LogFile=/opt/IBM/Oracle/PortalServer/Out.log
MailTo="[email protected]"
[ ! -f /home/dn/alert.last ] && touch /home/dn/alert.last
egrep $SrchKey $LogFile > /home/dn/alert.new
if [ -s /home/dn/alert.new ] ;then
diff /home/dn/alert.new /home/dn/alert.last > /home/dn/alert.m
sg
cp /home/dn/alert.new /home/dn/alert.last
[ -s /home/dn/alert.msg ] &&
mailx -v -s "Error/Warning message from Prod " $MailTo < /home/dn/alert.msg
else
echo "Nothing to report, sir." | mailx -s "No Alert Today" ${MailTo}
fiEdited by: SDHN on Jul 14, 2009 9:17 AM

Similar Messages

  • I can not Keep shuffle on. It keeps turning off and I do not want to use Genius mixes as I want a variety at all times.  How do I fix this. It did not happen with my previous ipod.

    can not keep shuffle on. i do not want to use Genises mixes as i want to listen to a variety of musicnot the same type.

    Can anyone help me

  • I added an e-mail account to my iphone using microsoft exchange; all went fine. I then deleted a number of contracts from my phone that I did not want there and find they are now gone from my e-mail account on my computer.  Can I retrieve them?

    I added an e-mail account to my iphone using microsoft exchange; all went fine. I then deleted a number of contacts from my iphone that I did not want on my phone. when I went into my e-mail account on my computer the contacts were deleted from there also.  Will I be able to retrieve them?  If so, how?  Thank you.

    In the device sync pages select Photos on the top at the right.
    Un tick Sync Photos
    Apply

  • My ipod touch is in dfu mode and does not want to turn on.

    my ipod touch is in dfu mode and does not want to turn on.

    What happens when you connect the iPod to your computer and restore viia iTunes?

  • Can I purchase Mountain Lion and make a flash drive bootable? I do not want to install it on my Macbook Pro. I have Snow Leopard on my Macbook Pro now, and due to my hard drive needing repair I need to boot off of another source, like my flash drive.

    Can I purchase Mountain Lion and make a flash drive bootable? I do not want to install it on my Macbook Pro. I have Snow Leopard on my Macbook Pro now, and due to my hard drive needing repair, I need to boot off of another source, like my flash drive. I am in Paris and my Snow Leopard DVD is in Texas.

    Mac OS X has a built-in disk diagnostic and repair program called fsck or file system consistency check. Here’s how to verify and repair your startup disk with fsck.  As soon as you hear the startup tone, press and hold Command-S on the keyboard. Keep holding down those keys until you see a black screen with white lettering. This is called “booting into Single User Mode.”  As the Mac boots in this mode, the screen reports each step of the process. The line should end in root#.  Right after the root# prompt, enter the following: /sbin/fsck -fy
    If repairing the disk in single user mode fails, it means one of two things. Either your hard drive itself is failing (a hardware failure), or the directory damage on your hard drive is beyond the capability of the built-in repair procedures in OS X.

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

  • I want to update to LION,on my Macbook Pro duo core, (october 2006) because Adobe CC needs at least that. I know my computer is old, but works perfect to me and I do not want to stay in Adobe CS6 since I have access to Adobe Cloud CC. Please help.

    I want to update to LION,on my Macbook Pro CORE 2 DUO, (october 2006) because Adobe CC needs at least that. I know my computer is old, but works perfect to me and I do not want to stay in Adobe CS6 since I have access to Adobe Cloud CC. Please help.
    I probably dont want to go to Mountain Lion either because I've heard that it will slow down my computer, So, Lion 10.7 will be the perfect OS X for me.
    I have ne newest release of Snow Leopard installed and works great.
    Thank you ALL for your help.

    you will be ok updating to the new software but there will be some trade off. i have 3 macbooks 2006 that are all running the latest versions.
    some of the trade off are
    1-2 less of battery life
    slow wake ups from sleep
    slower start up time about 30-40 seconds longer then what you have now
    the operating system will use high % of your processer while idealing
    these are not the things you want to hear about a new os compared to the old one but this is how it is even with a new macbook pro. but it's not the end of the world. just make sure you have at least more then 2GB of ram and have a good harddrive and you will be ok.

  • If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    OUtlook was already set as the mail client for FF, and is my operating system (XP)'s default mail programme. therefore problem not solved at all. what I get whenever I follow a link in a webpage to send an e-mail is a little pop up window asking me to sign in to gmail or open an account. any other suggestions?

  • Can I obtain a CD-ROM with the latest revision of Adobe Reader for a Windows XP system w/ Service Pack 3. I do not want to go online with this system. I have dedicated it to read all of my PDF Files only.

    I have 4 computer systems, 2 of which run under Windows XP w/ Service Pack 3. I have dedicated these systems to the task of reading all of my PDF Files which I have collected from my recent college career. The desktop system I want to use is an old Dell Optiplex GX240 with Acrobat Reader 4.0. The other Windows XP system I have is an old HP Laptop with Adobe Reader 8.1.4 installed. I want to update both systems to the latest version that is available for Windows XP w/Service Pack 3 installed. So, because I do not want to place these system online, would it be possible for me to obtain a copy of the Adobe Reader software I need on a CD-ROM? - Ken DeWitt, a 68-Year-Young Vietnam Veteran and recent college graduate...Summa Cum Laude.

    You can use an in-line computer to download the full offline Reader installer from
    http://get.adobe.com/reader/enterprise/

  • Trying to sync iPod with library, but receive this message, "The iPod is synced with another itunes library.  Do you want to erase this ipod and sync with this itunes library".  I do not want to erase my iPod... Any suggestions??  Please help!!

    Trying to sync ipod with itunes library, but I keep getting this message, "  The ipod is synced with another itunes library.  Do you want to erase this ipod and sync with this i tunes library?" 
    I do not want to erase my ipod!!!  Any suggestions?? please help!

    Another way. You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive (works the same with an SD card) into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
    Using The iPad Camera Connection Kit
    http://support.apple.com/kb/HT4101
     Cheers, Tom

  • What should I do I do not want chrome

    What should I do I do not want chrome

    Settings-apps-all-chrome,disable.Download other browser from google play.
    All we have to decide is what to do with the time that is given to us - J.R.R. Tolkien

  • I bought a book on itunes, and can't open it. tried to send it to my iphone so i could read it there and it won't let me carry it over. I have updated Ibook on my iphone. What do I do? I do not want to buy the book again.

    I bought a book on itunes, and can't open it. tried to send it to my iphone so i could read it there and it won't let me carry it over. I have updated Ibook on my iphone. What do I do? I do not want to buy the book again.

    You won't be able to open it on your computer, ibooks can currently only be read in the iBooks app on an iPad, iPhone and iPod Touch. How were you trying to get it to your phone, syncing it by selecting it on the iPhone's Books tab when connected to your computer's iTunes, or by dragging-and-dropping it from the Books part of your iTunes library over and onto the iPhone 'device' ?  Another option is to try re-downloading it directly in the iBooks app on your iPhone via the Purchased tab in the ibookstore in it (re-downloading).

  • Insufficient Disk Space: What do I do? I do not want to delete all of my projects. If I delete them and then empty the trash it will free up some space but I have deleted way more than I am tryig to import.

    I keep getting a message when I try to import pics. Insufficient disk space. What do I do? I do not want to delete all of my pics!

    Easiest thing to do would be to buy an external hard drive and move your Aperture library to that drive.

  • I did made a copy of all my CC programms. for using on my other workstation. now is the CC desktop app not syncing the programme information. it do not see or sync the installed programms properly. what can i do. i do not want to download the hols set. be

    I did made a copy of all my CC programms. for using on my other workstation. now is the CC desktop app not syncing the programme information. it do not see or sync the installed programms properly. what can i do. i do not want to download the hols set. because of a slow connection

    If you are getting emails from these forums then you probably accidentally clicked on one of the links on the forums page where all the questions are listed e.g. at the top right of each forum's page there is text box with Actions and Notifications in :
    So far you've posted in the iTunes Store forum :
    https://discussions.apple.com/community/itunes/itunes_store#/
    And the Using iPad forum :
    https://discussions.apple.com/community/ipad/using_ipad#/
    If on either of those forums that box says 'stop email notifications' instead of 'receive' then click on it and it should stop that forum sending emails to you.
    There are full instructions on this page for stopping emails, as there are other places where they might have been set 'on' :  https://discussions.apple.com/docs/DOC-3661
    This is your original post for iTunes Match : https://discussions.apple.com/message/22647293#22647293
    And this page lists your posts (you can click on each post on it to be taken to it's thread) : https://discussions.apple.com/people/suzettemg?view=overview

  • How to avoid the duplicate values, I do not want the duplicate............

    i have one database table called "sms1" that table is updated every day or on daily basis it has the following fields in it:
    SQL> desc sms1;
    Name Null? Type
    MOBILE NUMBER
    RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)
    SNO NUMBER
    INDATE DATE
    From this table the is one column "RCSTCNATCNATCNATCNAWTHER VARCHAR2(39 CHAR)" . I am splitting it into different columns like :
    SQL> desc smssplit;
    Name Null? Type
    R VARCHAR2(2 CHAR)
    C VARCHAR2(2 CHAR)
    S VARCHAR2(1 CHAR)
    TC VARCHAR2(3 CHAR)
    NA VARCHAR2(3 CHAR)
    TC2 VARCHAR2(3 CHAR)
    NA2 VARCHAR2(3 CHAR)
    TC3 VARCHAR2(3 CHAR)
    NA3 VARCHAR2(3 CHAR)
    TC4 VARCHAR2(3 CHAR)
    NA4 VARCHAR2(3 CHAR)
    WTHER VARCHAR2(10 CHAR)
    SNO NUMBER
    INSERTDATA VARCHAR2(25 CHAR)
    Now I am written a procedure to insert the data from "Sms1" table to smssplit table...
    CREATE OR REPLACE PROCEDURE SPLITSMS
    AS
    BEGIN
    INSERT INTO scott.SMSSPLIT ( R,C,S,TC,NA,TC2,NA2,TC3,NA3,TC4,NA4,WTHER,SNO)
    SELECT SUBSTR(RCSTCNATCNATCNATCNAWTHER,1,2) R,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,3,2) C,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,5,1) S,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,6,3) TC,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,9,3) NA,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,12,3) TC2,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,15,3) NA2,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,18,3) TC3,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,21,3) NA3,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,24,3) TC4,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,27,3) NA4,
    SUBSTR(RCSTCNATCNATCNATCNAWTHER,30,10) WTHER, SNO
    FROM scott.SMS1 where SNO=(select MAX (sno) from SMS1);
    END;
    Now in order to update the second table with data from first table on regular basis I have written a job scheduler and I am using oracle 9.0. version...
    DECLARE
    X NUMBER;
    JobNumber NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    job => X
    ,what => 'scott.SPLITSMS;'
    ,next_date => SYSDATE+1/1440
    ,interval => 'SYSDATE+1/1440 '
    ,no_parse => FALSE
    :JobNumber := to_char(X);
    END;
    Now this job scheduler is working properly and updating the data for every one minute but it is taking or updating the duplicate values also ..like example:
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:49:16
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:49:16
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:50:17
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:50:17
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:51:19
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:51:19
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:52:20
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:52:20
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:53:22
    R C S TC NA TC2 NA2 TC3 NA3 TC4 NA4 WTHER SNO
    INSERTDATA
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:53:22
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:54:45
    33 35 2 123 456 789 543 241 643 243 135 RRRRRR 55
    06-SEP-2012 03:54:45
    Now I do not want the duplicate values to be updated ...and want them to ignore them.....
    please I need a help on this query........How to avoid the duplicate values............

    Look at the posts closely:might not be needed if formatted ;)
    create or replace procedure splitsms as
    begin
      insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
      select substr(rcstcnatcnatcnatcnawther,1,2) r,
             substr(rcstcnatcnatcnatcnawther,3,2) c,
             substr(rcstcnatcnatcnatcnawther,5,1) s,
             substr(rcstcnatcnatcnatcnawther,6,3) tc,
             substr(rcstcnatcnatcnatcnawther,9,3) na,
             substr(rcstcnatcnatcnatcnawther,12,3) tc2,
             substr(rcstcnatcnatcnatcnawther,15,3) na2,
             substr(rcstcnatcnatcnatcnawther,18,3) tc3,
             substr(rcstcnatcnatcnatcnawther,21,3) na3,
             substr(rcstcnatcnatcnatcnawther,24,3) tc4,
             substr(rcstcnatcnatcnatcnawther,27,3) na4,
             substr(rcstcnatcnatcnatcnawther,30,10) wther,
             sno
        from scott.sms1 a
       where sno = (select max(sno)
                      from sms1
                     where sno != a.sno
                   ); ---------------> added where clause with table alias.
    end;Regards
    Etbin

Maybe you are looking for

  • Baan with Universe Designer

    Has anyone successfully built a Universe against a Baan database?  We are looking at the possibility either using a Baan driver for Universe Designer (if this exists) or connecting to the Oracle system underneath. Any help is much appreciated! Thx Ja

  • Embedded file as an icon in Word to PDF

    When we send proposals to customers, our standard policy is to send them in PDF format.  The proposal template is a Word document.  However, on occassion, we need to embedd information Word documents into the proposal as an icon in the template.  Whe

  • Data level security filter to groups imported from database

    The groups that a user belongs to are stored in a table in the database. How do I create a group in the rpd to define data level security filters when the group name is retrieved from the database table depending on who logs in. One user can be a par

  • Quick Look full screen mode won't move to next image?

    When I highlight the first image in a folder full of multiple images and then press "Space" quick look opens and shows me that first image. I can then move on to the next image by simply pressing the down arrow. But if I enter quick look's full scree

  • Universal WorkGroup Bridge (uWGB) support dropped for 1130AG?

    why Cisco dropped support for this in 1130AG model? What was the last version of IOS that supported it?