SourceForge sciloglev summary

scsiloglev

Table of Content
Why
Solution
Download
License
Usage



WHY

Since kernel 2.6, administrators have to manage Linux SCSI subsytem logs using SYSCTL feature.
Doing so, a 8^n coefficient (k) is affected to each log item.
Then log level l (l in [0..7]) for each item has to be multiplied by this k coefficient.
This give a log value L for each item.
At last, sum S of log values for all items has to be write into /proc/sys/dev/scsi/logging_level

This can be resumed by following algorhytm:
S = 0 (value to be given to SYSCTL)
For each item
	n = item number - n in [0..9]
	l = desired log level for item - l in [0..7]
	k = coefficient for Item (8^n)
	L = l * k
	S = S + L
end
put S in SYSCTL


here are coefficients for available items:
log itemn8^n
error01
timeout18
scan264
SCSI High Layer3512
SCSI High Layer completed44096
SCSI Medium Layer532768
SCSI Medium Layer completed6262144
SCSI Low Layer72097152
SCSI Low Layer completed816777216
ioctl9134217728


Conclusion: Computing the logging_level value is a fastidious.
Even using octal numbers needs a great attention, because of the 10 digits length.

SOLUTION

Administrator can be helped by an utility tool for managing loggin_level value.
This is the aim of scsiloglev, which should be able to give a friendly interface for:
  • reporting current log levels for each item
  • writing log levels


DOWNLOAD

Download is not yet available
When release will be available, you will be able to get it in scsiloglev project download area from SourceForge

LICENSE

scsiloglev is provided under the Lesser GNU Public License terms.

USAGE

scsiloglev [-m | <+|->w [item level] ]

where

read option
        -m              display current levels scsiloglev format

write options
        +w              change given levels and keep other levels
        -w              change given levels and reset other levels
        -e       error log level
        -t       timeout log level
        -s       scan log level
        -hl      HL queue log level
        -hc      HL queue log level
        -ml      ML queue log level
        -mc      ML queue log level
        -ll      LL queue log level
        -lc      LL queue log level
        -i       ioctl log level