[ProgClub programming] top: st : time stolen from this vm by the hypervisor
jedd.rashbrooke at gmail.com
Wed Jun 5 08:10:28 AEST 2019
On Wed, 5 Jun 2019 at 07:43, John Elliot V | ProgClub <jj5 at progclub.org>
> I gave you my list of requirements and my "reasons" for not using cron:
> 1. I want to watch what my process is doing, in colour, in real time
> 2. I want to start/stop/restart my process at any point in time
> 3. I want to make sure my process doesn't automatically restart if it
> exits due to error
> 4. I want to make sure only one copy of my process runs at a time
None of which preclude cron, by the way.
In terms of functionality, I'd guess that most people would put things
o low effort / TCO
... towards the top of their list of requirements.
HR teams will often describe an advertised role based on the particular
skills and experience of the incumbent -- consequently advertisements will
seek a highly motivated team player with 8 years experience writing 6502
assembler, a degree in sociology from UTas, and a 1987 Honda Civic
I'd posit that your reverse-engineered list of requirements has 'want to
watch' in prime position primarily because you don't have confidence in
your tooling, consequently a lot of effort is spent dancing around that
rather than resolving the underlying problem(s).
As Raz noted (syslog), and I've alluded to (graylog), you *can* watch what
your processes are doing 'in real time' using existing logging tools. Your
interest in seeing real time logs is not unique. Colour .. always doable,
though not sure how that'd work with graylog, or elasticsearch. Are there
specific shades of fuschia that the log watcher must utilise?
(2) (3) and (4) are resolved by using a script in /usr/local/bin script
that's launched by an entry in crontab, and having the first few lines of
that script make sure that another copy of that script isn't already
running, or if it failed on last run.
> ... which is more complicated than having just my script.
This would be more compelling if you weren't 'futzing about' with octal
string handling in bash.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the programming