Hot answers tagged failure
21
You can use false (/bin/false, /usr/bin/false, or shell builtin):
$ false || echo It failed.
It failed.
$
You can also use exit 1 from a subshell:
$ (exit 1) || echo Gosh, it failed too.
Gosh, it failed too.
$
9
Petr Uzel is spot on but you can also play with the magic $?.
$? holds the exit code from the last command executed,
and if you use this you can write your scripts quite flexible.
This questions touches this topic a little bit, Best practice to use $? in bash? .
cmd1
if [ "$?" -eq "0" ]
then
echo "ok"
else
echo "Fail"
fi
Then you also can react to ...
7
I have noticed for some reason (and whether this is true or not, I'm not sure) that Linux is more sensitive to failing hardware. I have seen this on my home office computer a couple of times. Your best bet is to start running hardware diagnostics.
For that I would recommend Ultimate Boot CD. In your case, I would start with running a Memtest (at least ...
7
Unmount the drive and run badblocks -n on it. This will rewrite every sector on the drive — read-then-write, so it's nondestructive — which forces the drive to swap in a fresh sector for every dodgy one found during the pass.
If badblocks can't fix it, you could step up to SpinRite which does that and more.
If either of those "fixes" the drive ...
5
Hardware failures always run some risk of crashing the Kernel since those code paths generally have had much less testing, but normally, a failed hard drive should not crash the Kernel. What exactly happens depends on the nature of the failure. Perhaps only certain sectors are now unreadable rendering parts of the /home partition unreadable, the system ...
5
The worst and most likely case is that you will lose everything. If you have a single logical volume spanning both drives, and you lose one drive with no mirroring, you've essentially wiped out half the file system.
From this point, it gets mildly better depending on what file system you are running on your volume. Assuming that you are not using ...
4
When a package fails to configure, you can install the missing dependencies after the fact using apt-get install -f. Here is the description of -f from the documentation:
-f, --fix-broken
Fix; attempt to correct a system with broken dependencies in place.
This option, when used with install/remove, can omit any packages to
permit APT to ...
4
A very secure way would be - if your find supports -delete - to use find for deleting:
find -type d -name 27-Jan -empty -delete
Since -delete implies -depth, it will first walk down the tree to directory 3275, delete it, step up one step, now 3274 is empty too, and can be deleted, step up to 3273 and so on...
man find:
-depth Process each ...
2
You can remove directory hierarchies recursively using -r switch of rm
-r, -R, --recursive
remove directories and their contents recursively
So issuing
rm -r 27-Jan
should get rid of the directory. Unless you have already tried that, of course. In that case, could you specify the error you get?
2
Such rarely occurring crashes are very hard to debug. It can be a hardware problem, driver (flgrx, as you've noticed) issue or even a kernel bug.
The easiest thing to do in your case is to change the video driver - of course that will only prevent further crashes only in case the driver was the problem source. Unfortunatelly, the right direction to go is ...
2
Some possibilities:
As Alan suggested, bad memory is a common cause of problems.
bad power-supplies can also cause random freezes and crashes.
low-quality motherboard. either due to shoddy manufacturing or due to bad/dodgy parts (e.g. a sub-standard or cheap version of a NIC that claims to be a particular brand/model but isn't - the manufacturer's Windows ...
2
dependancies are packages your package needs to run ( for example libraries etc ).
If you install a package trough aptitude / apt / synaptic this will check for the dependancies and download them.
If you download a .deb file and try to install it manually this might not be the case.
As posted before you need to install the required packages before ...
2
First off, 72 hard drives is a lot (biggest machine I have is only 24... and has 1200W supplies) I hope you're using staggered spinup.
You're probably seeing the drives start an offline data collection. That would explain the increase in power usage. It also means that if you were to actually use the drives, you'd probably push the power consumption at ...
2
More closely monitoring the system it's power consumption using a "watts up?" Watt meter lead to a stronger belief that these restarts were caused by an over current protection (OCP) on the power supply that kicks in.
Asking why the power consumption increase was happing 15 minutes after boot, lead to a serverfault answer that 15 minutes after boot all 74 ...
1
As per your output of last -x , seems reboot every 17-18 minute, so you first need to check, is there any script or cron is set for reboot or not? If not then read below.
Hardware related error you can check in dmesg | tail or software related logs your can find in logs of that particular application which you are running in your server usually tail -f ...
1
Anacron is great for what it is... a system to ensure jobs are executed every N number of days, after rebooting--not much control there. Furthermore, it's not a resident daemon and therefore can't replace crond or atd; it starts up at boot time (or when manually invoked), waits for the appropriate intervals before checking some conditions, and then once ...
1
This may be a situation where the batch option of at could help.
From my sandbox RHEL5 machine, I was able to schedule a batch job two minutes into the future, then stop atd. I let five minutes pass, and then started atd again. When atd started, the batch job kicked off immediately.
invocation: batch "NOW+2 minutes" or any acceptable at time input.
I did ...
1
On my PowerEdge 2500, when I first got it, the PERC (hardware RAID) controller's firmware was not at the latest revision. The effect of this is that the root disk would just suddenly disappear and would no longer be accessible (very similar to if it was a removable drive and it was just suddenly disconnected).
I couldn't load any new programs, programs ...
Only top voted, non community-wiki answers of a minimum length are eligible