Sei sulla pagina 1di 1

Linux Workshop

Lab 9 Troubleshoot tools and locate files


Requirements Quick Reference Objectives to learn
➢ Running Linux Troubleshooting & Status tools
➢ findutils-locate package top #Continuous cpuinfo, memory (M), tasks
watch cat /proc/meminfo #Show memory every 2 sec. See free
vmstat #Virtual memory statistics
cd /var/log; tail -f messages ... #Show continuous logfile(s)
dmesg #Show kernel ring buffer
less /var/log/dmesg #Show bootlog messages (q for quit)
cat /var/log/boot.log #Show bootlog messages
ps -aux ¦ less #Show process status including PID's
watch df #Show disk free space every 2 sec
fsck.<tab><tab> /dev/sda1 #File system check
ps -aux ¦ less #Show process status including PID's
To Do
ps -ef
1. Only for the Quick Reference commands which pstree ¦ less #Show process status tree using names
you are unfamiliar with: kill [-15] PID #Kill process using a PID nr and signal:

Execute the Quick Reference commands to see #1 HUP (hangup, reread config file)

the results. #2 INT (<ctrl-c>)


#3 QUIT (core dump)
#9 absolute KILL
#15 TERM (default, close normally)
killall [-15] processname #Kill process using a processname
grub-install /dev/hda #Inst. bootldr in MBR of master IDE-dsk

Locate files
locate namepart #findutils-locate package needed
updatedb #Runs every night (cron job for locate)
find . -name *namepart* #Find filenames with namepart in it
#Starting in . (current directory)
find . -perm +6000 -uid 0 #Find any (+) 4000¦2000 perm. for root
find . -perm -2 #Find only (-) 'world writable bit'

Theory Modules
LPIC 1 Certification Bible, isbn 0-7645-4772-0
➢ p. 77-82 Managing processes (ps, top, nice)
➢ p. 248-251 Locating files
➢ p. 212-216 Checking the File System (fsck, df, du)

Extra References
➢ www.tldp.org

© October 2, 2005, wiki.novell.com/index.php/Roberts_Quick_References, author of Foundations of Linux networking

Potrebbero piacerti anche