Sponsored Content
Full Discussion: Log Rotation
Top Forums UNIX for Dummies Questions & Answers Log Rotation Post 302605634 by rymnd_12345 on Thursday 8th of March 2012 03:55:11 AM
Old 03-08-2012
Log Rotation

Hi Guys,

Good morning, I just want to know and collect ideas on this one. Regarding rotation of logs as I've observed it's not consistently functioning. I have a server with 8 Partitions, each partition has a dedicated directory for the logs that is needed and I set it every 5mins (300secs) the process will close and create a file. So meaning, I have 8 processes for those 8 Partitions. Let's say this is my config for this case:
Code:
file-pattern /dir/subdir/partition-%PARTITION/%NAME-%HOST_%Y%m%d%H%M%S_%04seq

Now what I want and so I did is to create a single directory named partition-all and that these 8 processed for all the 8 partitions will just close and create all files/logs in this directory. The problem I'm experiencing now is that, not all partitions are creating the file. And let's say this how it looks like with my new config:
Code:
file-pattern /dir/subdir/partition-all/%NAME-%HOST_%PARTITION_%Y%m%d%H%M%S_%04seq

Thanks!

BR,
rymnd_12345
 

10 More Discussions You Might Find Interesting

1. HP-UX

Log rotation on HP-UX

Can anyone post a sample log rotate and archive configuration on HP-UX? I really don't know how to do that... :( (3 Replies)
Discussion started by: untamed
3 Replies

2. Shell Programming and Scripting

log rotation

Hello all. Due to some reason I can not use HUP to rotate needed log files. So I use the standard method: cp $file $file.1 cat /dev/null > $file But if Java application in this time writing the output to $file, in the beginning of it appears many "^@^@^@^@^@^@". How to avoid it? Or how... (6 Replies)
Discussion started by: mirusnet
6 Replies

3. Shell Programming and Scripting

Log rotation script

I have the below script to help with disk space cleanup that finds logs older than a specified number of days (say 10 days). I need it to grab "active" logs as well. Problem is an "active log" will not get archived unless I put in 0 days which I don't want to do, I need to leave the past 10 days,... (2 Replies)
Discussion started by: theninja
2 Replies

4. Shell Programming and Scripting

log rotation and autosys

Hi, I current have many apps servers running and need to create a script to rotate logs daily, and then create an autosys job to delete logs that are older than 30 days. I was thrown into this and have no idea what to do, please help me get started, thanks! -----Post Update----- and i will... (6 Replies)
Discussion started by: new2learn09
6 Replies

5. Solaris

Log Rotation of Catalina.out

Hi, Recently i received a request to rotate logs of catalina.out (tomcat). The file size was about 807 MB. I used logadm to truncate the log ( -c ) and zip (-z 0) it. Everything worked fine, catalina.out.0.gz was created (22 MB) and the size of original catalina.out became 0kb. After... (2 Replies)
Discussion started by: Mack1982
2 Replies

6. Solaris

Solaris log rotation

HI, What is log rotation in Solaris ? What are the essential steps to perform log rotation in Solaris? (1 Reply)
Discussion started by: Revathi@1
1 Replies

7. Solaris

Log rotation, twice

hi folk, need advise regarding the log rotation, i have the logadm set at 30 2 * * * /usr/sbin/logadm so it supposed to rotate once per day, but now it rotated twice! but someone my log will rotate at 2:30 AM, but then another 2 hours later, it creates a new and rotate a new log again,... (2 Replies)
Discussion started by: dehetoxic
2 Replies

8. Solaris

Log rotation

Hi All! I seem to have a problem with log rotation, unless I am doing something wrong, I have type the following command for testing purposes to see if the -s option works but he did not: logadm -w /var/adm/messages -C 8 -c -s 512k -t '/var/adm/messages.$n' -z 1 the file is now at this... (7 Replies)
Discussion started by: fretagi
7 Replies

9. OS X (Apple)

Mavericks log rotation

In Mavericks, Apple has apparently moved control of log rotation to ASL. There's a 'ttl' value to determine how long log files will stick around for. I can compress them, change the way they're named, limit them by size, etc. But the one thing I cannot find is how to NOT keep one log file per... (0 Replies)
Discussion started by: jnojr
0 Replies

10. AIX

Log rotation in PowerHA7

Hi All, I have a situation here ... HACMP is configured with application monitoring script, which is generating messages .... which is running every minute ... And every minute when monitoring script run, one one log file is generating .... and this log file is rotating ... which is rotating... (1 Reply)
Discussion started by: linux.amrit
1 Replies
Agent::Channel(3pm)					User Contributed Perl Documentation				       Agent::Channel(3pm)

NAME
Log::Agent::Channel - ancestor class for all Log::Agent channels SYNOPSIS
@Log::Agent::Channel::XXX::ISA = qw(Log::Agent::Channel); DESCRIPTION
The "Log::Agent::Channel" class is the root class from which all "Log::Agent" channels inherit. It is a deferred class, meaning that it cannot be instantiated directly. All the deferred routines need to be implemented by its heirs to form a valid driver. Internally, the various "Log::Agent::Driver" objects create "Log::Agent::Channel" instances for each logging channel defined at driver creation time. The channels are therefore architecturally hidden within "Log::Agent", since this module only provides redefined mappings for the various logxxx() routines (logerr(), logwarn(), logdie(), etc...). However, this does not mean that channel classes cannot be used externally: the "Log::Agent::Logger" extension makes "Log::Agent::Channel" objects architecturally visible, thereby offering an application-level logging API that can be redirected to various places transparently for the application. CHANNEL LIST
The following channels are currently made available by "Log::Agent". More channels can be defined by the "Log::Agent::Logger" extension: Log::Agent::Channel::File This channel writes logs to files, defined by their path or via a magical opening sequence such as "|cmd". See Log::Agent::Channel::File. Log::Agent::Channel::Handle This channel writes logs to an already opened descriptor, as specified by its file handle: an IO::Handle object, or a GLOB reference such as *FILE. See Log::Agent::Channel::Handle. Log::Agent::Channel::Syslog This channel redirects logs to the syslogd(8) daemon, which will then handle the dispatching to various logfiles, based on its own configuration. See Log::Agent::Channel::Syslog. INTERFACE
You need not read this section if you're only using "Log::Agent". However, if you wish to implement another channel, then this section might be of interest. The following routines are deferred and therefore need to be defined by the heir: write($priority, $logstring) Emit the log entry held in $logstring, at priority $priority. A trailing " " is added to the $logstring, if needed (i.e. if the physical entity does not do it already, like syslog does). The $priority argument must be a valid syslog priority, i.e. one of the following strings: "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug". The $logstring may not really be a plain string. It can actually be a Log::Agent::Message object with an overloaded stringification routine, so the illusion should be complete. close Close the channel. make This is the creation routine. Its signature varies for each channel, naturally. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
Log::Agent::Channel::File(3), Log::Agent::Channel::Handle(3), Log::Agent::Channel::Syslog(3), Log::Agent::Logger(3). perl v5.10.0 2002-03-09 Agent::Channel(3pm)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy