c5b9
![]() |
|
|
|
|
|||||||
| General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
We had some weird attack causing some of our front machines to run into swap and even run out of swap. Now the logfiles only show "out of swap" errors, which doesnt really help to find out what process exactly forced the system into crash - and ideas how I could improve logging to tackle / maybe even kill swapping processes?
Code:
# tail -n 2 /var/log/messages Sep 28 09:06:43 gateway-001 kernel: swap zone exhausted, increase kern.maxswzone Sep 28 09:06:43 gateway-001 last message repeated 192 times # sysctl -a | grep "kern.maxswzone" kern.maxswzone: 33554432 # swapinfo Device 1K-blocks Used Avail Capacity /dev/ad4s1b 16777216 0 16777216 0% Last edited by DutchDaemon; September 30th, 2010 at 16:07. Reason: It's [code], not <code> |
|
#2
|
|||
|
|||
|
Try changing the log settings in /etc/newsyslog.conf so that you keep more historical info?
But if your problem is simply running out of memory you may well not see much in the logs apart (apart from the fact the system is out of memory). You mention its a "front machine", if it's a web server try tuning apache or whatever so that it prevents so many connections that you run out of memory and dies might be the first thing to consider/check, Andy. Last edited by DutchDaemon; September 30th, 2010 at 22:21. |
|
#3
|
||||
|
||||
|
Keep top running in a terminal, and watch the memory columns to see what's using all the RAM?
|
|
#4
|
||||
|
||||
|
Boy, I'd like to say that ps(1) could do something, but I'm not sure. It does too much for my tiny brain.
__________________
Quid habemus reliquum? Nutrimentum anatum! Внимание: лифт вниз не поднимает |
|
#5
|
|||
|
|||
|
I think you're looking for sysutils/fuser. procstat/pstat, and maybe even fstat may have access to the info as well, but it's harder to parse.
Last edited by DutchDaemon; October 1st, 2010 at 13:05. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| apache processes | Jeff_8420 | Web & Network Services | 4 | October 13th, 2010 07:30 |
| Command for processes | tifoz | General | 4 | February 4th, 2010 17:25 |
| [Solved] how much swapping before you should add ram? | phospher | General | 4 | September 11th, 2009 18:31 |
| very good and nice way for read log file and search in log file | mfaridi | General | 8 | April 22nd, 2009 22:21 |
| [Solved] syslogd logs to all.log, but not to my.log | fredBSD | Web & Network Services | 1 | March 5th, 2009 06:34 |