1752498 Members
5544 Online
108788 Solutions
New Discussion юеВ

scsi debugging

 
SOLVED
Go to solution
R.K. #
Honored Contributor

scsi debugging

Hello All,

I want to enable scsi debugging for 11.31.

Can it be done globally or for a subsystem or only specific to a device?

I tried this for a disk:
-----------------------------------------------
# scsimgr set_attr -a escsi_log_dev=0xbc04b300
Value of attribute escsi_log_dev set successfully
-----------------------------------------------

But cannot find any messages in syslog.log.
Is this the correct way?

And what are the "escsi_dbg_lvl" levels?

Thanks in Advance..
Don't fix what ain't broke
13 REPLIES 13
R.K. #
Honored Contributor

Re: scsi debugging

Any suggestions or advice?

Thanks in advance..
Don't fix what ain't broke
Steven E. Protter
Exalted Contributor

Re: scsi debugging

Shalom,

Try restarting syslog.

/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start

Also why do you expect the logging to be in syslog.log? Is it perhaps in its own file?

lvl stands for level in escsi_log_lvl. Higher levels generally dictate more detail.

Careful this can get verbose.

Why do you need this data? Do you suspect a scsi problem? Inquring minds want to know.


Can it be done globally or for a subsystem or only specific to a device?


Note the dev statement.

I tried this for a disk:
-----------------------------------------------
# scsimgr set_attr -a escsi_log_dev=0xbc04b300


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
R.K. #
Honored Contributor

Re: scsi debugging


I have gone through man page of scsimgr which says that changes like enabling/disabling scsi object will log message in syslog.
Yes we suspect scsi issues for which I was asked to do this.

1. Is there any other file also that contains debug logs?

2. Is this correct command to enable scsi logging?
# scsimgr set_attr -a escsi_log_dev=0xbc04b300

3. And lastly, scsi debugging is done on device level ?

@SEP:
Once I get back to work, I will definitely try resarting syslogd.

Regds..
Don't fix what ain't broke
Matti_Kurkela
Honored Contributor

Re: scsi debugging

By default, the HP-UX syslog will ignore debug messages. You should adjust the /etc/syslog.conf configuration to log the debug messages (perhaps into a separate logfile), then send a kill -HUP to syslogd.

You may also want to add the "-v" option to syslogd (using /etc/rc.config.d/syslogd) and restart syslogd. This will add the facility/priority code to each log message. Being able to see the priority levels of each message will make it easier to further refine your syslog.conf configuration.

NOTE: when editing /etc/syslog.conf, remember to use TABs between message selectors and their associated log destinations, not spaces. See the man page of syslog for more information.
MK
R.K. #
Honored Contributor

Re: scsi debugging

Thanks so far..

>>You should adjust the /etc/syslog.conf configuration to log the debug messages

Que 1: I am not sure on how to edit this file to enable the debugging. Need more help on this.

I have changed /etc/rc.config.d/syslogd from "-D" to "-D -v". Restarted syslogd. But still could NOT see any logging in syslog.

Que 2: How can I verify/test that logging is been done by system?

Don't fix what ain't broke
Bill Hassell
Honored Contributor
Solution

Re: scsi debugging

syslog logging is configured by the file /etc/syslog.conf. The /etc/rc.config.d file configures how syslogd is started and stopped.

-v turns on the facility and priority which will be useful later on. The change you need to make is in /etc/syslog.conf. Typically it looks like this:

mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *

In this example, only mail messages will be logged all the way down to the debug level. Temporarily, you need to change the syslog.log line from *.info to *.debug. Now before you make the change, a very, very important rule: syslog.conf must have *NO* spaces between items. Any space in this file turns the line into a comment! (as far as I know, this is the only Unix command with this bizarre rule).

Secondly: once you make the change, open an extra window to monitor the size of syslog. The debug level can cause syslog.log to grow enormously fast (many MB in a few seconds) so you may need to switch back to *.info fairly quickly.

Now to prevent excessive syslog.log growth, you can redirect the scsimgr debug messages to a different file. To do this, you must first identify scsimgr messages in syslog with debug level set. Right after the date (when syslogd is run with -v), you'll see a 2 character code like 5B or 3D. This is the syslog sorting code -- numbers = priority or importance, letters = facility or category. Use the man page for syslog to find the character codes.

To redirect scsimgr debug messages to a different file, find the facility code (letters A through X) then edit the syslog.conf file. Suppose the scsimgr facility is LOCAL6 (letter = W) then syslog.conf should look like this:

*.info;mail.none;local6.none /var/adm/syslog/syslog.log
local6.debug /var/adm/scsimgr.log

This says: ignore all mail and all local6 messages for syslog.log, and send all messages for LOCAL6 to the file /var/adm/scsimgr.log file.

Now you can get the debug details without seeing a bunch of other service messages.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: scsi debugging

Almost forgot:

>How can I verify/test that logging is been done by system?

logger. This command can create a message at any priority and for any facility. Usage:

logger [-p facility.priority] "Some message"

So for LOCAL6 at a WARN level:

logger -p local6:warn "testing local6"

Then look in syslog.log (or scsimgr.log). Note also that any changes to syslog.conf must be followed by:

kill -HUP `cat /var/run/syslog.pid`

which will cause syslogd to re-reada the conf file.


Bill Hassell, sysadmin
R.K. #
Honored Contributor

Re: scsi debugging

Thanks a lot guys..!!

Will get back again in case I need more help.

Regds..
Don't fix what ain't broke
R.K. #
Honored Contributor

Re: scsi debugging

Hi Again,

I have changed *.info to *.debug and followed steps as said.

-Changed syslog.conf
-Made it verbose
-Restarted syslogd

BUT still I am not getting any debug messages logged into syslog.log.

Logger command is working fine.

Any suggestions....what could be the issue?

Thanks..
Don't fix what ain't broke