Sponsored Content
Full Discussion: logs
Top Forums UNIX for Dummies Questions & Answers logs Post 30920 by LivinFree on Tuesday 29th of October 2002 04:30:34 PM
Old 10-29-2002
Logrotate is typically distributed with Linux systems, but should be fairly simple to port over to others, since it's based (I believe) on perl. It's run via cron, and each time it runs, checks a set of config files that define archival, truncation, etc of log files.

If you just want to clear out that one periodically, it may just be easier to whip up a little script that cp's it to another file (in case you want to review it later), compresses the archive, and truncates that file.
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Logs

hi My name is Juan I dont can clear wtmp and similiar files how i do it? thanks (4 Replies)
Discussion started by: jtapia
4 Replies

2. Shell Programming and Scripting

Logs

Hey Guys, i am new into shell programming and i have to do one script which have to record all the commands entered by a specific user. Example of that, i have a system running on unix, several users are using this system, i have to create like a databse which will record every user entered that... (5 Replies)
Discussion started by: charbel
5 Replies

3. UNIX for Advanced & Expert Users

logs

Hy, I have a question I have a directory in a unix server, Some of my files have a diffrent access time, from the time i accessed them last, I think some one has copied it,it's not an important file,but none the less,it is my file,It mistakenly had a 777 permission( yes ,I know it is a noob's... (1 Reply)
Discussion started by: lordmod
1 Replies

4. Shell Programming and Scripting

filtering the logs

Hi, We are using rsync for syncing remote directories. It is working great along with detailed logs. As the script cron'd and most of the times there're no files to sync we are getting lot of unnecessary log entries and we need to filter them to show only the log entries for the files... (5 Replies)
Discussion started by: prvnrk
5 Replies

5. HP-UX

how to trace the logs

Hi, Last day, In one of our unix boxes there was an issue wherein few of the directory structures were missing / got deleted. Is there any way by which we can find how it happened, I mean by going through syslog / which user had run what command? Thanks for your help (3 Replies)
Discussion started by: vivek_damodaran
3 Replies

6. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

7. UNIX Desktop Questions & Answers

regarding logs

Hi , I am running an application on my windows and it logs are generated at /var/logs and for this i have to go this location and then do tail -f , Is there any command you can advise me so that when I execute this command at this location that logs get displayed fully and as the application... (3 Replies)
Discussion started by: KAREENA18
3 Replies

8. HP-UX

HP-UX LOGS Files

hello, i just want to know logs files for these actions listed below : - User Account Creation - User Account Deletion - Failed and or Successful User Password Changes - Failed Login Activities for all User Users - System Reboot or and shutdown help appreciated... (1 Reply)
Discussion started by: Bolou
1 Replies

9. UNIX for Dummies Questions & Answers

Logs do not rotate

My problem: Both access and error logs do not rotate any more and get really large. They are located here: /srv/www/+vHost name here+/logs/ Configuration seems to be here: /etc/logrotate.conf => looks OK, including "size 10M" to avoid large files (/etc/logrotate.d => is empty) manually... (4 Replies)
Discussion started by: floko
4 Replies

10. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
epylog(8)							Applications/System							 epylog(8)

NAME
epylog - Syslog new log notifier and parser. SYNOPSIS
epylog [-c epylog.conf] [-d LOGLEVEL] [--last PERIOD] [--store-offsets] [--quiet] [--cron] DESCRIPTION
Epylog is a new log notifier and parser which runs periodically out of cron, looks at your logs, processes the entries in order to present them in a more comprehensive format, and then provides you with the output. It is written specifically with large network clusters in mind where a lot of machines (around 50 and upwards) log to the same loghost using syslog or syslog-ng. Alternatively, Epylog can be invoked from the command line and provide a log report based on a certain provided time period. In this case it relies on syslog timestamps to find the offsets, as opposed to the end-of-log offsets stored during the last run, though this behavior is not as reliable and is easily thwarted by skewed clocks. OPTIONS
-c config.file Provide an alternative config file to Epylog. By default, it will look in /etc/epylog/epylog.conf. -d LOGLEVEL Logging level. The default is 1. 0 will produce no output except for critical errors (useful for cron runs). 2 and above are debug- ging levels. 5 is the most verbose. --last PERIOD Will make a report on events that occurred in the last PERIOD. PERIOD can be either "hour", "day", "week", "month", or more granu- lar: "1h", "2h", "3d", "2w", etc. When --last is specified, epylog will ignore the saved offsets and locate the entries by time- stamps. CAUTION: this process is not to be trusted, since the timestamps are not checked for any validity when arriving to the loghost. One reporting machine with a skewed clock may confuse Epylog enough to miss a lot of valid entries. --store-offsets When specified, will store the offset of the last log entry processed in offsets.xml. During the cron runs epylog relies on the off- set information to find out what new entries to process. This is more trustworthy than relying on timestamps. The default behavior is not to store the offsets, as this allows to run epylog both from cron and manually without the two interfering with each-other. The location of offset.xml is specified in epylog.conf. See epylog.conf(5) for more details. --quiet In every way identical to -d 0. --cron This is essentially --quiet --store-offsets, plus a lockfile will be created and consulted, preventing more than one instance of epylog from running. You can still run epylog manually -- the lockfile is only checked when running in --cron mode. FEATURES
The core of epylog is written in python. It handles things like timestamp lookups, unwrapping of "last message repeated" lines, han- dling of rotated files, preparing and publishing the reports, etc. The modules are pluggable and can be either "internal", written in python, or external. External modules can be written in any lan- guage, but at a price of some convenience. For more info see epylog-modules(5). INITIAL RUN
Depending on the size of your logs, you might want to initialize your offsets before letting epylog run from cron. When the off- sets.xml file is missing, epylog will by default process the entire log, and depending on your configuration, that can be a lot of entries. A good way to init epylog is to run: epylog --last day --store-offsets FILES
/etc/epylog/epylog.conf /usr/sbin/epylog /etc/cron.daily/epylog.cron /etc/epylog/* /var/lib/epylog/* /usr/share/epylog/modules/* EXAMPLES
The useful way to run from a command line is with --last. E.g.: epylog --last day epylog --last 2w When running from cron, you want to store the offsets and not rely on timestamps. There is a mode that allows you to do this: epylog --cron AUTHORS
Konstantin Ryabitsev <icon@linux.duke.edu> SEE ALSO
epylog.conf(5) epylog-modules(5) Konstantin Ryabitsev 1.0 epylog(8)
All times are GMT -4. The time now is 02:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy