painter@sequoia.execu.com (Tom Painter) (09/24/90)
I'm debating writing a program that takes one (or more) crontabs and puts out an ordered schedule. This is for the sysadmin to be able to find out what's happening on the system at a particular time, so that he can schedule routine maintenance. So, as so many have asked before: Does such a beast exist already? Where would I find it? Is it any good? Thanks for the assistance Tom -- ----------------------------------------------------------------------------- Tom Painter UUCP: ...!cs.utexas.edu!execu!painter Execucom Systems Corp., Austin, Texas Internet: painter@execu.com (512) 327-7070 execu!painter@cs.utexas.edu Disclaimer: My Company? They'll claim all my waking hours, not my opinions. -----------------------------------------------------------------------------
kinzler@iuvax.cs.indiana.edu (Steve Kinzler) (09/25/90)
Written by painter@sequoia.execu.com in news:comp.sources.wanted --------- "Crontab organizer (including remote hosts)" ------- > I'm debating writing a program that takes one (or more) crontabs > and puts out an ordered schedule. This is for the sysadmin to > be able to find out what's happening on the system at a particular > time, so that he can schedule routine maintenance. I doubt this is exactly what you're looking for, but it may be a start. It outputs a table of how many cron commands are begun each minute of the day. It doesn't pay any attention to day or month specifications though. from the brain of Steve Kinzler /o)\ kinzler@iuvax.cs.indiana.edu an organ with a mind of its own \(o/ {ames,rutgers}!iuvax!kinzler --- cut here --- #!/usr/bin/perl # crontable - output a day's timetable with the number of cron events each # minute # input is a crontab file # Steve Kinzler, kinzler@cs.indiana.edu, July 1990 while (<>) { /^\s*#/ && next; ($min, $hr, $day, $mon, $wkday, $cmd) = split(/[ \t]+/, $_, 6); $min = '0-59' if $min eq '*'; $hr = '0-23' if $hr eq '*'; $min =~ s/-/../g; $hr =~ s/-/../g; foreach $min (eval "($min)") { foreach $hr (eval "($hr)") { $table{$min, $hr}++; } } } print ' '; foreach $hr (0..23) { printf "%3d", $hr; } print "\n ------------------------------------------------------------------------\n"; foreach $min (0..59) { printf "%2d |", $min; foreach $hr (0..23) { printf "%3d", $table{$min, $hr}; } print "\n"; }