Mayor Marion Barry faced a battery of citizen questioners on television last night and told them he has only limited power to solve such key city problems as scarce and expensive housing, fuel shortages and a possible teacher strike. But Barry said he was trying his best.

The mayor, who next week completes six months in office, said at the opening of the "Direct Line To: Mayor Barry" program on WJLA-TV that, in his opinion, he has been "a good mayor."

"I think it's important I give a sense of confidence and reality to our citizens about our government," Barry said. "I don't think I've had any major disappointments. In fact, I get up every morning feeling very good."

The mayor then answered about 20 questions from telephone callers and from some persons in an audience of about 150 people in the auditorium of the Logan Community School, 3rd and G streets NE near Capital Hill.

Most of the telephone callers were from outside the city but most of those in the school audience, who wrote out their questions in advance and were screened by television staff workers, said they were from South Washington.

When asked by one caller about "so-called affordable" town houses that cost $80,000 each in Northeast Washington, Barry responded, "The city government has very little control over the cost housing . . . We have no control over private housing . . . The fact of the matter is we don't have enough money locally to subsidize ( ousing purchases and the federal government won't give up any money."

Barry said he also had no control over oil company allocations that he blamed for creating long gas lines in the city.

When asked what he would do about providing more housing for low income persons, Barry said, "We're trying to increase our supply . . . Unfortunately, as mayor I can only ask HUD for more money."

Barry said he would act to try to head off a possible teacher strike if the Washington Teachers' Union and the school board do not make significant progress toward a new contract by Aug. 1.

Asked what he would do about continuing problems of rats and roaches in the Kenilworth area of far Northeast Washington, Barry responded, "We're working on that."

Some of the questioners said they were frustrated by their dealings with city hall.Goerge Gurley, an advisory neighborhood commissioner from the Capitol Hill area, complained that he and others had tried since March to meet with Barry about conditions at the Capitol Hill hospital. Barry said the was unware of their efforts.

Phone caller Elizabeth Tamero of 31st Place NE said she had to call the police station in her area 25 times a day to complain about out-of-town cars and boats being parked in front of her house, and still got no results. Barry promised a city response today.

Camilla Smith of 3rd Street NE said she did not get to ask her question but has been impressed with Barry's performance. "It's beautiful," she said as she left the Logan school. "But I just had so many questions to ask."