readme
来自「ftam等标准协议服务器和客户端的源代码。」· 代码 · 共 143 行
TXT
143 行
This is a substantially revamped version of the program which was madeavailable in ISODE-7.0. The main changes allow the program to be runfrequently, keeping running totals, and printing the results on demand.This obviates holding very large log files, merely to produce usagestatistics.dsastats is a script which processes the log file produced by a quipu DSA of normal operation. This file is by default called quipu.log, whichis by default written to the /usr/tmp directory. The script producesa summary of usage of a DSA.To use the script successfully, you must have set the logging levels asdescribed in the note "Tailoring Quipu's logging" by Paul Barker.Briefly, you must have the "stats" variable in the quiputailor set thus:stats level=TRACE level=NOTICEORyou can omit this line entirely: the defaults give the appropriate levelof logging.Helpful comments on the script will be gratefully received. Please emailquipu-support@uk.ac.ucl.cs.If you would like to port these logging scripts, you first need to configure a few things in the Makefile.# this is where the script will by default find the log file.LOGFILE= /usr/etc/quipu.log# this is the quiputailor file. This is accessed to get the name of the# DSA's logs to be processed, ready for inclusion in the report.TAILORFILE=/usr/ucl/etc/isode/quiputailor# The DN of your local organisation. This allows DSA activity to be # categorised as either "local" or "remote"LOCALORGDN=c=GB@o=University College London# The "etc" directory, where a couple of configuration files (quipulocaladds# and quiputechusers) will be installedETCDIR=/usr/etc# where you want the script installedLOCALPATH=/usr/local/binYou now have to configure a couple of files.The file quipulocaladds contains leading substrings from local DUA and DSAaddresses. The surest method to get these to examine the file quipu.log and see what the DSA is writing out.You can extract all the addresses from the quipu.log file bygrep "context association" quipu.log | awk '{print $NF}'Note that the quipulocaladds file must be terminated with a line beginning with a #. An example quipulocaladdsfile is given inquipulocaladds.exampleThe file quiputechusers is mainly for the benefit of sites where one ormore users make heavy use of the directory by testing it or verifying thatit is working correctly. This file allows use of the Directory by such users to be filtered out and classed as "system" usage. The file consists of a number of distinguished names. Again, the file must be terminated with a line beginning with a #. An example quiputechusers fileis given in quiputechusers.exampleThen type:make dsastatsto configure the script ready for use.make installinstalls the dsastats script in the $(LOCALPATH) directory.To run it:dsastats [-s] [-n] [-t] [-a] [-g <dsaname>] [<logfilename>]-n Don't produce a report-t Save totals-a Archive totals-s Summary report-g dsaname Grand totals for chosen dsa - printed from archive-g all Grand totals for all dsasSomething essential===================You will need a directory called dsastats.arch in the same directory as yourstats file(s). The script will try and create the directory if it doesn'texist, but you may get a permissions failure.Some useful things to know!===========================If no filename is supplied, the script uses the file which is configured bythe makefile macro, LOGFILE.If the filename contains the string ".usage", it is assumed that the fileis called something like "vicuna.usage" or "giant.usage" (at UCL, we haveto rename our quipu.log files as we often have more than one DSA on a machine). Otherwise, the file configured by the makefile macro, TAILORFILE,is consulted to discover the name of the local DSA.The report is written to standard output.Examples of usage=================It may be possible to upset the program by specifying peculiar combinationsof flags. But the following should all work.dsastats Print a report based on the quipu.log file + any running totaldsastats -n As above, except don't do the printing bit!! An option only for people with surplus CPU cycles.dsastats -t Print report, and preserve running total. The script does not delete or archive the quipu.logdsastats -t -n Keep running total, don't printdsastats -a Print the totals, and archive them. Delete the running total.dsastats -g quipu Produce grand totals for all the quipu.log data in the archive. Don't touch any other data.dsastats -g all Produce grand totals for all the DSAs data in the archive. Don't touch any other data.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?