Ns logroll

From AOLserver Wiki
Revision as of 22:01, 15 June 2004 by WikiSysop (talk | contribs) (imported from WiKit id 397)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Man page: http://aolserver.com/docs/tcl/ns_logroll.html


NAME

ns_logroll - Roll the server log

SYNOPSIS

ns_logroll

DESCRIPTION

This command rolls the server log. The server log is the file returned from ns_info log and is configured through the "serverlog" parameter in the "ns/parameters" section. The default is the file "log/server.log" in the AOLserver home directory.
The number of backup log files to keep is controlled by the server configuration parameter "logmaxbackup" in the "ns/parameters" section. "logmaxbackup" must be greater than or equal to zero and less than 1000. (Note: The source emits an error message that disagrees with the code in nsd/rollfile.c on lines 82--84.)
Backup files are created by testing for the existance of the filename and the backup number (i.e., ".012") appended. If the file representing the max backup count exists, it's deleted. Then, all files are renamed to their next higher filename. Then, the log file is renamed to "filename.000". A new log file is then created and opened to be used as the new log file.
This command's effect can also be triggered by sending the server a SIGHUP signal as well.

EXAMPLES

   % ns_logroll
   # server.log is now rolled

SEE ALSO

ns_info log, ns_log, ns_logctl

Category Documentation - Category Core Tcl API