Sponsored Content
Top Forums Shell Programming and Scripting Detecting new entries in log files Post 302841315 by Jotne on Wednesday 7th of August 2013 07:23:07 AM
Old 08-07-2013
If the logfile have date stamp, you can look at them every 5 minutes and get only the whats new the last 5 min
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

detecting drives

I know that Unix is different from windows in that it needs more manual configuring but how do I get Solaris 8 (Intel version) to recognize my floppy drive and cd-rom?? I mean does it automatically detect the drives at startup and I have to mount them or do I have to create the drives somehow and... (1 Reply)
Discussion started by: eloquent99
1 Replies

2. UNIX for Dummies Questions & Answers

Detecting Second disk

Hello all, first of all, I apologise if I may ask stupid or obvious questions, but I'm new to UNIX and I think I need a little bit of help before I start gearing up :) Anyway, I have installed a Solaris 8 on a Sun machine, and it has 2 physical disks in it. However, it seems that it is only... (7 Replies)
Discussion started by: dragunu
7 Replies

3. Programming

Detecting interruptions in C

Hi. You may know how to detect when a interruption succeeded programming in C. Just like receiving a signal without blocking. Knowing when it was a keystroke (IRQ 2), or a mouse movement (12), or a disk access, etc. and getting actually for example the letter typed. Thanks a lot. (7 Replies)
Discussion started by: Ashrentum
7 Replies

4. Shell Programming and Scripting

Detecting incoming files without busy polling

Hello, I'd like to handle incoming (uploaded) files from a shell script, ideally without busy polling / waiting (e.g. running a cron task every 15'). Is there a command that would just sleep until a new entry has been created in a directory, allowing scripts such as the following: while... (9 Replies)
Discussion started by: baldyeti
9 Replies

5. Shell Programming and Scripting

need help in detecting errors

Hi All , I need a script to find errors in a particular and in a particular path Actually in my logs i`ve so many kinds of errors(i can even say as 100 types also).if i run the script i need to know the error (some errors can aviod ) so finally the script o/p should be a numeric... (3 Replies)
Discussion started by: radha254
3 Replies

6. Shell Programming and Scripting

Detecting dates in foldernames

Hi, I will name folders this way : DD-MM-YYYY (07-06-2011 for today). DATE=`date +%d-%m-%Y` mkdir $DATE They will contain a backup of the day. I want, in my backup script, add a command that will automatically delete folders that are a week old (in this case, when performing the backup of... (7 Replies)
Discussion started by: Always
7 Replies

7. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

8. Fedora

Missing entries in log files just before/after reboot

Hello world, One of the servers, a Fedora one,rebooted today (Luckily, a testbox). I tried to get the reason the server rebooted. After going through the messages, I think that the log entries just before and after reboot are missing. Please below: (****** is the server name, for privacy... (0 Replies)
Discussion started by: satish51392111
0 Replies

9. Shell Programming and Scripting

Monitor log entries in log files with no Date format? - Efficient logcheck?

is there a way to efficiently monitor logfiles that do not have a date or time format? i have several logs on several different servers that need to be monitored. but i realized writing a script for this would be very complex and time consuming giving the variety of things i need to check for i.e.... (2 Replies)
Discussion started by: SkySmart
2 Replies

10. Shell Programming and Scripting

Redirecting log files to null writing junk into log files

Redirecting log files to null writing junk into log files. i have log files which created from below command exec <processname> >$logfile but when it reaches some size i am redirecting to null while process is running like >$logfile manually but after that it writes some junk into... (7 Replies)
Discussion started by: greenworld123
7 Replies
samlog_viewer(1)					      General Commands Manual						  samlog_viewer(1)

NAME
samlog_viewer - a tool for viewing and saving the SAM logfile SYNOPSIS
mmddhhmm[[cc]yy]] mmddhhmm[[cc]yy]] user] ofile] [file] DESCRIPTION
The command enables the viewing of part or all of the SAM logfile (or another file containing data in the same format) at varying levels of detail. This tool is run by SAM whenever the option is chosen. It can also be run independently of SAM, in either interactive or nonin- teractive mode. The command executes in either interactive or noninteractive mode, depending on the options given. In noninteractive mode, filters the source file and writes the resulting data either to stdout or to a destination file. In interactive mode, displays a graphical user inter- face enabling you to try different combinations of filtering, save one or more versions of the source file to other files, scroll back and forth among the logfile entries, etc. Under no circumstances is destructive to the contents of the SAM logfile (or whatever source file is specified by file). The contents of the source file are filtered and displayed (or output) according to the settings of the available filters. Multiple instances of can be run simultaneously without harmful effects. Filters supports three types of filters: level of detail, date/time, and user filters. These filters can be used in combination to provide highly selective logfile viewing. The level of detail filters control how much detail is displayed. The SAM logfile may contain entries of many different types. The entry types currently supported are: summary, detail, verbose, error, and note. The level of detail filters display some or all of these entry types, depending on which filter is chosen. The level of detail filters are: Displays only the higher level messages. These include summary, error, and note (warnings, other entries worthy of special attention) entry types. Includes level of detail, and adds detail log entries. If no level of detail is specified, this is the default. Includes level of detail, and adds verbose log entries. Displays only the literal commands that were executed. These commands may include HP-UX commands as well as SAM commands and scripts. The date/time filters are used to ask for entries written since a specific date/time, before a specific date/time, or both. The user filters are for viewing only those entries written by a particular user. If invoked with the option, its argument is used as the user whose entries should be shown. If user filtering is selected by the option, displays only entries made by that user and disallows any changes to the user filtering. This is useful for allowing nonprivileged users to run and see only those entries that pertain to them. Otherwise, allows the user filtering to be changed, or completely disabled, from its interactive filtering screen. Options The following options enable you to set up filtering and other attributes. If runs interactively, these attributes may also be set and modified in the various supported menus and displays. The available options are: The option sets the start date/time filter to the date/time given by its argument. The date/time is specified in the same way as it is for the command (see date(1)): mm Month specified as a two digit number (e.g., dd Day specified as a two digit number. hh Hour specified as a two digit number (24-hour clock form). mm Minute specified as a two digit number. cc Century minus one. cc is optional when specifying the year. yy The last two digits of the desired year. If this is not specified, the current year is used. To specify a year in two digits, the valid ranges are 70-99 (20th century) and 00-37 (21st century). To specify a year in four digits, the valid range is 1970-2037. If no start time is given, the beginning of the log is used as the start time. The option sets the end date/time filter to the date/time given by its argument. The date and time is speci- fied as described above for the option. If no end time is given, then an end date/time of infinity (no end time) is used. The option sets the desired level of detail. One of the letters must be specified as the required argument. The level of detail is set as follows: If the option is not specified, the level of detail is used by default. The option sets the user filter to the user name or user ID specified by user. Only entries logged by this user are displayed. If the option is omitted, entries logged by all users are displayed by default. The option causes the filtered output to be written to the output file ofile. The option implies the option described below. If ofile is the output is written to stdout. If is omitted, the output is written to either stdout (if is specified) or to the interactive display (if is omitted). The option enables automatic timestamping. If specified, each log entry is tagged with the time of day at which it was written. Timestamping is disabled by default. The option forces noninteractive behavior. If specified, runs noninteractively, using the default or specified values for all supported options and source/destination files. file Specifies the name of the file from which log data is read. The format of the data in the specified file must be the same as that used for raw SAM logfile data. If omitted, the SAM logfile is read. If file is stdin is read and runs noninteractively. If given, file must be the last argument specified on the command line. EXAMPLES
Capture the current contents of the SAM logfile using default filtering, and put into the file The following example does the same thing: View only the commands executed by SAM on behalf of user between 8am June 5, 1994 and 10pm August 14, 1994, and view the data interac- tively: Noninteractively read data from stdin, timestamp it, and save the result in a file called Do the same as above, but instead have the data appear on stdout: or FILES
SAM logfile. Archived version of created when the logfile is automatically trimmed by SAM when its size becomes too large. Its contents are included in the log entries read by Temporary files used by SEE ALSO sam(1M). samlog_viewer(1)
All times are GMT -4. The time now is 04:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy