- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dmesg command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2001 01:43 PM
тАО05-14-2001 01:43 PM
I would like to use the physical memory output from the dmesg command in a script that monitors the free system memory. However, my dmesg is 'full' and I am trying to find a way to 'clear' it and get the memory report again. I have tried /usr/sam/lbin/getmem and it gives false output (report 512MB on systems with 2GB). I don't want to use syslog.log or OLDsyslog.log, for fear of the syslogd getting restarted, or the log files getting deleted by some well-meaning admin and the memory info getting lost. Running 10.20 on 9000's - is there a way to refresh dmesg?
Thanks
Eric Liszka
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2001 02:05 PM
тАО05-14-2001 02:05 PM
SolutionThe dmesg buffer is circular and once it overflows the data is gone. A better way is to ask the kernel itself via adb.
Do this:
1) adb -k /stand/vmunix /dev/mem
2) physmem/D (this will print the physical memory
in 4k pages)
3) $q (this will exit adb)
Man adb for details. You could script the process and get the value anytime 'on the fly'.
Hope this helps, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 04:36 AM
тАО05-15-2001 04:36 AM
Re: dmesg command
#echo "selclass qualifier memory;info;wait;infolog"|cstm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 06:55 AM
тАО05-15-2001 06:55 AM
Re: dmesg command
Thank you, that will do nicely......on all my systems except two.
On two systems the command just returns me to the shell with
no errors or output of any kind. I've got the same binary, and same
permissions on /stand/vmunix and /dev/mem. Any ideas on that one?
Thanks
Eric.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 07:04 AM
тАО05-15-2001 07:04 AM
Re: dmesg command
On 10.x systems:
# echo "physmem/D"|adb -k /stand/vmunix /dev/kmem
On 11.x 32-bit systems:
# echo "phys_mem_pages/D"|adb /stand/vmunix /dev/kmem
On 11.x 64-bit systems:
echo "phys_mem_pages/D"|adb64 -k /stand/vmunix /dev/mem
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 07:05 AM
тАО05-15-2001 07:05 AM
Re: dmesg command
try "phys_mem_pages/D" for 11.x
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 07:16 AM
тАО05-15-2001 07:16 AM
Re: dmesg command
I think James answered your question. I suspect you have some 11x boxes mixed in rather than simply the 10.20 OS you mentioned.
If the suggestions made by James don't fix your problem then let us know what OS and machine type. There were a few patches for adb and you may need to install one.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 07:24 AM
тАО05-15-2001 07:24 AM
Re: dmesg command
These two are running 10.20, I was able to get into adb without the -k option but physmem and phys_mem_pages were bad values. According to uname -a:
HP-UX B.10.20 A 9000/898
on both systems.
Eric.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 05:45 PM
тАО05-15-2001 05:45 PM
Re: dmesg command
# log kernel diagnostic messages every 10 minutes
05,15,25,35,45,55 * * * * /usr/sbin/dmesg - >>/var/adm/dmesg.log
Note that the demsg - option is important as it asks only for changes since the last call to demsg. I use the logname: dmesg.log while the example in /usr/newconfig/var/spool/cron/crontab.root is /var/adm/messages.
Now there won't be any lost messages.
A note about cstm...a very important tool but not installed automatically. Install cstm (and it's siblings mstm and xstm) from the SupportPlus CDROM in the DIAGNOSTICS directory.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2001 06:20 PM
тАО05-15-2001 06:20 PM
Re: dmesg command
Sorry I didn't see your last posting until now.
On the two errant boxes I would try this command.
echo "physmem/D" | adb /stand/vmunix /dev/kmem
You noted that the -k option was killin you so we will try it without the virtual to physical address mapping. Note that we are using a different mem device. I've never seen a case where adb would not run with -k.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2001 06:41 AM
тАО05-16-2001 06:41 AM
Re: dmesg command
Thanks again! using /dev/kmem without the -k option did the trick.
Eric.