SAN FRANCISCO — Hewlett-Packard Co.’s (NYSE: HPQ) results showed Monday how lopsided the recovery in technology spending has been.

HP’s results are a barometer of demand across a swath of industries, from personal computers to Internet infrastructure and outsourcing and other technology services. The world’s biggest technology company by revenue, HP is a conglomerate that touches all those markets.

HP shares rose in after-hours trading Monday after the company reported its net income rose 5 percent and revenue rose 8 percent in the quarter ended Oct. 31, topping Wall Street’s forecasts and driven by strong corporate spending that offset weak consumer demand.

(Read the earnings report here.)

That’s the opposite of the trend that defined the computer industry at the depth of the recession, when consumer interest in inexpensive “netbook” computers buoyed the industry and corporations froze their budgets.

While the industry has seesawed as unemployment has dragged on and sapped consumer appetite for new computers, and companies are forced to replace aging machines, HP has undergone a major makeover of its own.

HP’s conference call Monday to discuss the results marked the first public appearance by the company’s new CEO, Leo Apotheker, since he started the job Nov. 1.

Investors had been waiting to hear his strategy for HP. They were apparently comforted by his commitment to bulking up HP’s software business and closing a key gap with archenemy IBM Corp., pouring more money into research and development and restoring the vast majority of employees’ salaries to their levels before an across-the-board cut imposed by Apotheker’s predecessor, Mark Hurd, in February 2009.

Hurd was forced out in the wake of a sexual harassment investigation. Apotheker left his previous job as CEO of German business software maker SAP AG amid mounting employee dissatisfaction and customer fury over price hikes he ordered.

Apotheker had built a long career there in various sales and operational roles and was hired in part to help HP fend off an old SAP adversary, Oracle Corp.

Oracle and SAP are bitter rivals. In a bid to swat two enemies at once, Oracle tried to force Apotheker to testify at its industrial espionage trial against SAP. The three-week trial was sent to the jury Monday without testimony by Apotheker. Oracle said HP had refused to accept a subpoena on Apotheker’s behalf. HP said Oracle was harassing Apotheker and had little knowledge of the matter being tried.

Apotheker said Monday that the incident was an attempt to distract shareholders and customers.

Shaw Wu, an analyst with Kaufman Bros., pointed to the uptick in HP’s stock price as evidence that many investors were comforted by the numbers and Apotheker’s message. Wu said he thought Apotheker handled questions “pretty well considering he’s only been CEO for a short period of time.”

“The best thing he can do, which he is already doing, is to visit the company’s customers and its employees to get a feel of what they want and the main issues,” Wu said. “It’s similar to what Mark Hurd did when he started.”

HP reported after the market closed Monday that its net income was $2.54 billion, or $1.10 per share, in its fiscal fourth quarter, which ended Oct. 31. That was up 5 percent from $2.41 billion, or 99 cents per share, last year.

Excluding items, the company earned $1.33 per share, topping the $1.27 per share that analysts polled by Thomson Reuters were expecting, excluding items.

Revenue was $33.28 billion, an 8 percent increase over last year. Analysts expected $32.75 billion.

The higher guidance calls for profit of $5.16 to $5.26 per share for the fiscal year ending in October 2011. The previous forecast was $5.05 to $5.15 per share.

The higher figures include a gain of 4 cents per share from real estate sales.

HP’s results illuminate trends in multiple markets.

It’s the world’s top PC seller, and reported that revenue from consumer PCs fell 10 percent in the latest quarter while business PCs rose 20 percent. That was a reversal of the trend during the recession, when consumers snapped up inexpensive “netbooks.”

Meanwhile, servers and data storage technologies are moving fast. HP’s revenue in that business-focused category rose 25 percent. HP is among the top sellers in both categories.

Recent forecasts from other technology heavyweights have painted a cloudy picture.

Intel Corp. warned about consumer interest in PCs heading into the holidays.

An unexpectedly weak outlook from Cisco Systems Inc. dragged down the stock market earlier this month. It raised fears that lackluster government spending would spread beyond Internet infrastructure, which is Cisco’s specialty and an area HP has moved aggressively into.

HP’s chief financial officer, Cathie Lesjak, said that HP is less vulnerable to swings in government spending because the public sector is only 10 percent of its business and is made up mostly of long-term services contracts.

HP shares rose $1.30, or 3 percent, to $44.55 in extended trading, after the results were reported. The stock had risen 76 cents, or 1.8 percent, to $43.25 at the end of regular-session trading.

The stock is still trading below its levels at the time of Hurd’s departure. It is down 7 percent, a decline that has wiped out $10 billion in shareholder wealth.

Get the latest news alerts: Follow LTW at Twitter.