Like us on Facebook!

Monday, 8 April 2013

SUSE - Quick And Easy Local Filesystem Troubleshooting For SUSE Linux

To identify possible Filesystem problems

1. Identify OS
2. Figure out how many active/running local disks and/or volume groups
3. Identify hardware product and Check partition
4. compare results: mount errors that are supposed to be up but are not ; mounts that are not supposed to be there
  • Check the USED% column in the output of your "df -l" command
  • Check the inodes column and ensure that those aren't all being used up either.
  • If you're running ReiserFS, use reiserfsck instead of plain fsck

Commands
  • uname -a
  • hwinfo --help
  • cat /proc/partitions
  • df -l
  • grep -v ":" /etc/fstab


To identify possible memory bottlenecks

I have gathered the following commands:
  1. Top
    1. virtual memory
  2. ps --aux | grep serviceProcess
    1. %MEM, VSZ and RSS
  3. vmstat 2
    1. “inact” and “active”
  4. ps -o vsz,rss,tsiz,dsiz,majflt,minflt,pmem,cmd PID
    1. for all the memory information
  5. cat /proc/PID/status
    1. detailed information
  6. swapon --s
    1. system swap partitions
  7. free
    1. used and free memory in terms of straight-up memory, buffers and cache
  8. cat /proc/meminfo
    1. detailed information of system memory and how its being used
  9. sar --r
    1. memory usage defined in terms of memory, buffers and cache

1. Identify OS
2. Figure out how many active/running local disks and/or volume groups
3. Identify hardware product and Check partition
4. compare results: mount errors that are supposed to be up but are not ; mounts that are not supposed to be there
  • Check the USED% column in the output of your "df -l" command
  • Check the inodes column and ensure that those aren't all being used up either.
  • If you're running ReiserFS, use reiserfsck instead of plain fsck

Commands
  • uname -a
  • hwinfo --help
  • cat /proc/partitions
  • df -l
  • grep -v ":" /etc/fstab


suggest to read something on a small but extremely useful command: “w”

“w” show the load of a system and this is the best indicator on system resource usage.

Top show high memory usage, then so what? If we configure oracle to use a lot of global memory, then it should high

Top show some process run in 100% CPU, that nothing, a simple infinite loop can drive the CPU be 100%, but the system can still function normally

But if “w” show 5, 10, 15 minutes load, that is a indication of thing not good…



1. Figure out where you are and what OS you're on:
host # uname -a
2.4.x will be fore SUSE 8.x and 2.6.x will be for SUSE 9.x.
2. Figure out how many local disks and/or volume groups you have active and running on your system:# hwinfo --help
Usage: hwinfo options
Probe for hardware.
  --short        just a short listing
  --log logfile  write info to logfile
  --debug level  set debuglevel
  --version      show libhd version
  --dump-db n    dump hardware data base, 0: external, 1: internal
  --hw_item      probe for hw_item
  hw_item is one of:
    all, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu,
    disk, dsl, dvb, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn,
    joystick, keyboard, memory, modem, monitor, mouse, netcard, network,
    partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, scanner, scsi, smp,
    sound, storage-ctrl, sys, tape, tv, usb, usb-ctrl, vbe, wlan, zip Find out what hardware product that you are dealing with# hwinfo | grep system.product
  smbios.system.product = 'IBM eServer BladeCenter HS21
8853G1G'
  system.product = 'IBM eServer BladeCenter HS21
8853G1G' check out partition# cat /proc/partitions
major minor  #blocks  name
   8     0   71288832 sda
   8     1      56196 sda1
   8     2    3100545 sda2
   8     3    4152802 sda3
   8     4          1 sda4
   8     5    3100513 sda5
   8     6   36700461 sda6
   8     7   24121566 sda7 3. Check out your local filesystems and fix anything you find that's broken:

host # df -l
host # grep -v ":" /etc/fstab

compare results:
       mount errors that are supposed to be up but are not
       mounts that are not supposed to be there
 @ - 16:36:42 UTC
( 511 /etc )
  1. df -l
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              3051824    615032   2281768  22% /
udev                   4089928       124   4089804   1% /dev
/dev/sda1                54416     19780     31827  39% /boot
/dev/sda5              3051792    906840   1989928  32% /usr
/dev/sda6             36123168  11928580  22359568  35% /var
/dev/sda7             23742552   5743236  16793240  26% /var/log

@ - 16:37:45 UTC
( 512 /etc )
  1. grep -v ":" /etc/fstab
/dev/sda2            /                    ext3  acl,user_xattr  1 1
/dev/sda1            /boot                ext3  acl,user_xattr  1 2
/dev/sda5            /usr                 ext3  acl,user_xattr  1 2
/dev/sda6            /var                 ext3  acl,user_xattr  1 2
/dev/sda7            /var/log             ext2  acl,user_xattr  1 2
/dev/sda3            swap                 swap  defaults        0 0
proc                 /proc                proc  defaults        0 0
sysfs                /sys                 sysfs noauto  0 0
debugfs              /sys/kernel/debug    debugfs       noauto  0 0
usbfs                /proc/bus/usb        usbfs noauto  0 0
devpts               /dev/pts             devpts        mode=0620,gid=5 0 0

TIPS

       Check the USED% column in the output of your "df -l" command
       Check the inodes column and ensure that those aren't all being used up either.
        If you're running ReiserFS, use reiserfsck instead of plain fsck
 host # umount /uselessFileSystem
host # fsck -y /uselessFileSystem
....
host # mount /  

if you need to fsck the filesystem any special filesystems, like root "/", you should optimally do it when booted up off of a cdrom or, at the very least, in single user mode

No comments:

Post a Comment

Have your say!