[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Why does my DomU keep going mad?



On 26/07/2010 16:24, Adi Kriegisch wrote:
Hi!

You could monitor your services for memory consumption?
[SNIP]
These are useful thanks, although ps doesn't use - (just to be awkward,
everything else does).
man ps:
[SNIP]
   1   UNIX options, which may be grouped and must be preceded by a dash.
   2   BSD options, which may be grouped and must not be used with a dash.
   3   GNU long options, which are preceded by two dashes.
[SNAP]

Just that I was getting the error message
"Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.5/FAQ"
Taking the - off seemed to cure it.

I looked at nagios a few years ago, it looked great, but like I'd have
to take a week out to set it up. If there anything lightweight I could
make? I guess I could write a Perl daemon that runs that ps command
every 10 seconds or something and logs the output to a file... Seems
like the sort of thing that should all ready be available though...
My suggestion was not about setting up nagios if you're not already using
it. You could start using sar[1] or just write a plain shell script doing
the monitoring for you:
while /bin/true; do
   WHATEVER_PS_COMMAND_YOU_LIKE_BEST>  \
            /var/log/mymemlog/$(date +%Y-%m-%d_-_%H.%M.%S)
   sleep 10
done

Beautiful thank you :)

...and you'll get memstats every 10 seconds saved in a log file for further
analysis.

Another option would be to check your already existing log files for
"oomkiller" messages. They could give hints on the processes eating up all
your memory.

Will do.

Further this is a general issue with Linux servers running out of memory
and is not related to Xen or a Xen issue. You might as well want to have a
look at sites serverfault[2] or you might want to do it the other way
around and limit memory for the available applications and users. Just have
a look at /etc/security/limits.conf for example. Then sit down and wait for
the first service dying... ;-)

I wasn't sure if there was something common in xen that I needed to setup to stop this.

Another option could be to add more swap space (as this is usually cheaper
than ram). That way your problem might "disappear". On the other hand you
should plan your (virtual) machines with expected memory consumption in
mind so that using swap space will not happen at all (or just in case of
emergency preventing the oomkiller to snap in).

I don't want to throw more memory at it, I'd rather figure out what's going wrong and why.


Thanks for the detailed responce :)


Lyle


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.