Hello all, I have inherited the administration of a Solaris Box used as a DB server. As part of my daily task I have to check a number of log file and run some commands to show usage stats. I have managed to butcher some scripts to do this task and it works if I run the 'at' command from the stored location, if I try and setup a cron job it does not appear to run. I'm assuming its because of the location of the files. As a noob I'm wondering where these script should be stored and where I should store the resulatant doc files, at the moment the scripts are stored in the /var/data/logs/backups, these is a sub folder call reports and the scripts create a folder by the date in the reports folder and then create the doc files. Thanks for any help in advance, I'm a real noob and I'm surprised I've made it this far.
Basically it should be some place all your fellow admins know too. Many people use a wiki and write it down there.
We additionally place our documentation in /usr/local/doc. If it's not there, create it
We write them down in simple text files, a bit formatted for readability.
Your cronjob probably does not run, because the environment is not the same as when run on the prompt or via at. So best source your .profile or any other needed environment files that set your PATH etc. in the head of your script, like for example the profile of the user willi:
. /home/willi/.profile
or use absolute paths (not that elegant) etc. in your script.