in reply to Re: ASCII chart that displays jobs that are running and jobs that are queued for a day
in thread ASCII chart that displays jobs that are running and jobs that are queued for a day

Thank you so much, that is just what I need.
  • Comment on Re^2: ASCII chart that displays jobs that are running and jobs that are queued for a day

Replies are listed 'Best First'.
Re^3: ASCII chart that displays jobs that are running and jobs that are queued for a day
by wishartz (Beadle) on Oct 31, 2006 at 11:04 UTC
    Hi monks, I've been trying to understand the program in the above post, but there is a part that I just cannot understand. I can see that the program works, I just don't know how. I cannot figure out how it knows when the queue is running a job, or queueing a job. I thought I would need to put some 'if statements' in there somewhere, otherwise how does it know, without conditionals. Please excuse my ignorance, i'm new to programming and perl and trying to understand, how this works. Could somebody try and explain to me how the hashes are being built with the correct information because to me, it looks like the times are not being compared so how does it know. Thanks.
      I know how it works now hooray and feel like a bit of an idiot, for not noticing it straight away. Oh well, part of the learning process, I suppose.
      It's marking the time 'bin' it entered the queue as queued and marking the 'bin' it started running as running, Also markes the 'bin' it stopped running as running if its not the same 'bin' as the one it started running in.

      I read the problem differently. Do you want the number of jobs that are still waiting in the queue (at the end of the time slot) and the number of jobs that haven't finished yet (also at the end of the time slot)?

      Chris