14.06.2014 Views

Red Hat Certified System Administrator (RHCSA) EX200 Study Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12/ 17/ 12<br />

www. linuxexplor er s. com / r ed- hat - cer t if ied- syst em - adm inist r at or - r hcsa- ex200- st udy- guide/<br />

3/ 11<br />

# init 0 (Switches to runlevel 0 which shutdown the sy stem)<br />

# halt<br />

Reboots Com m ands<br />

# reboot<br />

# shutdown -r +<br />

# shutdown -r now<br />

# init 6 //switches to runlevel 6 which reboots the sy stem immediately<br />

Boot systems into different runlevels manually.<br />

1) Boot y our sy stem and press any key within the allotted amount of time to get to the “Grub” bootloader screen.<br />

2) Select y our boot “OS” and press “a” to edit the boot command<br />

3) Add the number of the runlevel y ou would like to use at the end of the command to boot to that runlevel<br />

Example:<br />

roroot=/dev/mapper/vg_centosvm-lv_rootrd_NO_LUKSLANG=en_US.UTF-8rd_NO_MDquiet<br />

SYSFONT=latarcyrheb-sun16rhgbcrashkernel=autord_LVM_LV=vg_centosvm/lv_swapKEYBOARDTYPE=pc<br />

KEYTABLE=usrd_LVM_LV=vg_centosvm/lv_rootrd_NO_DM1<br />

The “1” at the end of the boot string will boot the sy stem to runlevel 1<br />

Use single-user mode to gain access to a system.<br />

Boot the sy stem to runlevel 1 as shown above to gain super user (root) access in run level 1<br />

Identify CPU/memory intensive processes, adjust process priority with renice, and kill<br />

processes.<br />

Y ou can identify process with the following commands<br />

# ps aux<br />

# ps-ef<br />

# ps -u // shows programs running for username<br />

# ps -o user,com m ,pid,nice -u root //Gets the processes PID and Nice value for the root user<br />

top // Shows the stop processes that are using sy stem resources<br />

Y ou can kill processes with the following commands<br />

# kill -9 //hard close of the process<br />

# kill -15 //attempts to kill process gracefully<br />

# killall //kills the parent and all associated child processes<br />

Adjust process priorities<br />

# renice <br />

nice priorities range from -19 to 20 with -19 being the hightest priority and -20 being the lowest.<br />

Locate and interpret system log files.<br />

Y ou can find the sy stem logs in the /var/log directory . The logs can be viewed with text viwer commands such as cat, less

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!