PVV - A script to call options that affect multiple vet systems. pvv is a 'wrapper' around some of the admin options that will help if you are running multiple vet systems on one server e.g. Out of Hours, Play system, Different company, multiple branches etc. It will where appropriate, accumulate all the output from all the runs, either display it or mail it to a nominated user. The format is: /usr/utilities/pvv XXXX Where XXXX can be one of: frr Run the 'Fix Related Records' validation option. valid Run a validation debt Run aged debtor report import Import parameters into all systems - the import file should reside in /tmp - e.g. `pvv import payments` will import all payment types from the file /tmp/xpay.csv vatlog Will list the last two times the vatbook period reset was run. addlog List the last 5 records added to the system. fax List the last 10 fax's sent. spool Last couple of print spool jobs. file Support use only - lists 'No File' in rd.log If pvv cannot understand the option it will pass it over as an option as 'vet -p XXXXX' - this allows for other command lines options to be used. pvv does need a configuration file to tell it where the other vet systems are located and who to mail. The configuration files is: /etc/default/pvv SITES set this to the basename of any folders that contain a vet-system e.g. SITES="vetdata vetdata.ooh vetdata.play" You can specify the full folder name e.g. SITES="/u/vetdata /v/vetdata.ooh /somewhere/vetdata1" Or assuming you have a sensible layout you should use the basename as in the 1st SITES example and use the PRE and POST entries (see below) to build the full folder name as per: ${PRE}${SITES}${POST} # Prefix for Vet-system pathname PRE=/u/ POST="" SITES="vetdata vetdata.ooh vetdata.play" This will use /u/vetdata /u/vetdata.ooh /u/vetdata.play The POST option is only really useful in a corporate environment where you have a more complicated layout. By default, pvv will send the results via e-mail (the main use for pvv will be to automate jobs via cron). PVVMAIL="administrator@some-mail-domain" If you want to run some jobs to the screen, then when running them, start it with: PVMAIL="no" /usr/utilities/pvv XXXX remember to filter the output to less or redirect it as it may go shooting off the screen. The PVMAIL (only one V) will tell the system to run to the screen only. When run you will be mailed (or on the screen) a summary e.g. Run Started: Fri May 23 14:10:41 BST 2008 Program : addlog Subject : Premvet Report Processing: Main Clinic (vetdata) 1 vc1 ttyp13 2/14/08-19:42:42.64 (4246)|Weatherhead,Mr 1 1 vc1 ttyp20 2/14/08-22:15:58.83 (4247)|Hinds,Hinds S 1 1 mb2 ttyp10 2/15/08- 0:18:28.89 (4248)|Wilson,Mrs 1 1 mb2 ttyp7 2/15/08- 6:38:12.25 (4249)|Parrott,Mr S 1 1 mb2 ttyp7 2/15/08- 7:33:16.08 (4250)|Skimmin,Miss 1 Processing: Out of Hours (vetdata.ooh) 1 nc1 ttyp1 8/14/05-20:53:27.17 (3699)|McNally,Mr 1 [snipped] Run Finished: Wed Jul 23 14:10:41 BST 2008 You may notice the summary added a slightly better description to the site. This is optional, if the file /etc/default/sitehelp exists the system will look for the SITE entry and return the information following e.g. vetdata: Main Clinic vetdata.ooh: Out of Hours vetdata.play: The Play Area pvv is an option in the Premvet Automation Manager so you can schedule unattended jobs via that.