Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Some Unix/Linux filesystems do have tools for defragmentation, but there is really no need to in the majority of cases. Drive fragmentation will only get up to a few percent on a desktop machine, not enough to seriously impact overall performance.
Some people might tell you that common Linux filesystems, like ext2/3/4 do not fragment.
Well, although this is not true it usually is not necessary to defragment Linux filesystems, as fragmentation, compared to Windows, is pretty low.
Which also is the reason that you probably have a hard time finding something in your system to actually do this.
As said, also on Linux filesystems actually do fragment, but it's quite unlikely to get to the extends you may be used from Windows.
Interesting to know. Anyway The reason I ask is because my box is stating to randomly restart. I opened the ClanTk Virus scanner, updated, ran it and it reports clean, since I started using Ubuntu I have had the Firestarter firewall running. At this point I would run the defrag tool in windows then check for disk errors. Any ideas why I am getting random restarts? I will gladly supply any info you may need to help figure it out.
Interesting to know. Anyway The reason I ask is because my box is stating to randomly restart. I opened the ClanTk Virus scanner, updated, ran it and it reports clean, since I started using Ubuntu I have had the Firestarter firewall running.
Random hard reboots are not a software problem. They are usually tied to faultly hardware, so I'd watch over the cpu temperature and use memtest86 to check the state of your ram sticks to start with. But really any other broken piece could be the problem. Most livecds have a boot option to run memtest86. It will take long and it's not infallible though.
Quote:
At this point I would run the defrag tool in windows then check for disk errors. Any ideas why I am getting random restarts? I will gladly supply any info you may need to help figure it out
It usually should be the other way around. First check and repair, then you can worry about defrag. But a fragmented drive has nothing to do with system hangs nor with random hard resets.
So most software will not cause a crash in Linux? I will keep an eye on cpu temp and check my ram. Most other peices like graphics card and sound card are pretty new still(less than 3 months old). Is there a log or something I can check to see what may be causing the problem. I know in Windows I can check the event viewer to see what may have faulted, is thee anything like that in Linux?
It's actually pretty hard for a user-level program to cause an OS or system crash in Linux unless there's a bug in the kernel or a driver, such as the video driver. Hardware is usually the culprit.
Quote:
Is there a log or something I can check to see what may be causing the problem. I know in Windows I can check the event viewer to see what may have faulted, is thee anything like that in Linux?
There should be a log viewer in Ubuntu. I'm using Debian/Gnome, and it's at Applications->System Tools->System log. If not, the logs are at /var/log. If it's a hardware problem, then chances are there won't be anything in the logs.
If you can, open the case and clean out the dust, looking particularly at the fins or leaves that disperse heat from the CPU to be sure that they are not blanketed and clogged.
You can use a linux live-cd with test and stress tools to check the CPU, RAM, and HDD. Google a bit and learn more.
That virus program you ran is there for the benefit of those to whom you might be forwarding Windows files, not to find any linux virus. Google some more.
Last edited by thorkelljarl; 04-06-2009 at 07:18 PM.
It's actually pretty hard for a user-level program to cause an OS or system crash in Linux unless there's a bug in the kernel or a driver, such as the video driver. Hardware is usually the culprit.
If the kernel doesn't let you do anything wrong, then you can't do that. In linux, programs do not have the kind of direct access to the hardware that will actually let them do stupid things. So, if a program crashes, it will just be closed and that's it.
Of course sometimes crashes happen, but they are either due to a bug in the kernel (very unlikely but well, kernel devs are humans...) or due to a buggy 3rd party driver (the most common cause), like when you use some weird kernel patchset or like when the ati driver freezes your display, which happens actually quite often. But that's not linux fault.
Quote:
There should be a log viewer in Ubuntu. I'm using Debian/Gnome, and it's at Applications->System Tools->System log. If not, the logs are at /var/log. If it's a hardware problem, then chances are there won't be anything in the logs.
The first place to look would be /var/log/messages, or just use dmesg on the command line. If a driver or the kernel halts or crashes you might find something useful there.
Also make sure you are not using faulty drivers or strange kernel patchsets.
That all makes sence. However I know its not dust I clean the vents and fans regularly every week(living on a dirt road is hell in the summer time). It may have been a buggy driver or something, I updated the system w/ sudo apt-get update followed by sudo apt-get upgrade and finished with sudo apt‐get dist‐upgrade. Since then I haven't crashed. As far as I can tell the log looks pretty clean. Thanks for all the info, I can honestly say I learned something today.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.