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
rollingpolicy.h(3)						       log4c							rollingpolicy.h(3)

NAME
rollingpolicy.h - Log4c rolling policy interface. Defines the interface for managing and providing rolling policies. SYNOPSIS
#include <stdio.h> #include <log4c/defs.h> #include <log4c/layout.h> Data Structures struct log4c_rollingpolicy_type log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender. Defines #define ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG 0x05 Typedefs typedef struct __log4c_rollingpolicy log4c_rollingpolicy_t typedef struct log4c_rollingpolicy_type log4c_rollingpolicy_type_t log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender. Functions LOG4C_API log4c_rollingpolicy_t * log4c_rollingpolicy_get (const char *policy_name) LOG4C_API const log4c_rollingpolicy_type_t * log4c_rollingpolicy_type_set (const log4c_rollingpolicy_type_t *a_type) LOG4C_API void log4c_rollingpolicy_set_udata (log4c_rollingpolicy_t *policyp, void *udatap) LOG4C_API int log4c_rollingpolicy_init (log4c_rollingpolicy_t *policyp, rollingfile_udata_t *rfup) LOG4C_API int log4c_rollingpolicy_fini (log4c_rollingpolicy_t *a_this) LOG4C_API int log4c_rollingpolicy_is_triggering_event (log4c_rollingpolicy_t *policyp, const log4c_logging_event_t *evtp, long current_file_size) LOG4C_API const log4c_rollingpolicy_type_t * log4c_rollingpolicy_set_type (log4c_rollingpolicy_t *a_rollingpolicy, const log4c_rollingpolicy_type_t *a_type) LOG4C_API const log4c_rollingpolicy_type_t * log4c_rollingpolicy_type_get (const char *a_name) LOG4C_API void * log4c_rollingpolicy_get_udata (const log4c_rollingpolicy_t *policyp) LOG4C_API rollingfile_udata_t * log4c_rollingpolicy_get_rfudata (const log4c_rollingpolicy_t *policyp) Detailed Description Log4c rolling policy interface. Defines the interface for managing and providing rolling policies. A rolling policy is used to confogure a rollingfile appender to tell it when to trigger a rolover event. Define Documentation #define ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG 0x05 Effect a rollover according to policyp on the given file stream. Parameters: policyp pointer to the rolling policy fp filestream to rollover. Returns: zero if successful, non-zero otherwise. The policy can return an indication that something went wrong but that the rollingfile appender can stull go ahead and log by returning an error code <= ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG. Anything greater than means that the rolling file appender will not try to log it's message. Typedef Documentation typedef struct __log4c_rollingpolicy log4c_rollingpolicy_t log4c rollingpolicy type typedef struct log4c_rollingpolicy_type log4c_rollingpolicy_type_t log4c rollingpolicy type. Defines the interface a specific policy must provide to the rollingfile appender. Attributes description: o name rollingpolicy type name o init() init the rollingpolicy o is_triggering_event() o rollover() Function Documentation LOG4C_API int log4c_rollingpolicy_fini (log4c_rollingpolicy_t *a_this) Call the un initialization code of a rolling policy. This will call the fini routine of the particular rollingpolicy type to allow it to free up resources. If the call to fini in the rollingpolicy type fails then the rollingpolicy is not uninitialized. Try again later model... Parameters: policyp pointer to the rolling policy Returns: zero if successful, non-zero otherwise. LOG4C_API log4c_rollingpolicy_t* log4c_rollingpolicy_get (const char *policy_name) Get a new rolling policy Parameters: policy_name a name for the policy Returns: a new rolling policy, otherwise NULL. LOG4C_API rollingfile_udata_t* log4c_rollingpolicy_get_rfudata (const log4c_rollingpolicy_t *policyp) Get the rollingfile appender associated with this policy. Parameters: policyp pointer to the rolling policy Returns: pointer to the rolling file appender associated with this policy LOG4C_API void* log4c_rollingpolicy_get_udata (const log4c_rollingpolicy_t *policyp) Get the rolling policy configuration. Parameters: policyp pointer to the rolling policy Returns: pointer to the rolling policy configuration. LOG4C_API int log4c_rollingpolicy_init (log4c_rollingpolicy_t *policyp, rollingfile_udata_t *rfup) Call the initialization code of a rolling policy. Parameters: policyp pointer to the rolling policy app the rolling appender this policy is used with Returns: zero if successful, non-zero otherwise. LOG4C_API int log4c_rollingpolicy_is_triggering_event (log4c_rollingpolicy_t *policyp, const log4c_logging_event_t *evtp, longcurrent_file_size) Determine if a logging event should trigger a rollover according to the given policy. Parameters: policyp pointer to the rolling policy evtp the logging event pointer. current_file_size the size of the current file being logged to. Returns: non-zero if rollover required, zero otherwise. LOG4C_API const log4c_rollingpolicy_type_t* log4c_rollingpolicy_set_type (log4c_rollingpolicy_t *a_rollingpolicy, const log4c_rollingpolicy_type_t *a_type) sets the rolling policy type Parameters: a_rollingpolicy the log4c_rollingpolicy_t object a_type the new rollingpolicy type Returns: the previous appender type LOG4C_API void log4c_rollingpolicy_set_udata (log4c_rollingpolicy_t *policyp, void *udatap) Configure a rolling policy with a specific policy. Parameters: policyp pointer to the rolling policy udatap a specific policy type, for example sizewin. Returns: zero if successful, non-zero otherwise. LOG4C_API const log4c_rollingpolicy_type_t* log4c_rollingpolicy_type_get (const char *a_name) Get a pointer to an existing rollingpolicy type. Parameters: a_name the name of the rollingpolicy type to return. Returns: a pointer to an existing rollingpolicy type, or NULL if no rollingpolicy type with the specified name exists. LOG4C_API const log4c_rollingpolicy_type_t* log4c_rollingpolicy_type_set (const log4c_rollingpolicy_type_t *a_type) Use this function to register a rollingpolicy type with log4c. Once this is done you may refer to this type by name both programmatically and in the log4c configuration file. Parameters: a_type a pointer to the new rollingpolicy type to register. Returns: a pointer to the previous rollingpolicy type of same name. Example code fragment: const log4c_rollingpolicy_type_t log4c_rollingpolicy_type_sizewin = { 'sizewin', sizewin_init, sizewin_is_triggering_event, sizewin_rollover }; log4c_rollingpolicy_type_set(&log4c_rollingpolicy_type_sizewin); Author Generated automatically by Doxygen for log4c from the source code. Version 1.2.1 Mon May 2 2011 rollingpolicy.h(3)
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy