Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

TCPIP Service Log File Config

SOLVED
Go to solution
Jack Trachtman
Super Advisor

TCPIP Service Log File Config

I have created a simple TCPIP service with a DCL script. I have defined the service within TCPIP using the SET SERVICE cmds and the service definition successfully starts my script & my script responds correctly. So far so good.

Within the SERVICE definitions parameters there is a field to define a Log File. I want to use this feature to capture any output (especially errors) from my script.

The problem is that I can't find any documentation on the format of the cmd to populate this field, so...

How can I enter a file name into the Log File field of the Service definition? How can I remove any entry from this field?

TIA
11 REPLIES
marsh_1
Honored Contributor
Solution

Re: TCPIP Service Log File Config

hi,

try

$ disab serv 'service_name'

$ set serv 'service_name'/log=(file:'full_pathname_of_log_file, ýour_service_options')

$ enab serv 'service_name'

hth

marsh_1
Honored Contributor

Re: TCPIP Service Log File Config

ooops - have to be in tcpip first , apologies.

Jack Trachtman
Super Advisor

Re: TCPIP Service Log File Config

Mark,

Thanks for that info.

Any idea how to format the command to delete
a Log File defintion?
marsh_1
Honored Contributor

Re: TCPIP Service Log File Config

hi,

no , afraid not, i would set noservice ,then recreate it without specifying a log file name.

fwiw

Hoff
Honored Contributor

Re: TCPIP Service Log File Config

Tried setting the log file to the NLA0: null device?
Martin Vorlaender
Honored Contributor

Re: TCPIP Service Log File Config

The FILE keyword in /LOG_OPTIONS isn't negatable, but the /LOG_OPTIONS qualifier is:

TCPIP> SET SERVICE 'service' /NOLOG

HTH,
Martin
Jack Trachtman
Super Advisor

Re: TCPIP Service Log File Config

Some background: now that I've got my script working, I'd rather not have a log file created on every service invocation, so I'm trying to "disable" logging by removing the log file name.

The "/NOLOG" option doesn't remove the log file name.

I've just spent some time (again) trying various combinations of quotes, but that doesn't work.

I think I'm down to Mark's suggestion of having to delete & recreate the Service definition.

BTW: a newly created Service def w/no Log file defined shows the Log file as "not defined". This may be a clue as to how to format the cmd to remove the Log filename entry, but I haven't been able to figure it out.
marsh_1
Honored Contributor

Re: TCPIP Service Log File Config

hi,

you can actually specify the log file as anything in quotes , including - not defined - have just tried that with ssh and seemed to work ok, ssh still functioning after a shutdown/restart of the service !

fwiw

Jeremy Begg
Trusted Contributor

Re: TCPIP Service Log File Config

Another way of setting up your logging is to specify a logical name for the logfile. For example, FILE=MYLOGFILE: Then if you don't want any logging, DEFINE/SYSTEM MY_LOGFILE NL:

When you need to log something you can simply redfine the logfile, e.g. DEFINE/SYSTEM MY_LOGFILE MY_LOG.LOG

Regards,
Jeremy Begg
Jack Trachtman
Super Advisor

Re: TCPIP Service Log File Config

I FINALLY got someone at HP who could answer my questions (thanks Jay So!). For future ref:

1) The Log File field is for display only! The service mngr always creates a log file with name of:

UsernameDefDir:ProcName.LOG

2) The filename can be overridden by creating a logicalname which matches the ProcName proper (no dir, no extension). To disable logging, def a logical pointing to the NL: device.


Thanks all who responded.
Tim Oakley
Occasional Visitor

Re: TCPIP Service Log File Config

Wow, i finally got rid of my SAMBA$SMBD_STARTUP.LOG files thanks to your final post on this subject. Sure would be nice if HP documented it. Thanks.