Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script to search log file for last 15 mins data Post 302956547 by mutley2202 on Thursday 1st of October 2015 01:08:31 AM
Old 10-01-2015
Response

Hi Don,
Thanks for the reply, so do you have any examples of this which I could use for reference (with your points above included) ? my expierence in this area isnt great hence the questions but hopefully with some guidence I can learn/understand.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell-script which extract data from log file

give me a shell-script which extract data from log file on a server by giving date and time as input (for both start time and end time) and it will give the logs generated during the given time as output. (4 Replies)
Discussion started by: abhishek27
4 Replies

2. Shell Programming and Scripting

{How} Script to search a log file for a given criteria

I have to write a script to search the logfiles i.e msg.log for the following The Search Criteria is as follows 1. IP address 2. String Ex: abc.123.com 3. Timestamp ( start - end ) ex: 2008-05-04-00:30:00 - 2008-05-08-04:30:00 Can anyone help to devise a script for... (9 Replies)
Discussion started by: indiakingz
9 Replies

3. Shell Programming and Scripting

Script which will search for a file for 15 mins

Hi All, I would like to write a script which will search a file say abc.dat in /a/b/data for 15 mins only. If the script finds the file in 15 mins then it will exit will exit sucessfully and if there is no file for 15 mins it will exit and copy the last day file (abc.dat_ddmmyyhhmmss) from... (1 Reply)
Discussion started by: chandancsc
1 Replies

4. Shell Programming and Scripting

need a shell script to extract data from a log file.

If I have a log like : Mon Jul 19 05:07:34 2010; TCP; eth3; 52 bytes; from abc to def Mon Jul 19 05:07:35 2010; UDP; eth3; 46 bytes; from aaa to bbb Mon Jul 19 05:07:35 2010; TCP; eth3; 52 bytes; from def to ghi I will need an output like this : Time abc to def... (1 Reply)
Discussion started by: hitha87
1 Replies

5. Shell Programming and Scripting

Retrieve logs generated in last 10 mins from a log file using 'grep' command

HI All, I have a log file where the logs will be in the format as given below: 2011-05-25 02:32:51 INFO PROCESS STARTING 2011-05-25 02:32:52 INFO PROCESS STARTED . . . I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 Replies)
Discussion started by: rvhg16
3 Replies

6. AIX

Grep last 5 mins from log file in AIX

I want to grep only last 5 mins of a log file in bash I have a syslog which contains the following Mon Jul 11 20:47:42 Mon Jul 11 20:47:52 The following works in Unix but not in AIX . Please can you let me know as to what would be the AIX equivalent Code: for (( i = 5; i >=0;... (1 Reply)
Discussion started by: necro98
1 Replies

7. Shell Programming and Scripting

Averaging data every 30 mins using AWK

A happy Monday to you all, I have a .csv file which contains data taken every 5 seconds. I want to average these 5 second data points into 30 minute averages! date co2 25/06/2011 08:04 8.31 25/06/2011 08:04 8.32 25/06/2011 08:04 8.33... (18 Replies)
Discussion started by: gd9629
18 Replies

8. Shell Programming and Scripting

Script (ksh) to get data in every 30 mins interval for the given date

Hello, Since I m new to shell, I had a hard time to sought out this problem. I have a log file of a utility which tells that batch files are successful with timestamp. Given below is a part of the log file. 2013/03/07 00:13:50 Apache/1.3.29 (Unix) configured -- resuming normal operations... (12 Replies)
Discussion started by: rpm120
12 Replies

9. Shell Programming and Scripting

Script to search for a pattern in 30 minutes from a log file

Hello All, I have to write a script which will search for diffrent patterns like "Struck" "Out of Memory" , etc from a log file in Linux box's. Now I will be executing a cron job to find out the results by executing the script once in every 30 minutes. suppose time is 14-04-29:05:31:09 So I... (3 Replies)
Discussion started by: Shubhasis Mathr
3 Replies

10. Shell Programming and Scripting

Script to find directory is getting files in every 10 mins, if not then when last time file received

Dears, I am looking for a script which will work as a watch directory. I ha directory which keep getting files in every 10 mins and some time delay. I want to monitor if the directory getting the files in every 10 mins if not captured the last received file time and calculate the delay. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
1.1.10-29.EL7(8)					  System Administration Utilities					  1.1.10-29.EL7(8)

NAME
1.1.10-29.el7 - Part of the Pacemaker cluster resource manager SYNOPSIS
crm_report -f "YYYY-M-D H:M:S" [-t "YYYY-M-D H:M:S"] [additional options] [dest] DESCRIPTION
crm_report - Create a tarball containing everything needed when reporting cluster problems OPTIONS
-V increase verbosity -v,--version software version --features software features -f, --from time time to start from: "YYYY-M-D H:M:S" (do not forget the quotes) -t, --to time time to finish at (default: now) -T, --cts test CTS test or set of tests to extract --cts-log CTS master logfile -n, --nodes nodes node names for this cluster only needed if the cluster is not active on the current machine accepts both -n "a b" and -n a -n b -l, --logfile file log file to collect, normally this will be determined automatically -p patt additional regular expression to match variables to be removed (default: "passw.*") -L patt additional regular expression to match in log files for analysis (default: CRIT: ERROR:) -M collect only the logs specified by -l -S, --single-node single node operation; don't try to start report collectors on other nodes -c, --cluster type force the cluster type (corosync,openais,heartbeat,logmaster) -A, --openais force the cluster type to be OpenAIS -C, --corosync force the cluster type to be CoroSync -H, --heartbeat force the cluster type to be Heartbeat -u, --user user ssh username for cluster nodes (default: root) -D, --depth search depth to use when attempting to locate files -e, --rsh specify the remote shell to use (default: ssh -T) --dest a custom destination directory/file dest a custom destination directory/file EXAMPLES
crm_report -f "2011-12-14 13:05:00" unexplained-apache-failure crm_report -f 2011-12-14 -t 2011-12-15 something-that-took-multi- ple-days crm_report -f 13:05:00 -t 13:12:00 brief-outage 1.1.10-29.el7 - 368c726 June 2014 1.1.10-29.EL7(8)
All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy