AIX idea needed to check the logs updated date and time
Hi with the help of Gabriel canepa, i have just edited filename only in his code. The help which i got and he helped is
1) I have around 22 logs and each log should be updated in the last 24 hours from the current timestamp.
2) It should check for ERROR message (not error,Error) in the log and if it founds the ERROR means it should send us an update on that.
He has developed a script brilliantly for my sake and the problem is he developed in linux terminal. I have a problem running in my AIX terminal.
The code is as follows:
I have a problem in this line below while running in the AIX terminal
The AIX terminal is not accepting "date -d" as well as "stat -c"
Can any1 edit the date conversion from unix epoch to current timestamp in a AIX terminal. I really needed it very urgently as there was a CH raised by me for the JULY 3rd week release in my project. Your help is highly appreciated. Please edit the date conversion steps alone for the above script others works like charm as my friend Gabriel said. Thanks in advance. Needed a good and quick response for running the script in AIX terminal.
Moderator's Comments:
edit by bakunin: thank you for the opportunity to spend some considerable amount of my life cleaning out all the superfluous FONT-, COLOR- and WHATNOT-tags you used instead of wrapping the simple CODE-tags around your code. Which part of the rules, the warning which pops up when opening a new thread and the other reminders to use CODE-tags was so confusing that you couldn't find out what the tags misleadingly labeled "CODE" are for?
"-d" is a non-standard GNU extension of the "date"-utility and won't work in probably any POSIXly-correct environment, including AIX. There is an abundance of threads about how to find out yesterdays date in various formats using POSIX tools, just give it a search.
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Hi,
My goal is to monitor the response time from the access logs of nginx server. I am using gawk to print the needed fields - 'response time' and 'name of the service' from nginx logs.
Command: gawk '($6 ~ /cloudservice/) {print $10, $6}' access.log
Output:
0.645 /nc/cloudservice... (6 Replies)
I need to check 1 log file, which is logging:
2014-08-18T09:10:39+02:00 user: XXXXX START FEATURE
2014-08-18T09:10:39+02:00 user: XXXXX FINISH FEATURE
I first need to check that the START FEATURE starts and finish on the same time/date for the same user, which is different each time START... (2 Replies)
HI,
I want to search for a logs which are trace between specific date and time from logs file.
My logs are generated like this :-
Tue Jun 18 05:00:02 EEST 2013 | file_check.sh| Message:script has files to process.
Thu Jun 20 05:00:02 EEST 2013 | file_check.sh| Message:script has files to... (5 Replies)
Hi All,
I have a process which after some time continues move a files to some folder(say the name of the folder is logdir)
What i am trying to do is as the files are coming to the logdir folder, I want the latest updated time and date
of the folder in PERL. (1 Reply)
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log... (1 Reply)
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log |... (1 Reply)
I have two servers which are not in sync.
I need to write a script that checks the time on the corresponding server and another script to call the above script on both the servers simulataneously to check if there is a time difference.
Can anyone provide me with such scripts as I am new to... (3 Replies)
Hi,
I am new to using Sed. I have a file containg lines like the following:
INFORM----Test.pc:168:10/11/05 12:34:26 > some text goes here..
TRACE-----Test.pc:197:10/11/05 12:34:26 > some text goes here..
My requirement is to replace 10/11/05 12:34:26 with a string <RUNDATE> (including <... (4 Replies)