Tuesday, March 11, 2014

svchost.exe goes wild on CPU

Another day at work and I notice that a few of the servers are going to need more CPU because they are using quite a bit.  I look at the graphs and notice something funny - it's even when the application isn't busy and that one of the culprits is svchost.exe.  We get on the server to take a look and it appears svchost.exe is spiking every few seconds but what would cause this on a web server?

Now svchost.exe under Windows does many things so figuring out what is was involved a few tools but we ended up figuring out it was the eventlog service but we couldn't figure out why it needed so much CPU.  We asked around and everyone denied it was their software.  After all, their stuff is on all the servers so why should the problem exist on only our servers?

Looking further, the problem was not in any of the non-production environments so we had to troubleshoot this in production.  Always have to be careful about doing things in production.

We ran some Microsoft tools from sysinternals (I think it was procmon) to give us some detailed activity and it showed that there was a lot of reading on the security.evtx file but nothing that indicated what would be busy with it.

We created a case with Microsoft and sent over graphs and logs and all kinds of output.  Finally, we got on a conference call with Microsoft.  The guy assigned to the case tried to blame several things but each one was shot down by the other evidence.  So he says ... event log corruption.  We take one of the servers and wipe the log file and the CPU settles down.  Interesting, but we see tiny spikes.

We let the server rest over the weekend and the spikes are getting larger.  It appears that the spikes are dependent on the size of the security.evtx file so it's not corrupted, but busy being read.

Another clue showed up when we saw that svchost was page swapping at the same time the virus scanner was page swapping.  Talked to the virus team and it can't be that because it's everywhere even in QC.

Spent some time on the weekend shutting down all kinds of monitoring to see if that would help.  It did not.

Got tuned into a flag that does process auditing into the event log.  If that flag was disabled, the spikes did not occur. 

Another clue was finding out the version of the virus scanning product was different in QC and production.  We ended up upgrading the product from version 5 to 6 to see what happens and the spikes disappeared.

As I understand it, the process auditing would log processes starting and stopping.  This would write to the security.evtx log file and the virus scanner would read very large chunks of the event log over and over again because of the logged activity.  In the end, there was a problem and it was identified and fixed and we didn't throw CPU and memory at the problem but what a pain in the ass.

Sunday, September 25, 2011

Installing Adobe Flash

I don't run Adobe Flash on my machine, but my mom insists that she needs it for her sites, but it wouldn't install on the computer. It would get to about 50% and say "Error: Application currently in use." Google didn't have much to help since it suggested shutting down the browser. I took a closer look in her computer and discovered that she had tens of thousands of files in her user temp folder. Tens of thousdands of .tmp files. The dates of the files were not in the past few weeks so I started deleting them and deleting all these files was so slow.

The upside is that once I deleted the files, Adobe Flash was able to install successfully.

Thanks Adobe. Thanks for providing a useful error message.

Tuesday, August 09, 2011

What ails the economy

The economy is a mess and cannot seem to pull itself out. The economy needs people to spend money to recover, but most people are suffering from the hangover that is the past few years. Housing market has tanked, gas prices up, food prices up, so many people on public assistance. What can we do?

Part of the problem with the economy is that so little of the money is going back into it because in the past ten years, the wealthy have been getting fat and the poor have been struggling.

Time to raise the minimum wage. This may take some people off public assistance and it will also cycle more money back into the economy. People will claim that raising the minimum wage will kill job growth, but that argument has been made in the past and it's not true. Poor people will spend almost all they make so it'll all end up back in the economy and the rich will still benefit.

We need another stimulus. With people poor and businesses hoarding cash, the government should spend money on things that have been neglected. Infrastructure is one. Subways, high speed rail, bridges, roads. These are all being neglected. I should be able to ride transportation between cities or take public transportation to the airport or other popular places. Most cities don't seem to have a very good system in them and getting between cities is just plain difficult for many people.

Increase the gas tax. Not all at once, but perhaps a dime a year. This will further encourage people to buy fuel efficient cars and give some money to fund some infrastructure work. The era of cheap gas is over. We need to prepare now.

Increase taxes. Can't really raise taxes on people who are struggling. The people who can afford it need to have their taxes raised. Anyone over, say, a quarter of a million dollars needs to pay more.

Tax capital gains as income. This is a huge hole that wealthy people exploit to pay 15% of their income in taxes. Yeah, I'd like to get a salary of $1 and stock worth $50 million instead of the other way around so my "income" gets taxes at 15% max instead of 30%. In fact, I'd like my current salary to be paid as capital gains, but I can't get away with that. You need to be rich to do that. Or a CEO. Or a hedge fund manager.

There will have to be cuts to Medicare and Social Security. We can't let them explode and bankrupt us. The programs were designed as a safety net and should remain there, but perhaps we need to reduce the maximum payouts or tax Social Security as income. This wouldn't affect poor people since their income would be too low.

The military will have to be cut. This one is a no brainer. There are plenty of areas to cut here.

We can solve this problem and get the economy back on track, but it's going to take people who understand the issues and are willing to compromise. Unfortunately, I think the people who can make the decisions are idiots and will steer the country and economy into the ground.




Sunday, December 19, 2010

How to fix an XBOX 360

I acquired a broken XBox360 that has the four rings of death. It would blink the four lights during power up and I could not get past that point. I read a bit on the internet and there were several possible problems so I decided to go ahead and see what I could do.

Once I stripped the unit down to the motherboard and removed the motherboard from the case, I removed the heatsinks from the CPU and GPU. These are the two large heatsinks that are supposed to keep the chips cool. I carefully scraped the old thermal compound off the CPU and GPU so that they were mostly shiny and reflective. I got some metal washers, plastic washers, and screws to replace the metal piece that holds down the heatsink. When I put the heat sinks back on, I ended up with the two rings of death when I tried to boot it up. Progress, I thought. I took off the heat sinks again and I put down a thin layer of thermal compound and put the new screws and washers on to hold the heat sinks. There are several videos about how to do this. You should not make it too tight, but tight enough have a good contact with the chips.

After I was done, the XBox360 came back to life. I have no games for it, but at least it's alive.

Thursday, October 21, 2010

In the US, we're having mid term elections in a couple of weeks and it's clear that people who vote here are a bunch of idiots.

Take Delaware where the Republicans threw out their moderate Republican so a crazy lady named Christine O'Donnell could run in his place for the seat. How could this woman get picked in a primary? Besides lacking in experience and having no brains whatsoever, well, is there more? And still, we have 40% of the electorate in that state willing to vote for her as I type. Amazing.

It's not just Delaware. The "tea party" has picked wackos across the country. I am absolutely amazed that these tea party candidates are viable and sometimes leading in an election. Their campaign is based on anger, hatred, and fear. Oh, and they're going to cut spending. Like they slept through the years 2001-2008 when they were really needed.

I understand the anger. I'm pissed at the people that got our economy in this state. I'm pissed that I don't see people going to jail over obvious fraud. I'm pissed that there aren't changes to prevent this in the future. I'm pissed that we're going to be paying for this for years. I'm pissed that the Republicans do anything but say no to all legislation. I'm pissed that the median income of people in this country declined over the last 10 years. I'm pissed that rich people are even richer by taking advantage of the system. I'm pissed that the Koch brothers are dumping money into the coffers of tea party candidates anonymously to influence elections with their extreme right wing views. I'm pissed that bagels are getting smaller and more expensive. But now the party that was in charge during the mess may be given a chance to "clean it up". The only thing the Republicans are good for these days is fattening the wallets of the ultra rich.

I feel sad for the country that the majority of the people don't have a voice and corporations have a large voice with their money and can influence votes that are not in this country's interest. We're on our way to becoming a banana republic.

Sadly.

Monday, August 09, 2010

The upside to lower housing prices

Most of the problems with the economy stem from the lack of growth in disposable income. As housing prices climbed, people resorted to using crazy financing schemes to afford to live in houses because their incomes did not keep up with the cost of housing prices. That bubble had to pop and it popped hard, but there is a good side to it.

Lower prices mean that people can afford housing again. If incomes are not rising, the only way to have more disposable income is to lower other high fixed costs - like taxes or housing. As costs to purchase houses have come down, so have the costs of renting. This does not help people trying to sell or rent housing, but it does help people renting and helps people buying houses. Each of these people getting cheaper rents and cheaper housing gets more disposable income and this adds up. Normally, housing prices would rise to soak up some of that disposable income but housing is weak now and people aren't buying.

Higher housing prices cannot be sustained without having higher incomes.

There is some bad news in all this. Most of the foreclosures have been at the low end of the market. The banks are holding onto the higher priced properties hoping that prices will rebound so they do not have to sell at a loss. They are trying to prevent the collapse of the housing prices at the upper end of the market, but I think the prices at the upper end of the market have to collapse a bit before they fall back in line with the lower end of the housing market.

Will we have a mix of deflation and inflation? Deflation of housing costs with inflation of non-housing costs? It feels like it.

Thursday, August 05, 2010

Corruption of government

Sad to say that our government in the United States is corrupt and broken. It seems that no matter what you try and do, there is always some interest with money that wants the system to remain broken and our elected representatives show who they really work for when the demonstrate their inability to help the majority of the people.

Our government has lots of information about us when it comes to filing taxes. When we send in our tax forms, the IRS and state government compare the data to see if we're being honest about our income. For the majority of people, the government could fill in the tax forms for us and just have us sign the forms and write them a check. I wouldn't have to lose a couple of days gathering slips of paper and filling out the forms.

The state governments have tried to prefill the forms for people to make the taxes easier for people but that apparently pissed off ... the unnamed firms that make the money selling software to help you do your taxes. Of course, it's in their interest to make sure the taxes are as complicated as possible. So every year, millions of people fork over good money so they can have the software help them navigate the rules around the tax forms. Absolutely insane.

We seem to have a lot of industries that cannot survive changes that would make this country a better place so they work to ensure that they can earn their undeserved fat profit margins. I blame the companies that continue to work like this (and there's a large list) and I blame the politicians that are unable to stand up and do the right thing.

Makes me sick.