A 70-year-old man who attempted to kill his methamphetamine-addicted son by repeatedly striking his head with a hammer has been sentenced to five and a half years in jail.

Ronald James McDonald attacked his son Mark, 23, as he slept on the sofa at his mother's home in Dianella in August last year.

After the attack McDonald immediately called authorities to tell them what he had done.

The Supreme Court in Perth was told in the lead-up to the incident his son had become aggressive and abusive towards his estranged wife and McDonald was trying to help her deal with their son's addiction.

On the day of the attack, his wife had called him distressed because their son was screaming and threatening to smash her house.

After pacing around her patio thinking about how to deal with the situation, McDonald went inside the house and hit his son on the temple with a claw hammer, then struck him a further three or four times.

His son woke up after the first blow but McDonald grabbed his jumper to prevent him from escaping.

Supreme Court Justice Katrina Banks-Smith said McDonald launched the attack after deciding that killing his son was the only option.

"You felt unable to settle your thoughts. It all came to a head and you lost it," she said.

Justice Banks-Smith said it had been "extremely fortunate the outcome was not worse".

She acknowledged the difficulty McDonald was facing in trying to help the family deal with his son's five-year meth addiction and said he was not alone in facing such intense family pressure.

"Whilst there is room for significant empathy and indeed, sympathy for the position in which you found yourself on the day of the offence, you are not alone in facing intense family disputes and deep frustration caused by methylamphetamine addiction and abuse," Justice Banks-Smith said.

"Violence is no answer for those who find themselves in that position."

Justice Banks-Smith said the fact he struck his son a number of times while he was asleep and defenceless were aggravating factors.

But she took into account his prior good character, his early admissions and remorse for what happened in determining his sentence.

She told the Supreme Court McDonald had depression which was "compounded by being unable to solve his son's problems" and mental impairment reduced his moral culpability.

McDonald's family, including his son, were present in court.