Operating System - HP-UX
1834481 Members
3206 Online
110067 Solutions
New Discussion

Re: /usr/sbin/dmesg ... std out is garbage

 
SOLVED
Go to solution
Jack Werner
Frequent Advisor

/usr/sbin/dmesg ... std out is garbage

Hi there HP/UX hackers,

I am trying to examine the Physical memory on an HP A-Class server running 64-bit HP/UX 11.0. The /usr/sbin/dmesg command is spewing out garbage ...ala
0/2/0/0: Unable to access previously accessed device at nport ID 0xdc.
... numerous times with nothing intelligible.
Am I missing a patch or what?

Thanks in advance for your attention to this.
i'm retired
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Hi Jack:

No, this is correct beharior for 'dmesg'. Only a small, circlular buffer is maintained, and as critical events occur, the buffer is overridden.

If you want to preserve the message history, create a cron task that runs every 10-minutes and looks like this:

/usr/sbin/dmesg - >> /var/adm/messages

Note the '-' is the option to incrementally capture new messages. The '>>' is the redirection into a file of your choice.

Regards!

...JRF...
Helen French
Honored Contributor

Re: /usr/sbin/dmesg ... std out is garbage

This is normal for the dmesg output. If you need to check the physical memory, use STM for information, testing and checking:

# stm
Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Hi (again) Jack:

The best way to examine physical memory is to use 'stm':

# echo "selclass qualifier memory;info;wait;infolog"|cstm > /tmp/meminfo

This will show you the physical DIMMS, their sizes and distribution.

Regards!

...JRF...
Jack Werner
Frequent Advisor

Re: /usr/sbin/dmesg ... std out is garbage

James,

Thanks for your prompt response. What I am trying to do is: ...
/usr/sbin/dmesg | grep "Physical:"
... to show how much Physical memory is installed on this server.
I can get this information on another HP A-Class server running 64-bit HP/UX 11.0.
However, on the box in question, nothing but the "empty/uninitiated" slot entries are output, per my original post.
i'm retired
S.K. Chan
Honored Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Interactive way in cstm can be used to ..
# cstm
cstm> map
===> take note of the device number (1st column) of the line that says MEMORY (for example: 8)
cstm> sel dev 8
cstm> info
cstm> infolog

To exist just CTRL-D.
S.K. Chan
Honored Contributor

Re: /usr/sbin/dmesg ... std out is garbage

0/2/0/0: Unable to access previously accessed device at nport ID 0xdc

The message above is filling up the "dmesg buffer" like what James had mentioned, hence you will not be able to get the output you wanted from it (ie the line "Physical .."), I'm guessing some device sitting in 0/2/0/0 was disconnected from the system wihout a proper reboot, hence showing up in tons in dmesg. To refresh dmesg output, you got to reboot the system, otherwise use previously mentioned method to get the info you wanted.
Jack Werner
Frequent Advisor

Re: /usr/sbin/dmesg ... std out is garbage

Perhaps someone could tell me where stm and/or cstm live? Neither is in the /etc/PATH directories nor in /sbin nor in /usr/sbin.
i'm retired
James R. Ferguson
Acclaimed Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Hi Jack:

# /usr/sbin/stm

If you do not have STM tools installed, they can be found in the DIAGNOSTICS directory of a current SupportCD. Alternately, you can download STM from here:

http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=B6191AAE

Regards!

...JRF...
PIYUSH D. PATEL
Honored Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Hi,

STM (actually, all the diagnostics) come on the SupportPlus CDROM along with the latest patch bundles. If you sign up for media support, you'll get the latest patches and diagnostics on a CD every 3 months or so.

Hence install STM from the CD and then run the commands.

Piyush
S.K. Chan
Honored Contributor
Solution

Re: /usr/sbin/dmesg ... std out is garbage

If it's not in /usr/sbin then the chance is you did not install OnlineDiag on your system. Check if you got it's install or not ..
# swlist -l bundle|grep -i online
If it's not there it's recommended you get it install, it should be in your Application CDs and newer version of OS (11.0 and above I think) has it in the CoreOS CD itself.

For now since you don't have it you would have to use other way to get the info ..

# /opt/ignite/bin/print_manifest

OR

For 10.x
# echo "physmem/D" |adb -k /stand/vmunix /dev/kmem
physmem: 28672
# echo "28672 * 4 / 1024" | bc
112
===> ie 112MB

For 11.x
# echo "memory_installed_in_machine/D"| adb -k /stand/vmunix /dev/kmem
memory_installed_in_machine: 524288
# echo "524288*4/1024"|bc
2048
===> ie 2GB
MANOJ SRIVASTAVA
Honored Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Hi

SAM---->perfomance mointors---> system properties---memory

You can check memory also seeing /var/adm/syslog/OLDsyslog incase dmesg is not working .

STM


Manoj Srivastava
Jack Werner
Frequent Advisor

Re: /usr/sbin/dmesg ... std out is garbage

I did not assign points to each response, rather to the 2 responders who were most helpful. I realize this might cheat them somewhat, but I do not have time to assign points to every response.

CIAO
i'm retired
James R. Ferguson
Acclaimed Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Hi (again) Jack:

Consider that we took *time* to offer assistance. Given that, it's only fair that you take *time* to assign points.

Regards!

...JRF...
Paula J Frazer-Campbell
Honored Contributor

Re: /usr/sbin/dmesg ... std out is garbage

Well said JRF



Paula
If you can spell SysAdmin then you is one - anon