ksh script to analyze log files on AIX 5.2


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh script to analyze log files on AIX 5.2
# 1  
Old 06-22-2005
Question ksh script to analyze log files on AIX 5.2

Hi,

I have written a script that traps errors on different servers from the log files based on the current system date. The trapped errors are written to a file and file is sent as an attachment to an email.

I would like to run this script for every 2hrs. when i run the script from the second time and so on i don't want to include the errors that were trapped in the previous attempt.

The date format in the log file is 6/22/05

Please help me with this

Thanks
Venkat

Last edited by itzcoolbuddy; 06-27-2005 at 01:55 PM.. Reason: Need help ASAP
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX ksh Copy Files Script

I need a UNIX ksh script that counts the number of files in directory, if the files exceed 20 files, then email results. I want the script to run every hour.. I don't have access to cron.. I'm some what new to UNIX. Windows guy all my career.. this is what I have so far.. #!/bin/ksh # count.sh ... (5 Replies)
Discussion started by: PerlHaven2k
5 Replies

2. Shell Programming and Scripting

Creating an Interactive Bash Script to Analyze a PCAP

Hello Everyone, I am currently trying to write a Bash Script to call a PCAP file. The command I will use in the script will be the following: tshark -r test.pcap -T fields -e frame.number -e frame.time -e eth.src -e eth.dst -e ip.src -e ip.dst -r ip.proto -E header=y -E separator=, quote=d -E... (4 Replies)
Discussion started by: MrTuxor
4 Replies

3. Shell Programming and Scripting

ksh script to get files from Windows

I have googled and searched and can't come up with anything that works for me, so I'll ask the experts on here... I have a ksh script on UNIX, and a file on a Windows network drive. I need the script to get the file from the Windows network drive and save it in a folder on UNIX. -This MUST... (4 Replies)
Discussion started by: dbiggied
4 Replies

4. Shell Programming and Scripting

[Solved] AIX ksh script -d <- what does it mean?

I'm looking at a line in a script: && DRROOT="/dir1" || DRROOT="/dir2" I'm trying to understand it. Is there a "-d" command and is it seeing if /dir1 exists and, if so, set an environment variable named DRROOT to "/dir1", else set DRROOT to "/dir2" ? Thanks, -dog ---------- Post... (0 Replies)
Discussion started by: landog
0 Replies

5. Shell Programming and Scripting

Moving log files based on month - help with ksh shell script

Hello, I'm trying to move the log files from the parent directory to respective monthly folder and I would be running this script on a weekly basis through cron. I'm new to this scripting and here is what i could come up and it runs without really doing anything. I even tried placing echo... (2 Replies)
Discussion started by: jusblues
2 Replies

6. Shell Programming and Scripting

AIX-ksh script ends unexpectedly

Hi, I have a ksh script running on AIX 5.3 which has sometimes a bizarre behaviour. The script runs a child script like follow. trap 'rm -f /tmp/res.log;exit 0' 2 15 run_child.sh > /tmp/res.log 2>&1 echo "run_child.sh is terminated" next instructions... rm -f /tmp/res.log ... (12 Replies)
Discussion started by: rivalgro
12 Replies

7. Shell Programming and Scripting

Aix .ksh for loop script.

Hi, I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below. #!/bin/ksh SSH_USERID=khcuser webservers="server1 server2" ... (2 Replies)
Discussion started by: elmesy
2 Replies

8. Shell Programming and Scripting

AIX .ksh script freezes when using the mail -s command

Hello I am trying to send an email when a .KSH script is run on an AIX Machine. This email will only include a subject line that is made up of variables from within the script, and is as follows: CURRENT_DATE=`date +%Y%m%d` TIME=`date` ADMIN="myname@domain.com" date block () { ... (4 Replies)
Discussion started by: jimbojames
4 Replies

9. Shell Programming and Scripting

KSH Script to watch log files for 2 strings

Hi all, How can I do a ksh script to watch a log file for 2 specific alarms that have one this string : "Connection Error" and the other one: "Failure in sending". I would like to watch for these two alarms in the log and then if each of them repeats for about 30 times to go kill 2 processes. ... (1 Reply)
Discussion started by: Pouchie1
1 Replies

10. Shell Programming and Scripting

Script to Analyze folders and subfolders

I would like to know if there is a script out there that someone may have already written that I can use to analyze folders and sub folders on my AIX system. It can be in perl or a basic korn script. Thanks in advance. (7 Replies)
Discussion started by: seacros
7 Replies
Login or Register to Ask a Question