The man had used the Find My iPhone app to track his wife, police said. The woman has an order of protection against her ex-husband.
"This offender, who was highly agitated when arrested by Riverside police, was definitely on the edge of causing serious bodily harm to his ex-wife," said Riverside Police Chief Thomas Weitzel.
Howard J. Lavaty, who had been staying at a Chicago rehab center for the last two weeks, was arrested last week after he was caught on surveillance video slashing his ex-wife's car tires in the parking lot of Riverside Brookfield High School.
The 43-year-old ex-wife was watching her daughter compete in a girls' softball tournament when the incident occurred at about 7:30 p.m. May 4.
When officers responded, she told them that she had been having recent troubles with her ex-husband. Police then viewed the school's surveillance video of the parking lot.
Investigators determined that Lavaty had obtained his son's iPhone and used the Find My iPhone app to electronically follow his wife.
On Friday, police used the Lavaty's phone to track him to a restaurant in Countryside in the south suburbs. He was arrested while having lunch without incident.
He confessed when presented with the surveillance video from the parking lot, police said. He told police that he did not like his ex-wife's new boyfriend.
While he was stalking his ex-wife at the school, Lavaty had 47 knives and a fake gun. The weapons were discovered in the Lavaty's vehicle.
Lavaty was charged with one count of felony violation of order protection and one count of criminal damage to property.
His criminal history includes two domestic battery arrests, two violations of order protection arrests and a charge for aggravated battery to police officers and firefighters. In February, he was arrested by the Westchester Police Department for battering firefighters, paramedics and police in an incident.
The tournament took place after school at the outside baseball diamond at the far north end of the school, police said. Lavaty never entered school property.