Advanced checks

Check log files

Check for errors and warnings

dmesg or dmesg -H for the kernel messages

Note

Not every error is critical. As example the kernel tries to load firmware but fails since it does not find it on the location and produces an error. Then it tries an other location with success

Most of the log files are under /var/log

/var/log/messages

/var/log/Xorg.0.log

cat /var/log/Xorg.0.log | grep WW and cat /var/log/Xorg.0.log | grep EE should not return any problems.

To see the kernel messages and have them in a file dmesg > dmesg.txt

Check the disk health

Type dmesg | grep orphan to see if orphan i-nodes are around or cat /var/log/messages | grep orphan if such things have occurred.

To see info about your hard disk: tune2fs -l /dev/sda<n> Check for clean status. If not unmount it (if possible) and e2fsck /dev/sda<n>

Check dangling symlinks

http://www.ibiblio.org/pub/Linux/utils/file/ is a tool to find missing symlinks. It is quite a small nicely written c program so man symlinks gives probably all the documentation available (which is not bad). symlinks -r ~ checks dangling symlinks in the users home directory. It is also wise to run it just on certain directories, otherwise it takes too long and too much stuff will be found and added to the output. symlinks -r /lib should look quite clean, but symlink just claims that the links are absolute and symlink would prefer relative links. Checks on the root directory as the following should report mainly nothing:

symlinks -r /etc | grep dangling

symlinks -r /lib | grep dangling

Check init scripts

Emerge does not automatically install the init scripts located in /etc/init.d, this has to be manually using the rc-update command. Open two console windows ls -l /etc/init.d shows you what init scripts you have and rc-update -s (after typing su) shows you what is running. If you type it with the verbose option rc-update -sv all init scripts are shown also the not configured ones. Check out what the ones are that are not running and if you know what they are about install them when necessary. The command rc-status shows what is running.

Check old files

The package managers do good work, but the can just remove things that are known to them. If you install the kernel source and compile and then install a kernel, the package manager knows just bout the files of the source it does not know about the files produced during compilation and then what you installed.

Similar things happen with regular programs, when they run they produce files luckily in Linux there are some write restrictions so programs write this stuff often under ~/.<name of the program> a hidden directory in the users home directory. When you remove the program using the package manager some leftover remain.

There is no easy way to know about those files, one thing could be done find ~ -mtime +365 shows the files produced more than 1 year ago and find ~ -atime +365 the files accessed longer than one year ago. It is then up to you to decide if you want to delete them manually.

Check user accounts

Have the users the same UID numbers assigned among the different computers in the network?

Have the users the same primary GID assigned among the different computes in the network? /etc/passwd contains the the primary GID

Is the user added to its GID in /etc/groups

Clean user account

Programs save data in ~. If they are nice they save the data in a directory containing the program name. Since emerge is not aware of those files they remain after a package gets unmerged. Therefore deleting those directories manually makes sense. It can also happen that those directory contain incompatible data to contain a version conflict after an update. Files that should not be deleted since creating a fresh user account produces them are; .bash_logout, .bash_profile, .bashrc


Linurs Servernest startpage