This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Gilbert Sebenste <address@hidden> >Organization: NIU >Keywords: 200405061821.i46ILctK028159 McIDAS Hi Gilbert, >Another quick Q for you... > >In my /var/log/secure file, all the "mcserv" accesses are going in there. I believe that this is the default. >I don't want that to happen; I either don't want them logged or put into >another file. How can I do that? I just looked at the xinetd.conf(5) man page and think that the answer is that you need to add another configuration line to the McIDAS entries in /etc/xinetd.d: mcidas mcserv mccompress Here is the man page snippit: log_type determines where the service log output is sent. There are two formats: SYSLOG syslog_facility [syslog_level] The log output is sent to syslog at the speci- fied facility. Possible facility names include: daemon, auth, authpriv, user, mail, lpr, news, uucp, ftp local0-7. Possible level names include: emerg, alert, crit, err, warning, notice, info, debug. If a level is not present, the messages will be recorded at the info level. FILE file [soft_limit [hard_limit]] The log output is appended to file which will be created if it does not exist. Two limits on the size of the log file can be optionally specified. The first limit is a soft one; xinetd will log a message the first time this limit is exceeded (if xinetd logs to syslog, the message will be sent at the alert priority level). The second limit is a hard limit; xinetd will stop logging for the affected ser- vice (if the log file is a common log file, then more than one service may be affected) and will log a message about this (if xinetd logs to syslog, the message will be sent at the alert priority level). If a hard limit is not specified, it defaults to the soft limit increased by 1% but the extra size must be within the parameters LOG_EXTRA_MIN and LOG_EXTRA_MAX which default to 5K and 20K respectively (these constants are defined in xconfig.h). So, I take this to mean that you can change, for example: /etc/xinetd.d/mccompress: service mccompress { flags = REUSE socket_type = stream protocol = tcp wait = no user = mcadde port = 503 server = /home/mcidas/bin/mcservsh server_args = -H /home/mcidas log_on_success += USERID HOST log_on_failure += USERID HOST } to: service mccompress { flags = REUSE socket_type = stream protocol = tcp wait = no user = mcadde port = 503 server = /home/mcidas/bin/mcservsh server_args = -H /home/mcidas log_type = FILE /usr/local/ldm/logs/mccompress.log log_on_success += USERID HOST log_on_failure += USERID HOST } to log the 'compress' compressed transfers to ~ldm/logs/mccompress.log. After making a change to the files mcidas, mcserv, and mccompress, don't forget to send a HUP signal to xinetd to tell it to reread its configuration files. I just tried this on a machine running Fedora Core 1 here and it works like I assumed. Please remember that each time you uninstall and then reinstall the ADDE remote server stuff, you will have to edit these files again. Also, the ADDE remote server setup in the 'mcidas' account can be configured to log ADDE transactions. This is done through an entry in ~mcidas/.mcenv: # Turn on ADDE logging ADDE_LOGGING=YES By default, this will create a file named SERVER.LOG in the first writable directory in the MCPATH for the process that was fired off. The configuration in ~mcidas/.mcenv specifies what this will be: # McIDAS environment variables MCDATA=$MCHOME/workdata MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help So, by default SERVER.LOG will be written in the ~mcidas/workdata directory of the user 'mcidas' _if_ my setup instructions are followed. I would recommend, however, that you take one additional step and REDIRECT the file to the ~ldm/logs directory. You do this by adding a file REDIRECT as the user 'mcidas': <login as 'mcidas'> cd workdata redirect.k ADD SERVER\* \"/usr/local/ldm/logs I am just remembering that ~ldm may be /home/ldm on your machine. If yes, use it instead of /usr/local/ldm in all of the examples above. Finally, I recommend rotating these files every week or month depending on how many ADDE transactions you are seeing. I do this from the 'ldm' account on Unidata machines like adde.ucar.edu as follows: # # Rotate ADDE access log files just past 12 midnight on Saturdays # 1 0 * * 6 bin/newlog logs/SERVER.LOG 3; chmod 666 logs/SERVER.LOG This rotates the log file once per week just after midnight on Sunday. After you have an ADDE transaction log file, you can monitor your ADDE server use with the McIDAS application addeinfo.k: <as 'mcidas'> cd workdata addeinfo.k This simple form of ADDEINFO gives a high level overview of the transactions that have occurred. You can get more information by specifying keywords. Check the online help for ADDEINFO for more information: help.k ADDEINFO Cheers, Tom -- NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publically available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us. >From address@hidden Mon May 10 14:38:05 2004 Hi Tom, The log files are working and going where I want them to. Thanks again for the info! ******************************************************************************* Gilbert Sebenste ******** (My opinions only!) ****** Staff Meteorologist, Northern Illinois University **** E-mail: address@hidden *** web: http://weather.admin.niu.edu ** Work phone: 815-753-5492 * *******************************************************************************