1

What's a command to list all recent failures in Autosys?

I was thinking of autorep -d -J ALL followed by some kind of grep, but the autorep report comes in paragraphs, with the job name and the status in separate lines, so I need to write a custom filter in Perl unless I'm overlooking some quick and simple option.

Narveson
  • 1,091
  • 1
  • 9
  • 15

3 Answers3

3

Use spaces in the search of the output of autorep for failed jobs, i.e. grep " FA ".

ЯegDwight
  • 24,821
  • 10
  • 45
  • 52
Mark
  • 31
  • 2
2

The -d flag is giving details, which is why autorep is producing paragraph-like output. Running autorep -J ALL | grep "FA" or similar should give you the listing just fine.

goric
  • 11,491
  • 7
  • 53
  • 69
  • Good point. Although the `grep "FA"` gives a few spurious hits (successful jobs with FA in their name). Because of that, and also because I like the details the -d flag gives me, I may end up writing that Perl filter one of these days. – Narveson Jan 19 '11 at 06:03
  • Narveson - Should never put 'FA' (or RU/AC/IN/OI/OH) in the job name. – runrig May 07 '14 at 16:57
  • 1
    `grep -w FA` will solve the problem of jobs containing 'FA', unless you have a job *called* FA. – Philip Kearns Aug 18 '15 at 09:00
0

Lets say all your jobs start with a common database prefix.

CRANE_job1
CRANE_job2

and so on..

Use:

aj CR% |grep -w FA
ketan
  • 19,129
  • 42
  • 60
  • 98
User771
  • 53
  • 5