LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-06-2015, 12:23 PM   #1
venugosr
LQ Newbie
 
Registered: Apr 2015
Posts: 22

Rep: Reputation: Disabled
Need a Log File for Application


Hi Team,

We are using an application to send the bulk mails. Need to start/stop the application manually. But we don't have any log files. Could you please advise is it possible to create a log file for any particular application through script? That is who is starting/stoping the application and that one has to capture in that log file. Please check and advise.

Thanks,

Srikanth.V

Last edited by venugosr; 04-06-2015 at 12:24 PM.
 
Old 04-06-2015, 12:36 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Does this application have not got any log file of its own. Instead of creating a script I would suggest that you allow stop / start of this application via sudo. You can then have sudo.log to monitor who is starting / stopping / restarting this application.

Make sure that users are not allowed to restart the application without using sudo.
 
Old 04-07-2015, 12:50 PM   #3
venugosr
LQ Newbie
 
Registered: Apr 2015
Posts: 22

Original Poster
Rep: Reputation: Disabled
Hi,
1. We dont have sudo option for the start/stop the script.
2. It doesn't have any log file of its own.
Sometimes the application will stop automatically or someone stop it. Then we'll get an alert to start the applciation and Client will ask the reason how it got stopped. Without log file we are not able to find the "Root Cause". If the script is running to capture to the logs for that applcation, then it will help us to find the Root Cause easily.

"For Example: In IBM Websphere we have a log file. It will throw all types of Errors. With the help of that we can easily find the Root Cause." Sameway is there any possible way to create a script to find the results. I'm new to Linux. So please help me.

Thanks a lot in advance.

Regdars,

Srikanth.V
 
Old 04-07-2015, 01:27 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
By script you cannot do logging. I mean you can have a script to check if application is running or not. You can have a script to track when the application went down but what you are looking for is detailed log which I don't think is possible via script.

By default application should have the log if it does not have a log then atleast application should have option to send warnings or errors to standard system log.

You have to check with the team who developed this application. Ask them if they have any switch or option to generate the log for the application.
 
Old 04-08-2015, 09:57 AM   #5
venugosr
LQ Newbie
 
Registered: Apr 2015
Posts: 22

Original Poster
Rep: Reputation: Disabled
Hi T3RM1NVT0R,

Thanks for breif explanation. Could you please provide the script which is used to track when the application went down. Might it will helpful for me.

Thanks,

Srikanth.V
 
Old 04-08-2015, 10:48 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,613

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by venugosr View Post
Hi T3RM1NVT0R,
Thanks for breif explanation. Could you please provide the script which is used to track when the application went down. Might it will helpful for me.
We aren't going to write your scripts for you...see the "Question Guidelines" link in my posting signature. If you want your application to log errors, then YOU are going to have to modify it to do so. We can't change your code for you. We will be happy to HELP you if you get stuck, so post what you have written/tried, and give us complete details, and we can assist.

Also, you provide no real details..you say "an application", but don't tell us which one. You don't say what version/distro of Linux, what kind of environment, etc. Also, you're probably not going to find a lot of people willing to help someone shovel out bulk emails...no one likes spam.

Last edited by TB0ne; 04-08-2015 at 10:50 AM.
 
1 members found this post helpful.
Old 04-08-2015, 11:27 AM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Hi T3RM1NVT0R,

Thanks for breif explanation. Could you please provide the script which is used to track when the application went down. Might it will helpful for me.

Thanks,

Srikanth.V
There is no script that I have. Basically what I was talking about is a watchdog script which you can create yourself. As TB0ne said we will not write script for you. It is something you have to come up with and if you are stuck somewhere then we are here to assist.

What you should be looking at is a script which can check the exit status of the command used to check the script status. You can configure the script to do that every second and you can add it to crontab to run every minute. This pointer should be good enough to give you an idea on how you have to write it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to fix "Please have a look at the log file for details: /var/log/jockey.log" harisuciha Linux - Hardware 3 04-29-2012 12:59 PM
[SOLVED] Some application installation questions: log in as root or log in as 'user' & do 'su' Robert.Thompson Slackware 9 02-25-2011 08:19 AM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
setting file permissions for file /var/log/Xorg.0.log mfb Linux - Security 1 07-07-2009 01:41 PM
application log file suddenly unwriteable by Apache vtbludgeon Linux - Server 2 09-02-2008 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration