Thursday, April 26, 2007
Wednesday, April 25, 2007
kernel-debuginfo package to analyse vmcore
http://updates.redhat.com/pub/redhat/linux/updates/enterprise/4AS/en/os/Debuginfo/i386/RPMS/kernel-debuginfo-2.6.9-42.EL.i686.rpm
This is needed to analyse vmcore using crash utility.
how to save vmcore onto the hard disk
diskdumputils package
1. select the dump partition in /etc/sysconfig/diskdump
2. format the dump partition
# service diskdump initialformat
3. enable the service
# chkconfig diskdump on
# service diskdump start
4. verify whether diskdump enabled
If /proc/diskdump exists and it shows the registered dump device, the diskdump has been activated.
# cat /proc/diskdump
5. testing diskdump
To test diskdump, use Alt-SysRq-C or "echo c > /proc/sysrq-trigger". After completing the dump, a vmcore file will be created during the next reboot sequence, and saved in a directory of the name format :
/var/crash/127.0.0.1
crash utility can be used to analyse it.
Tuesday, April 24, 2007
Configuring NIS under Red Hat Linux
In these examples, the following conventions are used:
NIS domain: "internal"
Code or configuration file data: colored
Root prompt on NIS master server: master#
Root prompt on NIS client host: client#
Setting up a NIS master server:
Required packages: yp-tools ypbind ypserv portmap
Set up "time" service to run via inetd/xinetd, or configure xntpd, or otherwise make sure the host's clock is synchronized.
Edit /etc/yp.conf:
domain internal server ip.of.nis.server
Edit /etc/ypserv.conf:
dns: no
files: 30
xfr_check_port: yes
* : * : shadow.byname : port
* : * : passwd.adjunct.byname : port
Edit /etc/sysconfig/network:
NISDOMAIN="internal"
Set NIS domain name:
master# domainname internal
master# ypdomainname internal
Create file /var/yp/securenets:
host 127.0.0.1
255.255.255.0 10.0.0.0
Make sure the "portmap" service is running:
master# service portmap start
master# chkconfig portmap on
Portmap will need a rule in /etc/hosts.allow to allow access from localhost and any hosts that need to access NIS.
Start ypserv service:
master# service ypserv start
Check that it's listening:
master# rpcinfo -u localhost ypserv
You should see:
program 100004 version 1 ready and waiting
program 100004 version 2 ready and waiting
Initialize the NIS maps:
master# /usr/lib/yp/ypinit -m
Specify local hostname, Ctrl-D, y, let finish.
Start up ypbind, yppasswdd, ypxfrd:
master# service ypbind start
master# service yppasswdd start
master# service ypxfrd start
Set YP services to run on boot-up:
master# chkconfig ypserv on
master# chkconfig ypbind on
master# chkconfig yppasswdd on
master# chkconfig ypxfrd on
NIS client host setup
Required packages: yp-tools ypbind portmap
Edit /etc/sysconfig/network:
NISDOMAIN=internal
Edit /etc/yp.conf:
domain internal server ip.of.master.server
Edit /etc/hosts:
ip.of.master.server hostname.domain hostname
Set NIS domain-name:
client# domainname internal
client# ypdomainname internal
Edit /etc/nsswitch.conf:
passwd: files nis
shadow: files nis
group: files nis
Make sure the portmap service is running:
client# service portmap start
client# chkconfig portmap on
The /etc/hosts.allow file will need rules allowing access from localhost and the NIS master server.
Start ypbind service:
client# service ypbind start
client# chkconfig ypbind on
Test it out:
client# rpcinfo -u localhost ypbind
client# ypcat passwd
No Route to Host error and solution
A. This problem indicate networking conflicts or some sort of networking configuration problem.
Here are things to check:
a)Can you ping to your local router interface (such as 192.168.1.254)?
Make sure your card (eth0) is properly configured with correct IP address and router address. Use ifconfig command to configure IP address and route command to setup correct router address. If you prefer to use GUI tools:
redhat-config-network - Works on Red Hat and Fedora Linux/Cent OS.
network-admin - Debian and Other Linux distribution use this GUI too
Use above two GUI tools to setup correct IP address, DNS address and router address.
b) Make sure firewall is not blocking your access
iptables is default firewall on Linux. Run following command to see what iptables rules are setup:
# /sbin/iptables -L -n
You can temporary clear all iptables rules so that you can troubleshoot problem. If you are using Red Hat or Fedora Linux type command:
# /etc/init.d/iptables save
# /etc/init.d/iptables stop
If you are using other Linux distribution type following commands:
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
c) Finally make sure you are using a router and not a proxy server. Proxy servers are good for Internet browsing but not for other work such as ftp, sending ICMP request and so on.
See also:
List of LINUX troubleshooting commands/tools part # 1
Thursday, April 19, 2007
Wednesday, April 18, 2007
Linux Kernel Crash Dump facility
http://lkcd.sourceforge.net/
“When kernel fault occurs, LKCD writes a copy of the current system state (memory primarily) into the dump device you specified in advance. The dump device must be a system swap area. A utility called LCRASH is run on the next reboot (before swapping is enabled) to generate a summary of the crash, and optionally to save a copy of the dump in a conventional file. LCRASH can be run interactively and provides a number of debugger-like commands for querying the state of the system.”
Wednesday, April 11, 2007
Linux Source management
http://www.csn.ul.ie/~mel/projects/patchset/