Collecting logs by running command

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Collecting logs by running command
# 1  
Old 04-20-2012
Collecting logs by running command

Hi, i am a general user of linux but we work mostly on windows next i am moving full time on linux.

here is my question:
We have product which consist or several subsystem each subsystem has one module to create logs file dump. and i am going to write that support dump tool.

we need to create a zip which consists of various logs file from our product basically for trouble shooting.

This zip consist of following:
1. static log files
2. run few command and create files
3. OS related logs which helps in analyzing system related issues.

Now what approach i have is will have one configuration file which consists of:
1. location of files
2. commands to run which create files

and each subsystem will have their configuration file so we can collect all logs. done. simple.

The approach looks very simple and i am sure many of you would have same requirement, just wanted to know if there is some tool/command/utility already available where i can define my configuration file and it can fit my requirement?
i have googled and found "rotatelog" can do few, there is "cfg2html" can do few things.. but not really sure if they fit wilth all my requirements.

Please let me also know your suggestions. thanks in advance, will be waiting for replies.
# 2  
Old 04-20-2012
You may find something in the JAVA world I suppose...
rotatelog does what its name suggests ( only can be of use if you already have logs to rotate...)
cfg2html is a more sofisticated utility that collects all system information and put it in html format... You could try to read and see how the script works and try to customize for your needs, or create your own script using it as a model, in which case I would contact Ralph to ask his kind permission...
# 3  
Old 04-20-2012
thanks

Thanks for a kind reply. i come from java world, why i was looking into script solution is because wanted to complete this feature fast. and getting OS related data will be much easier and faster in scripts, also creating and maintaining a framework for doing same in java will be more effort.

i am glad to see reply but i really wanted you or someone to comment on above thoughts!

Thanks, Ajay
# 4  
Old 04-28-2012
Have you tried out Nagios with custom plug-ins?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Syslog-ng not working not collecting logs on rhel

Hi, I need help on syslog-ng on RHEL 7.2. It is working as expected. As per configuration, it is supposed to create authlog, messages and xymessages daily in respective folder of date. But I can see only messages file and that is also not updating well. # ps -ef | grep -i syslog root 22954... (1 Reply)
Discussion started by: solaris_1977
1 Replies

2. Shell Programming and Scripting

Collecting logs between two time stamps

Hi, please help me to collect the entire log files between two time stamp. for example, I am looking script to collect the entire log between "2015-03-27 15:59" to "2015-03-27 16:15" in the below sample log file. OS : RHEL 6.3 Date/Time : 24 hours format, the time is printing each log... (12 Replies)
Discussion started by: jerryknj
12 Replies

3. UNIX for Advanced & Expert Users

Collecting job id from qsub command

Hello. Hopefully this is the right forum, did a search and found some similar questions here. I'm trying to find out if there is a way to get the job id while submitting a job using qsub. I want to monitor the list of active jobs using qstat and when my jobid is no longer on the active list, I... (3 Replies)
Discussion started by: aeoleon88
3 Replies

4. Shell Programming and Scripting

Searching set of string from Live Running Logs

Hey just need one simple syntax to search for the string from the Live Running Logs. The strings are placed in a $infile & everytime the script should pull each string from $infile and should provide as an input for grepping from Live running logs on a rotational basis. So here are the Contents... (14 Replies)
Discussion started by: raghunsi
14 Replies

5. Shell Programming and Scripting

script for reading logs of a script running on other UNIX server

Hi, I have a script, running on some outside firwall server and it's log of success or failure is maintained in a file. I want to write a script which ftp that server and reads that file and checks the logs and if failure , I will send mail notification. Please let meknow if I am not... (1 Reply)
Discussion started by: vandana.parwani
1 Replies

6. UNIX for Advanced & Expert Users

How to find one partucular user logs when there are lots of users running on it

On my application there are lots of users are doing there work or tasks? ...In my SSH or in 'Putty' i am observing logs? Hot to observe one particular 'user' logs.. even through there are lots of users working on it? For EX: i am log in with use rid:nikhil@in.com. another one log in with... (4 Replies)
Discussion started by: ksr.test
4 Replies

7. UNIX for Dummies Questions & Answers

command logs

Is there a place were the system stores logs of command's? like does it log whatever changes I made? I'm using a Centos 5.x box Thank you (2 Replies)
Discussion started by: mcraul
2 Replies

8. Solaris

Where we can get the logs for a command execution successfully?

Hi, How to get the logs for successfully executing of a solaris command? Where the logs will be stored? How to know that the commands is executed successfully or not? Thanks, Susi. (4 Replies)
Discussion started by: susinthaa
4 Replies

9. UNIX for Dummies Questions & Answers

Process launched by user who logs out, continue running ?

Lets say a user starts a process (either a shell script or a Perl script) and before that process finishes, he logs out (either intentionaly or network problems or ...), does the process continu running ? Default shell is Korn. This is because at my job (being trained), there are tasks to run... (2 Replies)
Discussion started by: Browser_ice
2 Replies
Login or Register to Ask a Question