SourceForge sciloglev summary
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
put S in SYSCTL
here are coefficients for available items:
|SCSI High Layer||3||512|
|SCSI High Layer completed||4||4096|
|SCSI Medium Layer||5||32768|
|SCSI Medium Layer completed||6||262144|
|SCSI Low Layer||7||2097152|
|SCSI Low Layer completed||8||16777216|
Conclusion: Computing the logging_level value is a fastidious.
Even using octal numbers needs a great attention, because of the 10 digits length.
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
scsiloglev is provided under the Lesser GNU Public License terms.
scsiloglev [-m | <+|->w [item level] ]
-m display current levels scsiloglev format
+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