Posts: 1,047
Topics: 1
Kudos: 263
Solutions: 131
Registered: ‎04-22-2014
Re: Problem with cloudera agent

You might do something like this:

 

 

# alternatives --list | awk '{print $1}' | xargs -n1 alternatives --display |grep "^/" > all_alternatives.txt

# awk -F ' ' -v NCOLS=4 'NF!=NCOLS{printf "Wrong number of columns at line %d\n", NR}' all_alternatives.txt

 

The above will list out all the alternatives display information and write that to a file

Then, it will check to see if there are any lines with more or less than 4 columns and print out the line number.

You could then use that line number to reference the all_alternatives.txt file line.

 

That should show us which alternative is tripping up the agent.

View solution in original post

Who Me Too'd this solution