|
Hiya Loyd I'm still mystified as to why you would want to watch the log files. Seems to me that constantly watching them would be more disruptive than getting a break message - especially when you can't easily filter the log by a severity level. Or can you ? I guess you could write a small script to do some filtering, but AS/400 already has this via severity level parameter and you could write a script there anyway too. I presume the monitoring of the SQL log is to check progress on a job so the equivalent on the AS/400 would be to just check the job log after locating the job by wrkactjob. Slightly different access to visibility I guess but much the same result. Same with watching the processes to monitor jobs completing (my example was intended to appy where there was a job that you needed to be alerted the instant it completed not as any kind of generic procedure) The approach I tend to take on the AS/400 is to watch nothing but monitor everything. The critical message queues are monitored for exceptions, critical jobs are monitored - I have a home grown monitoring system) and any exceptions to the expected parameters will interrupt me etc etc This seems to be - at least to me - one more demonstration or symptom that unix is a much more hands on environment than the AS/400 at a basic level. This is not necessarily a bad thing - I fondly remember the 38 environment in the early 80's being kind of similar regarding the level of involvement it demanded :) Anyway, I'm not trying to shoot holes in your examples - I appreciate you providing them and it makes a bit more sense to me than it did. Regards Evan Harris
Tail would be a shoehorn in OS/400 and /QSYS.LIB since virtually everything is a database file. I think tail should stay in the IFS with "real" stream files. I imagine the predominant use of tail in a unix environment is to watch log files. For instance, I "tail -f /var/log/messages" to see new system messages my Linux system generates. I also "tail -f /home/mysql/log/mysql.log" to see which SQL statements are being processed. Both of these files are text files, and tail gives me the flexibility to view the most recent activity of these files without interrupting my work (break messages). I don't necessarily see much use in tailing a database. On a database, I would rather attach a trigger to it, even though most triggers are tailored to the table in question. Tail is more of a generic tool, and could be considered a "poor man's" trigger in the right circumstances. Could tail be used to monitor when a processes ends? I suppose, but I'd rather have a /var/run/program.pid file. This file contains the process id for a running program. When a program ends normally (not kill -9), the .pid file should be removed automatically. Loyd
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.