Couple logadm questions


 
Thread Tools Search this Thread
Operating Systems Solaris Couple logadm questions
# 1  
Old 06-21-2010
Couple logadm questions

My logadm.conf is below. Is there a way to match a log file that appends the time/date stamp after the log file? Also, a 0 is being appended onto the files I'm compressing and having rotated. Is there a way to fix that?

Code:
/var/apache/tomcat55/logs/catalina.out -C 30 -P 'Fri Jun 18 16:48:55 2010' -c -p 15d -z 0
'/var/apache/tomcat55/logs/{http_access,localhost,admin,catalina,manager,host-manager}.*.log' -C 15 -p 15d -z 0
'/app/logs/app.csv.*$' -C 15 -P 'Fri Jun 18 17:16:32 2010' -p 15d -z 0

# 2  
Old 06-23-2010
Any suggestions on alternative log rotate and compression solutions?
# 3  
Old 06-24-2010
have in your own customized script to work on top of that
# 4  
Old 07-30-2010
How do I stop logadm from appending a "0" to each .gunzipped log?

Example: log.0.gz
# 5  
Old 08-03-2010
Quote:
Originally Posted by LittleLebowski
How do I stop logadm from appending a "0" to each .gunzipped log?

Example: log.0.gz
Anyone?
# 6  
Old 08-06-2010
Code:
#! /bin/sh
DATE=$(date "+%m-%d-%Y)
LOG=<path_to_your_log>
test –f $LOG && mv $LOG $LOG.$DATE && gzip $LOG.DATE
## hup the $LOG writing process if needed with kill -HUP


Last edited by Scott; 08-06-2010 at 10:36 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Couple of easy questions for experts on awk/sed

Hello Experts.. I have 3-4 C codes with Oracle SQL statements embedded. All the SQL statements starts with EXEC SQL keyword and ends with ;. I want to extract all the SQL statements out of these codes. I did awk '/^EXEC SQL/,/\;/' inputFile (I use this on all of the codes individually). That... (2 Replies)
Discussion started by: juzz4fun
2 Replies

2. UNIX for Dummies Questions & Answers

Couple of questions wth grep/sort

I have different things that I was trying to do but am kind of struggling with this since I'm a Linux noob. The backround is that I have two files with student names in the same directory, and each file lists the student name, their major and their grade level. What is the most efficient way to... (6 Replies)
Discussion started by: tastybeer
6 Replies

3. Shell Programming and Scripting

Logadm

I need to delete the logs using logadm command. we have application that generates to logs automatically with different dates every day like error_20121121.log and so on... using lodadm can i delete the logs of last 10 days using crontabentry? i am confuse here becasue if we use logadm what... (1 Reply)
Discussion started by: phani4u
1 Replies

4. UNIX for Dummies Questions & Answers

Couple of newbie Unix questions

I entered a command at the prompt and it's interactive (not background). It gathers some stats and writes them to a file. I want to see this job running and what it's doing - I/O especially and maybe CPU and stuff. What can do to see this (say using a second session?) I know it's a long job but... (3 Replies)
Discussion started by: ido1957
3 Replies

5. IP Networking

Couple of quick IP Routing questions

Hi 1) Is the MIB II table that can be accessed through the function m2IpRouteTblEntryGet() the same as the IP Routing table that the IP layer uses to do its routing work? 2) Is there a set of API functions, other than m2IpRouteTblEntryGet(), that are available to access entries in the IP Routing... (2 Replies)
Discussion started by: nzeidat
2 Replies

6. HP-UX

Couple of questions.

Right now I am a Microfocus COBOL programmer, working on a HP-UX system. I want to now get Certified as a HP Certified Systems Administrator. I ordered a book from amazon and will start with it. I also will be working at my job with someone who applies the patches and things as we do NOT have a... (3 Replies)
Discussion started by: nixie21
3 Replies

7. Debian

A couple of grub questions.

1) After I install a new kernel in Debian Sarge, it updates my menu.lst file for grub, but incorrectly. It assumes it should boot from partition hd0,0, but this is incorrect. How do I change this faulty assumption? 2) If grub fails to find a kernel, grub allows me to enter a path to... (1 Reply)
Discussion started by: akbar
1 Replies

8. Solaris

logadm

I have a log file that I want to rotate each day without keeping old copies. how to achieve that? thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

9. Linux

Attn! A couple quick questions about Linux [Help]

Hi guys!! I was wondering if you can help me with a couple quick questions in order for me to understand it better... Any help would be appreciated and i would like to say thanks!! In advanced... Ok here goes... (I think these are pretty basic, but i just want to clarify) 1. What would be the... (2 Replies)
Discussion started by: kyoist
2 Replies
Login or Register to Ask a Question

Featured Tech Videos