1847176 Members
5448 Online
110263 Solutions
New Discussion

cntl.log

 
SOLVED
Go to solution
Mani_5
New Member

cntl.log

When is the file .cntl.log is generated? what is the purpose and can we disable it?
7 REPLIES 7
Jeff Schussele
Honored Contributor
Solution

Re: cntl.log

Hi Mani,

This sounds like a Service Guard package log.
Do you have Service Guard running on this system?
Is this file being created in
/etc/cmcluster/?

If yes to both above it's logging the package's stdout & stderr & it SHOULD NOT be disabled.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Mani_5
New Member

Re: cntl.log

Hi Jeff,

Thanks for your reply. You are correct. the file is in /etc/cmcluster folder. to be precise it is /etc/cmcluster/sp01p19/sp01p19.cntl.log. The problem is, this file logging java exceptions that are thrown in our java application, and gets bigger and bigger.. sometimes as big as 52 MB. We are trying to figure out best way to stop it from logging. Strangely, last time I found a similar file sp01p19.cntl.log in /tmp folder, which again had the same problem. Can you tell me why this file is logging the stderr of our java application running on iPlanet server in HPUX

Thanks,
Mani

Ashwani Kashyap
Honored Contributor

Re: cntl.log

This is package control script log file and only gets updated when the package starts up or shuts down .

If your java application configured as package then this is a normal behaviour and should not be stopped . You can trim the file or remove it . Service guard will recreate it on the next package startup or shutdown .

THe messages are only logged during startup or shutdown unless somebody/somethin redirects the java logs to this file . Check the time stamps on the file to ensure that only the startups and shutdons are logged .
Jeff Schussele
Honored Contributor

Re: cntl.log

Hi (again) Mani,

By default any SW started by the package will have it's stdout & stderr captured & written to the pkg log. This is usually a good thing - you *want* to see any error the pkg's SW is kicking out.
So as I see it you have three options:

1) Trim the log periodically - You can use SAM for this sam -> Routine Tasks -> System Log Files -> Actions -> Add to List
Then define this file & it's trim levels & trim type. Or just manually trim it from time to time.

2) Edit the startup command inside the package control script for this SW & redirect stderr on the command line to another file or /dev/null if you want.

3) The one I'd recommend - HAVE THE DEVELOPERS FIX THE CODE SO IT WON'T THROW SO MANY EXCEPTIONS. You know developers - You can't live with them & you can't shoot them ;~))
But they really should look at the code & determine why it's doing this & solve it - that's the real solution.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!

Re: cntl.log

I'm making some assumptions here, but this should be correct...

In the file /etc/cmcluster/sp01p19/sp01p19.cntl

There will be a function called customer_defined_run_cmds and within here will be the command(s) to start your application - I have no idea what these will be, but if you redirect stdout and stderr of these commands either to another log file elsewhere, or to /dev/null you shouldn't have this problem, e.g.:

start_my_app

-becomes-

start_my_app >/big_file_system/my_app.log 2>&1

-or-

start_my_app >/dev/null 2>&1


HTH

Duncan

I am an HPE Employee
Accept or Kudo
Mani_5
New Member

Re: cntl.log

Thanks Jeff and Ashwani. From your suggestion, I think the best way to reduce the size, is to trim it manually or by writing some scripts.

Thanks again.

Regards,
Mani
Mani_5
New Member

Re: cntl.log

Hi Duncan,

Thanks for your suggestion. I'll try to figure out how the application is getting started form the package.

Thanks again.

regards,
Mani