Friday, November 7, 2014

easy learn linux command line-part 27

Today we learn how to use command line for Debug, Force Close, get System Logs, see system history, Monitor Kernel loaded and much other things.

if you enjoy this post, we recommend to visit here, here, here and here too.


Monitoring and debugging

Command Description
# free -m displays status of RAM in megabytes   
# kill -9 process_id force closure of the process and finish it   
# kill -1 process_id force a process to reload configuration  
# last reboot show history reboot   
# lsmod display kernel loaded   
# lsof -p process_id display a list of files opened by processes  
# lsof /home/user1 displays a list of open files in a given path system   
# ps -eafw displays linux tasks   
# ps -e -o pid,args --forest displays linux tasks in a hierarchical mode   
# pstree Shows a tree system processes  
# smartctl -A /dev/hda monitoring reliability of a hard-disk through SMART   
# smartctl -i /dev/hda check if SMART is active on a hard-disk   
# strace -c ls >/dev/null display system calls made and received by a process   
# strace -f -e open ls >/dev/null display library calls   
# tail /var/log/dmesg show events inherent to the process of booting kernel   
# tail /var/log/messages show system events   
# top display linux tasks using most cpu   
# watch -n1 'cat /proc/interrupts' display interrupts in real-time   

No comments: