Docs/SysAdmin/CLI/SystemLogs

From Mandriva Community Wiki

Jump to: navigation, search
System Logs

Where to look when something is not working

Contents


[edit] System logs

Use dmesg to check if the system displays an error. To see the full list of messages, you can go to /var/log/ and look at syslog and messages.

To get informations interactively about your system, look at /proc/ directory, as for instance /proc/cmdline, /proc/cpuinfo, ....

To watch interactively, do as root:

  1. type in a console: tail -f /var/log/messages
  2. execute the action causing a problem (for instance plugging your USB key)
  3. watch if some information is displayed in the console (hardware detection, warnings, ...)
  4. in case of trouble, copy/paste the resulting log.

[edit] Daemon system logs

Go to /var/log/daemons and look at errors/info/warnings files.

[edit] Kernel system logs

Go to /var/log/kernel and look at errors/info/warnings files.

[edit] Correct log files

[edit] USB keys

Jun  6 10:49:14 robbie kernel: usb 4-6: new high speed USB device using ehci_hcd and address 2
Jun  6 10:49:15 robbie kernel: SCSI subsystem initialized
Jun  6 10:49:15 robbie kernel: Initializing USB Mass Storage driver...
Jun  6 10:49:15 robbie kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jun  6 10:49:15 robbie kernel: usbcore: registered new driver usb-storage
Jun  6 10:49:15 robbie kernel: USB Mass Storage support registered.
Jun  6 10:49:20 robbie kernel:   Vendor: SWISSBIT  Model: Twist             Rev: 2.00
Jun  6 10:49:20 robbie kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jun  6 10:49:20 robbie scsi.agent[10174]: disk at /devices/pci0000:00/0000:00:10.3/usb4/4-6/4-6:1.0/host0/target0:0:0/0:0:0:0
Jun  6 10:49:20 robbie kernel: sda: Unit Not Ready, sense:
Jun  6 10:49:20 robbie kernel: : Current: sense key: Unit Attention
Jun  6 10:49:20 robbie kernel:     Additional sense: Not ready to ready change, medium may have changed
Jun  6 10:49:20 robbie kernel: sda : READ CAPACITY failed.
Jun  6 10:49:20 robbie kernel: sda : status<tt>1, message</tt>00, host<tt>0, driver</tt>08
Jun  6 10:49:20 robbie kernel: sd: Current: sense key: Unit Attention
Jun  6 10:49:20 robbie kernel:     Additional sense: Not ready to ready change, medium may have changed
Jun  6 10:49:20 robbie kernel: sda: test WP failed, assume Write Enabled
Jun  6 10:49:20 robbie kernel: sda: assuming drive cache: write through
Jun  6 10:49:20 robbie kernel: SCSI device sda: 126720 512-byte hdwr sectors (65 MB)
Jun  6 10:49:20 robbie kernel: sda: Write Protect is off
Jun  6 10:49:20 robbie kernel: sda: assuming drive cache: write through
Jun  6 10:49:20 robbie kernel:  /dev/scsi/host0/bus0/target0/lun0: p1
Jun  6 10:49:20 robbie kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Jun  6 10:49:21 robbie fstab-sync[10211]: added mount point /mnt/removable for /dev/sda
Jun  6 10:49:21 robbie fstab-sync[10224]: added mount point /mnt/removable1 for /dev/sda1

At the beginning the hardware is detected (message kernel: usb...), scsi.agent describes it for the system, fstab-sync mounts the device and renders it available to the system.

Personal tools