Sponsored Content
Full Discussion: grep for last 15 min of log
Top Forums Shell Programming and Scripting grep for last 15 min of log Post 302399809 by methyl on Monday 1st of March 2010 04:47:01 PM
Old 03-01-2010
Based on the information supplied the only way short of writing a custom program is to copy /var/adm/messages every 15 mins and check the file growth (if any) for messages containing the exact string "error 102". The file growth can be determined by recording "wc -l" but bearing in mind that negative growth signals a new log.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Best approach for a 10 min extract out of several log files with timestamped records

I have a task where I need to code a shell script to extract a 10 min range (10 min from now until now) extract of a log file. I taught I could simply use a command that would say something like Start=date - 10 min but I didn't find anything. Looks like the only solution would have to code a... (3 Replies)
Discussion started by: Browser_ice
3 Replies

2. Shell Programming and Scripting

crontab in every 05,20,35,50 min

Hi , How can i set a cronjob which needs to run every 05,20,35,50 min . I tried 05,20,35,50 * * * * /exec/eerrtis/tttttk/AOOK00000/bin/Packing.sh.. but its giving error while saving the crontab file .... What is the correct way ??? Thanks and Regards (4 Replies)
Discussion started by: scorpio
4 Replies

3. Shell Programming and Scripting

Find a min,group by.

I have a data file with records: A123|Peter|20 A123|Jack |10 B222|Helen|15 B222|Jane |13 B222|Guy |30 I want for find the min for $3 group by $1. i.e A123|Jack|10 B222|Jane|13 Thanks. (4 Replies)
Discussion started by: Shivdatta
4 Replies

4. Shell Programming and Scripting

How to get the counter value incremented after every 1 min?

I want to check the counter value for every 1 min until the particular counter value is reached and it should exit. Counter value: 15.( For Example) counter = 1 The start time is noted using Localtime. How can i do this in perl? Regards Archana (1 Reply)
Discussion started by: vanitham
1 Replies

5. Shell Programming and Scripting

Get min from a column conditionally

hi, i have a file with folowing content: STORAGE PERCENTAGE FLAG: /storage_01 64% 0 /storage_02 17% 1 /storage_03 10% 0 /storage_04 50% 1 I need to get the value of STORAGE from those with FLAG=0 and which has the min PERCENTAGE i am able to get the STORAGE corresponding to... (8 Replies)
Discussion started by: kichu
8 Replies

6. Shell Programming and Scripting

script use min resource ( grep grep)

Hi i wrote script use it as watchdog ( i mean it check another program (pooya) whenever that was killed (closed or crashed) it run another script (pooya_start.sh) to start it, this script work fine and do the job for me , i need help of an expert to tell me (exact command) how to change this... (8 Replies)
Discussion started by: pooyair
8 Replies

7. Shell Programming and Scripting

grep log lines logged in 10 min

A log files has lines (1 line per each log for a majority; a few for 2 lines per each log) May 31 14:00:11 rtprodapp1 local2:notice sudo: jdoe : TTY=pts/0 ; PWD=/home/jdoe ; USER=root ; COMMAND=/usr/bin/su - May 31 14:03:19 rtprodapp1 local2:notice sudo: jdoe : TTY=pts/0 ; PWD=/home/jdoe ;... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

8. AIX

crontab every 5 min.

Hi running aix 6.1 oslevel 6100-07-03-1207 I need to confirm that this cron entry is set properly. I need it set for every 5 min. 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /path/to/script.sh it does not appear that it is running every 5 min but it did in the beginning. (4 Replies)
Discussion started by: vpundit
4 Replies

9. UNIX for Dummies Questions & Answers

Cron every 5 min

Hi, I am trying to run a script in cron every 5 min in SOLARIS 10 When I do5 * * * * /path to fileor*/5 * * * * /path to file Doesn't work. Please let me know what should I put in the cron entry Thanks (2 Replies)
Discussion started by: Rossdba
2 Replies

10. Shell Programming and Scripting

Find min and max time taken from a log file

You have a log file as attached in sample input with various operations and time taken by each of them. Write a script to find the min and max time taken for each operation. Sample output is attached. Sample Input is given as below: operation1,83621 operation2,72321 operation3,13288... (1 Reply)
Discussion started by: Chandan_Bose
1 Replies
strlog(9F)						   Kernel Functions for Drivers 						strlog(9F)

NAME
strlog - submit messages to the log driver SYNOPSIS
#include <sys/stream.h> #include <sys/strlog.h> #include <sys/log.h> int strlog(short mid, short sid, char level, unsigned short flags, char *fmt, ...); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
mid Identification number of the module or driver submitting the message (in the case of a module, its mi_idnum value from mod- ule_info(9S)). sid Identification number for a particular minor device. level Tracing level for selective screening of low priority messages. Larger values imply less important information. flags Valid flag values are: SL_ERROR Message is for error logger. SL_TRACE Message is for trace. SL_NOTIFY Mail copy of message to system administrator. SL_CONSOLE Log message to console. SL_FATAL Error is fatal. SL_WARN Error is a warning. SL_NOTE Error is a notice. fmt printf(3C) style format string. %e, %g, and %G formats are not allowed but %s is supported. DESCRIPTION
The strlog() function expands the printf(3C) style format string passed to it, that is, the conversion specifiers are replaced by the actual argument values in the format string. The 32-bit representations of the arguments (up to NLORGARGS) follow the string starting at the next 32-bit boundary following the string. Note that the 64-bit argument will be truncated to 32-bits here but will be fully repre- sented in the string. The messages can be retrieved with the getmsg(2) system call. The flags argument specifies the type of the message and where it is to be sent. strace(1M) receives messages from the log driver and sends them to the standard output. strerr(1M) receives error messages from the log driver and appends them to a file called /var/adm/streams/error.mm-dd, where mm-dd identifies the date of the error message. RETURN VALUES
The strlog() function returns 0 if it fails to submit the message to the log(7D) driver and 1 otherwise. CONTEXT
The strlog() function can be called from user, interrupt, or kernel context. FILES
/var/adm/streams/error.mm-dd Error messages dated mm-dd appended by strerr(1M) from the log driver SEE ALSO
strace(1M), strerr(1M), getmsg(2), log(7D), module_info(9S) Writing Device Drivers STREAMS Programming Guide SunOS 5.11 16 Jan 2006 strlog(9F)
All times are GMT -4. The time now is 05:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy