Difference between revisions of "Category:Linux troubleshooting"

From Christoph's Personal Wiki
Jump to: navigation, search
(External links)
Line 104: Line 104:
 
* [http://susewiki.org/index.php?title=Main_Page SuSE wiki]
 
* [http://susewiki.org/index.php?title=Main_Page SuSE wiki]
 
* [http://ubuntuforums.org/showthread.php?t=191205 How to get specific programs to run under Dapper Drake 64-bit edition]
 
* [http://ubuntuforums.org/showthread.php?t=191205 How to get specific programs to run under Dapper Drake 64-bit edition]
 +
* [http://www.tux.org/pub/people/kent-robotti/looplinux/rip/ the (R)ecovery (I)s (P)ossible Linux rescue system]
 +
* [http://www.cyberciti.biz/faq/restrict-linux-users-to-their-home-directories-only/ Restrict Linux users to their home directories only]
  
 
{{stub}}
 
{{stub}}
 
[[Category:Technical and Specialized Skills]]
 
[[Category:Technical and Specialized Skills]]
 
[[Category:Linux Command Line Tools]]
 
[[Category:Linux Command Line Tools]]

Revision as of 00:39, 30 November 2006

This category will contain a collection of articles on troubleshooting Linux. It will be highly biased towards SuSE Linux (version 10.1 or later), as that is my primary OS. I am also using a 64-bit (x86_64) kernel, so my articles will also be biased towards these systems.

Note: Most of the following have also been tested on Mandriva Linux.

System information

% dmesg
% cat /proc/cpuinfo
% cat /proc/partitions
% cat /proc/meminfo
% cat /etc/X11/xorg.conf
% cat /proc/sys/vm/swappiness  # number from 0 - 100; the higher the number the more the system will swap
% cat /proc/interrupts   # inspect your /proc/interrupts file for multiple devices having the same interrupt
% xdpyinfo | grep dimen   # for screen dimensions
% uname -a  # system architecture
% grep ^VERSION /etc/SuSE-release  # To see which SuSE Linux version you are using
% cat /etc/mandriva-release        # To see which Mandriva Linux version you are using
% pstree
% getconf   # print system configuration variables
% getconfig # get configuration information for the Xorg server
% systool   # view system device information by bus, class, and topology
% cat /proc/scsi/scsi
WDC WD2000JD-22H Rev: 08.0
SATA-I, 200 GB, 150 MB/s, 8 MB Cache, 7200 RPM

Managing modules / devices / etc

% lspci
% lsmod
% depmod
% modprobe  # tail /var/log/messages (to check success / failure)
% rmmod

Linux networking

% /etc/init.d/network restart
% route add 20.0.xxx.xxx gateway foo
% /etc/rc.local
% /etc/sysconfig/network-scripts
% /sbin/ifconfig
% netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
20.0.xxx.xx     20.0.xx.xx      255.255.255.0   UGH       0 0          0 eth0
% cat /proc/net/arp
IP address       HW type     Flags       HW address            Mask     Device
192.168.xxx.xxx  0x1         0x2         00:00:00:00:00:00     *        eth0
192.168.xxx.xxx  0x1         0x2         00:00:00:00:00:00     *        eth0

External resources

Backing up the MBR

It is easy to backup and restore the master boot record (MBR) in Linux. However, caution must be exorcised when performing any of the following commands.

  • to backup
dd if=/dev/xxx of=mbr.backup bs=512 count=1
  • to restore
dd if=mbr.backup of=/dev/xxx bs=512 count=1

where xxx is the device, which can be hda, sda, or any other.

Sound problems

Note, my sound card specs: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller

  • Un-mute PCM sound
  • Check the following:
% lsmod | grep snd
% cat /etc/modprobe.conf
% vi /etc/modprobe.d/sound

(change "snd-intel8x0" to "snd_intel8x0")

% ./sbin/lspci

(list sound specs / Multimedia audio controller)

% modprobe snd-via82xx

Hacked?

  • Check for failed logins in: /var/log/messages
  • Regularly monitor:
    • zcat /var/log/auth.log.*.gz | grep refused
    • grep -i failed /var/log/auth.log
    • last
    • w and/or who
    • uptime
  • Verify that /etc/passwd hasn't changed.
  • Check fuser for ports.
  • Search for portscans in server report.
  • Check for weird processing hogging the CPU.
  • Use fail2ban, DenyHosts, etc.

Notes

  • pstree — display a tree of processes
  • lsmod — program to show the status of modules in the Linux Kernel
  • modprobe — program to add and remove modules from the Linux Kernel
  • netstat — Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
  • lspci — list all PCI devices
  • more /usr/share/pci.ids — A list of all known PCI ID's (vendors, devices, classes, and subclasses). Maintained at The Linux PCI ID Repository, use the update-pciids utility to download the most recent version.

External links

This article is curently a "stub". This means it is an incomplete article needing further elaboration.

I always welcome suggestions, comments, and criticism. If you have something to contribute to this site, please follow this link: Contributing Information. Thank you!

This category currently contains no pages or media.