Pages

Thursday, March 1, 2012

Linux Tools

This list will continue to grow as I come across useful tools in Linux. I have also listed the command-line that I most frequently use:

ps - get the process information
  • ps -flycae # will give information on scheduling class and kernel function name where process is sleeping
mcelog - Machine check log
  • Determine system errors, decode, and log in syslog like /var/log/messages
    mcelog --dmi --syslog
    PS: The decoded hardware module is sometimes not helpful in determining the module at fault
OProfile - Profiling Linux system
  • Covered under separate post here
mdadm - Manage Software  RAID
  • Use mdadm for software mirroring devices:
    mdadm -C --level=raid1 --raid-devices=2 /dev/md0 /dev/sdb1 /dev/sdc1
    mdadm --manage /dev/md0 --fail /dev/sdc1
    mdadm --manage /dev/md0 --remove /dev/sdc1
    mdadm --manage --stop /dev/md0
    For striping, better to use LVM
LVM - Logical Volume Manager
  • pvcreate <list of devices>
  • vgcreate <vg-name> <list of pv devices>
  • lvcreate -i<#of vg devices to stripe across> -I<stripe-size-default64k> -L<size-in-MB> -n<volume-name> <vg-name>
MUTT - The Mutt Mail User Agent
  • echo "<message-body>" | mutt -a <attachment-file> -s "<subject>" <To email> [-b <BCC email>] [-c <CC email>] 

No comments:

Post a Comment