# Introduction

This page is an TODO state. anyone is free to complete/contribute to it. For now (2010-06-11) it contains random notes I've been collecting through the time.
TODO is a mark meaning "to do" ("TODO" is automatically recognized by some editing tools as a pending tasks).

# HARDWARE MONITORING
## Rescanning the SCSI Bus

Next link provides a quick script to rescan the SCSI bus in Linux.
There is a simpler way that most of the time will work properly:
An slightly more complex script example for a Qlogic card:
Alternatively iscsiadm can be used if available:
Amognst other documents available on the net Red Hat Enterprise Linux 5 Online Storage Reconfiguration Guide can also be a useful help.

## DMIDECODE

Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output). This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. This will often include usage status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel, USB).

## DELL OMSA monitorization

Installing OMSA fro hardware monitorization in Dell Servers:
OMSA allows to monitor the health of RAIDs, motherboard/disk/chasis temperature, alarm generation, set/modify BIOS, watch installed devices,
To install under Debian:
1.- Add to /etc/apt/sources.list the next line:
2.- Execute
That install OMSA in /opt/dell.
3.- To boot the system:

### OMSA Usage Examples:

To check the health of the disc connected to controller 0:
The output will look similar to:
To check the state/configuration of the RAID:
That will look like:
To get an summary of the server:

## TODO logwatch
# SOFTWARE MONITORING
## Table of monitoring tools

| Sintaxis | Brief explanation |
| top | Allows to watch and administer running processes (useful to kill processes). press 'q' to quit, 'k' to kill a process, |
| htop | Similar to top, but with a more friendly menu based user interface. |
| lsof | Shows which processes are "touching" a file or directory and also the set of files being accessed by a process (that includes too any network socket, pipe or device). |
| netstat | Provides stats and reports for network usage and connections (established and listenning connections) |
| vmstat | Provides stats about the memory ussage |
| iostat | Provides stats about reads/writes to external devices |
| inotifywatch inotifywait | Modem Linux kernels allow to notify processes (user applications) any access or change to a file instantaneously. 'inotifywatch' and 'inotifywait' commands allows to wait for new events from the kernel notifying anything related to a set of files/directories. |
| strace -p <pid> | Allows to monitor system calls (calls to the services offered by the kernel) from a user application. |
| stap | Allows to monitor the kernel in real time and with high detail. A tutorial can be read here |
| oprofile and perfmon2 | allow access to hardware performance counters; A tutorial can be browsed here |
| AMD CodeAnaylist | front-end graphical user interface to Oprofile. An introduction/tutorial can browsed here and here |
| Intel VTune | Allows for Performance tuning in Intel hardware |