President Donald Trump speaks at a rally at Rimrock Auto Arena in Billings, Mont., Thursday, Sept. 6, 2018. (AP Photo/Susan Walsh)

Washington - US President Donald Trump wants an investigation into The New York Times over the publication this week of an article by an unnamed senior administration official who described a White House where aides try to restrain the president's worst impulses.

"It's national security. I would say Jeff should be investigating who the author of that piece was because I really believe it's national security," Trump said, referring to Attorney General Jeff Sessions.

He said he was "looking" at whether the paper itself should face action.

"Eventually the name of this sick person will come out," Trump said about the author, while also offering up the option that the writer does not exist. 

"Maybe the Times did it. Look, the Times uses phony sources all the time."

Trump described the White House as a "well-oiled machine."

The president has questioned whether the publication of the article was an act of treason.

There has also been criticism of the piece from Trump's opponents, who have decried what was effectively unelected government employees taking on roles they were not assigned and should not have in a democracy.

Former president Barack Obama was among the critics, speaking at a university in Illinois, as part of a campaign to encourage voting in the mid-term elections in November

"These people aren't elected. They are not accountable. They are not doing us a service by actively promoting 90 per cent of the crazy stuff that's coming out of the White House and then saying 'Don't worry we are preventing the other 10%,' " he said. "This is not normal."