Sponsored Content
Full Discussion: Log File updated time
Top Forums Shell Programming and Scripting Log File updated time Post 302926294 by 4Learning on Saturday 22nd of November 2014 08:12:15 PM
Old 11-22-2014
Log File updated time

hi can any one please help on below .im new to shell scrpting
i need to write a shell script which will check particular log file is presented or not in specific location ,if yes how long it was not modified/not rolling ?if its not modified/log is not rolling script will have to send mail
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Diff b/w modification & updated time

Hi All, What is the difference b/w last modification time and last updated time. Thanks Sweta (1 Reply)
Discussion started by: sweta
1 Replies

2. UNIX for Dummies Questions & Answers

Showing Last Updated Time

Hi, I've got a question. How do I show the last updated time? Whenever I do any of the following: ls -l ls -lu ls -lt I get the creation time. I need the modification/last update time. I'm FTP'ing a file to a different server. I'd like to know when the FTP is completed. (2 Replies)
Discussion started by: redge
2 Replies

3. Shell Programming and Scripting

Processing a log file based on date/time input and the date/time on the log file

Hi, I'm trying to accomplish the following and would like some suggestions or possible bash script examples that may work I have a directory that has a list of log files that's periodically dumped from a script that is crontab that are rotated 4 generations. There will be a time stamp that is... (4 Replies)
Discussion started by: primp
4 Replies

4. Programming

Log file not getting updated

hi all, i'm a student and managing lab at my insti. there in one application in which log file has to be maintaine the number of bytes transferred and received. but after certain entries these two attributes stop getting updated and holds same values for rest of the session. This happens one time... (4 Replies)
Discussion started by: KornFire
4 Replies

5. Shell Programming and Scripting

Old time stamp being updated for new files

Hello Friends I am facing a weird problem :confused:, we receive thousands of files in my system on a daily basis, access time stamp on some of the files are being updated as old time stamp like 1968-01-19, Could some one help me what could be causing this? so that i can narrow down the problem... (4 Replies)
Discussion started by: Prateek007
4 Replies

6. Shell Programming and Scripting

How to find last updated date and time of a folder in Perl?

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)
Discussion started by: parthmittal2007
1 Replies

7. Shell Programming and Scripting

Log search and mail it if the log is updated before 24 hours from the current time

Hi , We have around 22 logs , each has different entries. I have to automate this using shell script. The ideas which am sharing is given below 1) We use only TAIL -100 <location and name of the log> Command to check the logs. 2) We want to check whether the log was updated before 24... (13 Replies)
Discussion started by: Kalaihari
13 Replies

8. UNIX for Advanced & Expert Users

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... (2 Replies)
Discussion started by: Kalaihari
2 Replies

9. Shell Programming and Scripting

How to find the any log which is not updated since particular date?

Hello, Iam running with one issue, since particular date looks like one of the script vanished from the system after restarting of the system. I dont know which scrit it was but definatelt there should be one. but might be some logs would be there which have not updated from that day. so... (2 Replies)
Discussion started by: ajju
2 Replies

10. Shell Programming and Scripting

Grep a log file starting from a specific time to the end of file

I have a log file which have a date and time at the start of every line. I need to search the log file starting from a specific time to the end of file. For example: Starting point: July 29 2018 21:00:00 End point : end of file My concern is what if the pattern of `July 29 2018 21:00:00`... (3 Replies)
Discussion started by: erin00
3 Replies
appender_type_rollingfile.h(3)					       log4c					    appender_type_rollingfile.h(3)

NAME
appender_type_rollingfile.h - Log4c rolling file appender interface. SYNOPSIS
#include <log4c/defs.h> #include <log4c/appender.h> #include <log4c/rollingpolicy.h> Functions LOG4C_API rollingfile_udata_t * rollingfile_make_udata (void) LOG4C_API int rollingfile_udata_set_logdir (rollingfile_udata_t *rfudatap, char *logdir) LOG4C_API int rollingfile_udata_set_files_prefix (rollingfile_udata_t *rfudatap, char *prefix) LOG4C_API int rollingfile_udata_set_policy (rollingfile_udata_t *rfudatap, log4c_rollingpolicy_t *policyp) LOG4C_API const char * rollingfile_udata_get_logdir (rollingfile_udata_t *rfudatap) LOG4C_API const char * rollingfile_udata_get_files_prefix (rollingfile_udata_t *rfudatap) LOG4C_API long rollingfile_get_current_file_size (rollingfile_udata_t *rfudatap) Variables __LOG4C_BEGIN_DECLS LOG4C_API const log4c_appender_type_t log4c_appender_type_rollingfile Detailed Description Log4c rolling file appender interface. The rolling file appender implements a logging mechanism of a list of files up to a maximum number. The files are written by default to the current directory with logging names folowing the pattern log.1, log.2 etc. These parameters may be changed using the appropriate setter functions. If the appender fails to open logfiles for writing then the messages are logged to stderr--it will continue to try to open the zero-th file for writing at rollover events so if it succeeds at some point to open that file the messages will start to appear therein and will no longer be sent to stderr. Switching from logging from one file to the next is referred to as a 'rollover event'. The policy that determines when a rollover event should happen is called a 'rolling policy'. A mechanism is provided to allow different rolling policies to be defined. Log4c ships with (and defaults to) the classic size-window rollover policy: this triggers rollover when files reach a maximum size. The first file in the list is always the current file; when a rollover event occurs files are shifted up by one position in the list--if the number of files in the list has already reached the max then the oldest file is rotated out of the window. See the documentation in the rollingpolicy_type_sizewin.h file for more details on the size-win rollover policy. Function Documentation LOG4C_API long rollingfile_get_current_file_size (rollingfile_udata_t *rfudatap) Get the prefix string in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. Returns: the current size of the file being logged to. LOG4C_API rollingfile_udata_t* rollingfile_make_udata (void) Get a new rolling file appender configuration object. Returns: a new rolling file appender configuration object, otherwise NULL. LOG4C_API const char* rollingfile_udata_get_files_prefix (rollingfile_udata_t *rfudatap) Get the prefix string in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. Returns: the prefix. LOG4C_API const char* rollingfile_udata_get_logdir (rollingfile_udata_t *rfudatap) Get the logging directory in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. Returns: the logging directory. LOG4C_API int rollingfile_udata_set_files_prefix (rollingfile_udata_t *rfudatap, char *prefix) Set the prefix string in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. prefix the logging files prfix to use. Returns: zero if successful, non-zero otherwise. LOG4C_API int rollingfile_udata_set_logdir (rollingfile_udata_t *rfudatap, char *logdir) Set the logging directory in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. logdir the logging directory to set. Returns: zero if successful, non-zero otherwise. LOG4C_API int rollingfile_udata_set_policy (rollingfile_udata_t *rfudatap, log4c_rollingpolicy_t *policyp) Set the rolling policy in this rolling file appender configuration. Parameters: rfudatap the rolling file appender configuration object. policyp the logging files prfix to use. Returns: zero if successful, non-zero otherwise. Variable Documentation __LOG4C_BEGIN_DECLS LOG4C_API const log4c_appender_type_t log4c_appender_type_rollingfile rollingfile appender type definition. This should be used as a parameter to the log4c_appender_set_type() routine to set the type of the appender. Author Generated automatically by Doxygen for log4c from the source code. Version 1.2.1 Mon May 2 2011 appender_type_rollingfile.h(3)
All times are GMT -4. The time now is 07:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy