1834488 Members
3554 Online
110067 Solutions
New Discussion

Re: msgbuf file

 
augusto cossa
Frequent Advisor

msgbuf file

Good Day,

I'm facing a problem concerning /var/adm/msgbuf file. Everyday I trim this file to 10% but in a caple of seconds becomes the same size. The soze that have now is:

Percent Full Current size Recommended size
400 4100 1024

Other thing is, how can I see the number of files opened by all proccess and if I increase the nfile it's needed to increase the nproc?

Thanks,

A Cossa
9 REPLIES 9
Philip Chan_1
Respected Contributor

Re: msgbuf file

For number of open files try

sar -v 2 9

second last column of the output should be what you're looking for.

Rgds,
Philip
CHRIS_ANORUO
Honored Contributor

Re: msgbuf file

You can download and install lsof from the hp software porting site with this link:http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.48/

If you increase MAXUSERS it will increase NFILE and NPROC parameters.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: msgbuf file

Augusto,

To add to the above, the msgbuf is generated from dmesg output. Use dmesg to check if there are errors reported in your system.

Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
augusto cossa
Frequent Advisor

Re: msgbuf file

Hi Chris,

I have chacked the dmesg and the output is as followed:
strings /sbin/dmesg
$Revision: 92453-07 linker linker crt0.o A.10.44 951205 $
/usr/lib/dld.sl
ERROR: mmap failed for dld
@(#) $Revision: 72.1 $
msgbuf
/var/adm/msgbuf
Can't open /var/adm/msgbuf
/stand/vmunix
Can't get kernel namelist
/dev/kmem
Can't read kernel memory

What have I to do?

Your help will be appreciated,
Thanks

A Cossa
Ruediger Noack
Valued Contributor

Re: msgbuf file

Hi,

have you created a new kernel since last boot and placed it at /stand/vmunix ?

Ruediger
CHRIS_ANORUO
Honored Contributor

Re: msgbuf file

First the perms on the file should be 644, owned by root, group sys.
Then retune the kernel by increasing MAXUSERS by 50. This is just too increase NFILE and NPROC for you as per 1st questn. Relink the kernel and system will be rebooted.
These steps will help you clear the last dmesg error messages and stabilize your system.

Find time to do this!

Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Kofi ARTHIABAH
Honored Contributor

Re: msgbuf file

Hi Augusto:

What Chris was refering to about running dmes is that you should actually type the command dmesg at the prompt:

#dmesg

you can also check your /var/adm/syslog/syslog.log for any errors that are causing your msgbuf to grow
nothing wrong with me that a few lines of code cannot fix!
Gail MacDonald
New Member

Re: msgbuf file

Add the "-" option on the /usr/sbin/dmesg command in the cron job that appends to your /var/adm/dmesg file. See man page for dmesg.

The effect of this is to only append messages that it hasn't reported before, rather than the same messages over and over.
Bill Hassell
Honored Contributor

Re: msgbuf file

Check root's crontab entry (crontab -l) and see if you are running dmesg into this file. If so, here are two recommendations:

1. Change the name of the file to dmesg.log so it makes sense. msgbuf or messages simply doesn't tell you how the log file is being created.

2. Run the cron job every 10 minutes but be absolutely sure tha the command looks like:

10,20,30,40,50 * * * * /usr/sbin/dmesg - >> /var/adm/dmesg.log

Notice the - sign which keeps dmesg output limited to only that which has changed since the last invocation.

And of course, look at the end of the log file to see if there is an important series of messages like: / filesystem is full


Bill Hassell, sysadmin