IBM (NYSE:IBM) makes more money selling servers than anyone – but barely. Big Blue still clings to the the top spot in server sales by revenue but the company’s sales and market share continue to decline in the space as all vendors struggle to maintain sales in a tough server market.

Servers generated $3.1 billion in revenue for IBM in the second quarter and gave the company 25.6 percent market share, according to the latest figures from research firm Gartner. But those results were down 9.7 percent compared to the second quarter of 2012. Armonk, N.Y.-based IBM, which maintains a large presence in Research Triangle Park, just edged out Hewlett Packard’s $3.0 billion in second quarter sales. But HP isn’t doing much better in selling servers; the company’s sales results represented a 17.5 percent decline from year ago figures.

In terms of overall shipments, HP kept its lead with 586,857 second quarter shipments, down 13.7 percent. Dell was no. 2 in server with 551,000 server shipments; IBM was third with 209,833 shipments. Of those three companies, only Dell grew in shipments with a modest 1.7 percent year over year gain. All companies selling servers are finding a weak market. Overall, second quarter server shipments grew 4 percent year over year while revenue declined 3.8 percent.

“The global server market remains in a relatively weak state overall,” Jeffrey Hewitt, research vice president at Gartner said. “The only real regional bright spot was Asia/Pacific with growth of 10 percent and 21.7 percent year on year in terms of revenue and shipments.

Canada was the only other region that grew in both revenue and units (6.3 percent in revenue and 2.7 percent in units). The United States grew 1.9 percent in shipments year over year but declined in revenue by 5.1 percent.”

IBM’s biggest revenue contributors to its server business is its System z. While IBM still holds the top spot in server revenue, the company has been unable to reverse the trend of declining hardware sales. IBM’s $3.76 billion in second quarter hardware revenue was a 12 percent decline compared to the same period in 2012. In response, IBM spent $1 billion in the second quarter alone in restructuring. That restructuring included the layoff of more than 3,00 IBM employees, according to Alliance@IBM, a group working to unionize IBM employees.

Earlier this month, IBM announced that workers in its hardware division would be furloughed in response to weak sales for the business unit. IBM may very well look to shed servers altogether and turn its focus on parts of the company with stronger growth prospects. IBM was reportedly in talks to sell its server business to Lenovo this spring. Big Blue never confirmed those talks, which were widely reported in industry publications. But the company has made cryptic references to a “large divestiture.” During a conference call to discuss IBM’s second quarter financial results, CFO Mark Loughridge told analysts that Big Blue was in “active discussion” for a divestiture, adding that it is unlikely that such a deal would close in 2013.

In the nearer term, IBM will need to find another executive to lead sales and marketing initiatives. CRN, citing “sources familiar with the situation,”reports that channel chief Bill Donohue is retiring from the company after 32 years. Donohue’s most recent position was vice president, business partner and midmarket sales. Donohue’s responsibility for IBM’s channel strategy and revenue plan will be taken up in the interim by Jim Gregory, vice president of competitive sales initiatives, North America, while IBM searches for a replacement.