I've cut the above file down, it would be a lot longer for a whole day. as you can see the times are all in epoch time. I will need to display a chart, that has the time going down vertically on the chart and the name of the queue at the top. The problem is I need to be able to set the time unit, for example if I wanted to see how many jobs were queued each hour for a day, I would set the time variable to 60 and it would list every hour of the day down the Y axis with how many jobs were queued and how many jobs were running at that time, as well as the queue the job belonged to. The chart would look like this:Queue Queued Start End queuea 1161611468 1161612964 1161657611 queueb 1161612303 1161648292 1161674374 queuec 1161620067 1161620070 1161651772 queued 1161622109 1161622114 1161662607 queueb 1161626408 1161626414 1161650011 queueb 1161628081 1161628085 1161658563 queued 1161629319 1161651912 1161652722 queuea 1161629632 1161630900 1161649776 queuea 1161630141 1161646804 1161656606 queuec 1161632731 1161632986 1161670456 queuec 1161633898 1161633929 1161656900 queuea 1161635242 1161635247 1161703541 queueb 1161635268 1161635275 1161653284 queueb 1161635472 1161635479 1161657667 queueb 1161636392 1161636399 1161652133 queueb 1161636691 1161636698 1161652313 queueb 1161636780 1161636785 1161654656 queueb 1161638253 1161638258 1161652124 queued 1161638845 1161638851 1161652164 queueb 1161639646 1161639656 1161656089 queuea 1161639811 1161672455 1161672927 queued 1161639955 1161639958 1161650644 queued 1161640162 1161640165 1161651353 queued 1161640340 1161640343 1161650555 queued 1161640545 1161640547 1161652089 queued 1161641176 1161641181 1161651069 queued 1161641484 1161641488 1161652164 queued 1161643078 1161643083 1161653237
and so on for the rest of the hours of the day. I just need to know how to build a program in perl to obtain those results. I know basic perl, for example I know how to read the file in and pass parameters with use getopt, but im not sure how to go about getting the results. I hope I explained this clearly enough. Can anybody help please?Date: 26/10/06 Time Queue Queued Running ----------------------------------------------------- 0:00 queuea 2 1 queueb 3 0 queuec 4 4 queued 0 6 ----------------------------------------------------- 1:00 queuea 0 1 queueb 0 10 queuec 5 2 queued 3 5 -----------------------------------------------------
In reply to ASCII chart that displays jobs that are running and jobs that are queued for a day by wishartz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |