ie8 fix
madison

DIY-IT

David Gewirtz

If you have a mysterious problem with a Linux box, try bashing your system with sys_basher

By | September 8, 2011, 4:44am PDT

Summary: Finding mysterious crashing problems is often a big challenge. Read on to learn about a free tool you can use to help find those hidden troubles.

I don’t really consider myself a Linux guru. I haven’t spent as much time working with Linux as I’d like, given all my other responsibilities. It’s a weird feeling, because I once pretty much knew all there was to know about UNIX (I wrote kernel code, was a product manager for a very well-known implementation, etc.), but that was a very long time ago.

These days, my use of Linux is simply as a system manager for my own servers, and I’m as much an explorer as anything else. That’s why, when I talk with you about Linux, I’ll be sharing with you what I consider a “discovery,” but what a true Linux guru would probably think is common knowledge. Even so, there are a lot of explorers out there and I hope these tips can help.

I’ve got one such tip today. I co-locate my servers at Prominic.NET. Before I tell you the rest of the story, I should disclose that these guys are old friends of mine, and I’m a very happy fan of their service.

In any case, I’ve been having no end of problems with one of the Linux machines I co-lo there. It’s a CentOS 5.6 machine and about once a week, it’d crash hard. It’s been doing this for months, and we had no idea what was causing it.

In desperation, I asked for help. Eric McCartney over at Prominic took some pity on me and started looking at the system. After doing all the usual swaps and tests, there were no obvious issues.

Finally, Eric loaded up a neat little program called sys_basher, which exercises all the elements of the system…hard. It puts the machine under a strong load and if something can’t handle the load, it’ll die. Quickly.

As it turned out, the problem was a hard drive. The weird thing is, we hadn’t allocated the hard drive in the Linux environment yet. It was simply plugged in, awaiting configuration. But, when that hard drive was plugged in, sys_basher would take the system down almost instantly. When the hard drive was unplugged, the system would run rock solid.

Hard drives, like all system components, are not perfect. But it would have taken far longer to diagnose what was up without sys_basher bashing the system.

Since we removed the drive, we’ve run fourteen days of testing with sys_basher and the machine has been solid. I think we’ve found the problem.

So, if you have a mysterious problem with a Linux box, try using sys_basher and see if it’ll help you track down the trouble.

Kick off your day with ZDNet's daily e-mail newsletter. It's the freshest tech news and opinion, served hot. Get it.

Topics

David Gewirtz, Distinguished Lecturer at CBS Interactive, is an author, U.S. policy advisor, and computer scientist. He is featured in The History Channel special The President's Book of Secrets.

Disclosure

David Gewirtz

At various times during his adult life, David has voted for both Democrats and Republicans, and has been disappointed by both. He is deeply disturbed by how partisanship has come before patriotism in America, which gives him the freedom to pick on both sides.

David is a frequent guest on TV and radio stations across America and can usually be heard or seen on-the-air at least once a week. He writes weekly commentary and analysis for CNN’s Anderson Cooper 360 and has been interviewed by Fox News, CNN, various ABC and NBC affiliates, and Canada’s Global TV. He has been a featured guest on National Public Radio and has also been featured on Voice of America, Radio Free Europe, and Radio Liberty where his commentaries on technology, industry, and emerging nations have been broadcast into 46 countries (all in their own unique translations).

David is the executive director of U.S. Strategic Perspective Institute, a nonprofit research and policy organization. He is the Cyberterrorism Advisor for the International Association for Counterterrorism & Security Professionals, a columnist for The Journal of Counterterrorism and Homeland Security and a special contributor to Frontline Security Magazine. He is a member of the FBI’s InfraGard program, the security partnership between the FBI and industry. David is also a member of the U.S. Naval Institute and the National Defense Industrial Association, the leading defense industry association promoting national security.

David is an advisory board member for the Technical Communications and Management Certificate program at the University of California, Berkeley extension. He is also a member of the instructional faculty at the University of California, Berkeley extension.

David’s “day job” is as publisher and editor-in-chief of ZATZ publishing, an online publisher of technical magazines. Other than than his ownership stake in Component Enterprises, Inc. (the parent company of ZATZ), David has no additional industry investments.

ZATZ has many advertisers who do, in part, provide for David’s lush income and extravagant lifestyle. Most of them are IBM and Lotus aftermarket suppliers, some of them make goodies for Microsoft Outlook, and a few make all sorts of strange mobile devices and add-on products. David has been a regular judge of the IBM Awards, but has no formal financial interest in or with IBM.

Because the ZATZ online magazines often review products, David and ZATZ are sent an overwhelming stream of unsolicited, silly, and often useless products to review. Because they’re such a pain to track and ship back, these products often wind up in a dumpster or fill up the corner of a large closet. Although David has no plans to review products in connection to his ZDNet blog, if he does do a product review, he will disclose any relationship completely in that posting.

Both through ZATZ and independently, David derives a small income through various advertising and sales relationships with Amazon.com and Google. These are minor relationships and they will not impede his willingness or ability to chastise either company should they deserve it.

David has many other business relationships, but none of them relate to anything he covers in his ZDNet blog. David does have a bit of the sales-guy bug and if he’s not doing a sales deal with someone at least once a month, he goes through withdrawal. He has a number of consulting clients, but none of them relate to anything he covers for ZDNet (and if they ever do, he will either disclose that fact, or decline to write about them).

Back in the 1980s, David held the unusual title of “Godfather” at Apple. He has written and published 40 incredibly simplistic applications for Apple’s iPhone.

Although David is forbidden to disclose the terms of his iPhone developer agreement, he isn’t drinking the Apple Kool Aid, will never be confused with a metrosexual, and feels free to mock Apple, and Apple users, any time the occasion permits, on alternate Tuesdays, or if he’s bored.

Biography

David Gewirtz

In addition to hosting the ZDNet Government and ZDNet DIY-IT blogs, CBS Interactive's Distinguished Lecturer David Gewirtz is an author, U.S. policy advisor, and computer scientist. He is featured in The History Channel special The President's Book of Secrets, is one of America's foremost cyber-security experts, and is a top expert on saving and creating jobs. He is also director of the U.S. Strategic Perspective Institute as well as the founder of ZATZ Publishing.

David is a member of FBI InfraGard, the Cyberwarfare Advisor for the International Association for Counterterrorism & Security Professionals, a columnist for The Journal of Counterterrorism and Homeland Security, and has been a regular CNN contributor, and a guest commentator for the Nieman Watchdog of the Nieman Foundation for Journalism at Harvard University. He is the author of Where Have All the Emails Gone?, the definitive study of email in the White House, as well as How To Save Jobs and The Flexible Enterprise, the classic book that served as a foundation for today's agile business movement.

17
Comments

Join the conversation!

Just In

zxgdiww 57 nmq
bdfwekrdfe3701-24379006336416627462375061784412 22nd Nov
qdxocr,wopohlcc98, cripv.
I said the day David G. start writing about Linux, you know it has arrived.

PS. Kudos DG.
0 Votes
+ -
Hardware Troubleshooting 101
asmoore82 Updated - 8th Sep
Step 1: memtest86+
Step 2: `badblocks -sv`

If And Only If (IFF) the above procedure would _not_ have revealed the same problem, then I'll be impressed with sys_basher. On 2nd thought, _still_ not impressed - you still had to _guess_ at which drive to leave out and re-run the tests. Not very "guru" at all.

$ man stress
0 Votes
+ -
So quick to judge....
linux for me 8th Sep
@asmoore82
Seeing that the drive was unallocated and not set up, your step 2 probably may not run on the drive. It didn't on my unallocated drives until they were set up. However, I use a live cd to run tests on all my systems, such as Knoppix.
0 Votes
+ -
RE: quick to judge
asmoore82 8th Sep
@linux for me
"... probably may not ..."

lol, are you sure?

"unallocated" is meaningless. Unpartitioned? Unformatted? Unmounted? A drive is a drive is a drive. If it's plugged and powered on, you can and should run `badblocks` on it.
@asmoore82
A smug linux user? Never! He specifically stated that he was not a guru and this tip is for the novice.

"... I consider a ?discovery,? but what a true Linux guru would probably think is common knowledge."

Get over yourself. Go pick a fight with an apple fanboy or something.
@KenoshaSysAdmin
No "smug" - a fountain of Linux knowledge willing and able to help.

"He specifically stated that he was not a guru and this tip is for the novice."

This is the worst direction you could possibly send a novice in. `stress` is a well known standard tool for stress testing a system and it's already available in all of the standard package managers. *NOTE HERE* that stress testing is *NOT* the same thing as diagnosing hardware failures. The author needed the latter anyway.

You don't send a novice to go download some wild, one-off package that no one's heard of that might need to be be custom compiled from source on a server that's already failing.

Package Managers are your friends.
@asmoore82

Who cares if you're not impressed. It worked for him, so it's good enough. Not all of us Linux users are omnipotent
@asmoore82
The badblocks manpage states:
"Important note: If the output of badblocks is going to be fed to the e2fsck or mke2fs programs, it is important that the block size is properly specified, since the block numbers which are generated are very dependent on the block size in use by the filesystem. For this reason, it is strongly recommended that users not run badblocks directly, but rather use the -c option of the e2fsck and mke2fs programs."

In regards to sys_basher, most newbies would not know how to compile a C program, must less set up their Linux environment to enable such a task. And, it's probably not a good idea to suggest to newbies that they leave the confines of their vetted distro repository and install alien software like sys_basher. But, if they know C programming, even if they are Linux newbies, they can vet the code themselves, provided they understand hex shellcode, a classic method for inserting malware into code.

Most problems, hardware or software, usually reveal themselves in the logs residing in /var/log, and the software to read them is readily available on all Linux systems.
@GreyGeek77
"In regards to sys_basher, most newbies would not know how to compile a C program, must less set up their Linux environment to enable such a task. And, it's probably not a good idea to suggest to newbies that they leave the confines of their vetted distro repository and install alien software like sys_basher."

He did say that he is running CentOS. The application in question IS in the RPM package system for CentOS and Fedora. David didn't even run it himself, at least initially. "Eric McCartney over at Prominic" actually loaded the app.

I saw no reference to any "Newbie" being instructed to compile and run the app on their own. Most would first ask for assistance from someone they know or online.
@GreyGeek77
You seem to be trying to make the point here that _no-one_ should _ever_ run badblocks...

Epic logic fail. Read your own quote more carefully.

_If_ the output ... is going to be fed ... it is strongly recommended that users _not_ run badblocks directly.

We're not trying to feed any e2fsck or mke2fs here; just diagnosing hardware troubles. `badblocks` is your friend.
0 Votes
+ -
Impossible! I've been told that linux doesn't crash. Obviously you are not running linux. However if your linux box did crash despite what the linux people want you to believe, then the best action would be to format the disk to wipe it clean then install one of the BSDs on it if you need a real UNIX environment instead of some hacked up clone of it. Its free, stable, and secure.
@LoverockDavidson_
"I've been told that linux doesn't crash."

BIG +1.

If you could actually be bothered to read the article you would know it was a Hardware Failure, *NOT* Linux's problem.

But of course you didn't read the article, you've got so much more trolling to do and so little time - gotta move on quickly.
0 Votes
+ -
DFTT
grant@... 8th Sep
No text needed
@asmoore82

That was probably his (unintentional) point. This had nothing to do with Linux, yet the article and headline make it seem like it does.
@LoverockDavidson_

Lulz. DFTT indeed.

Say that to the folks with ATI cards. BSD IS BEZT. AMG H8 LINAKS SO MUCH. ARG.

You're as bad as a ******** anti-MS zealot. You think we don't have feelings? You honestly think you can mess with our heads and emotions? You think we don't care?

We don't care. Nothing to see here, move along.

Great article DG, and thank you for the comments. Great insights asmoore82.
0 Votes
+ -
zxgdiww 57 nmq
bdfwekrdfe3701-24379006336416627462375061784412 22nd Nov
qdxocr,wopohlcc98, cripv.

Join the conversation!

Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]
ie8 fix
Click Here
ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

White Papers, Webcasts, & Resources
ie8 fix
ie8 fix