var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
how to check logfile ?
i just don't remember what was the command to check logfile in linux to see what was going on in my server, since i think someone hacked in to my server and i was ddos last couple days. Thanks
Watch the log files using tools like 'less' or open it in a text editor like 'vi' or 'nano'.
use following command to see the logs in the server
tail -f /var/log/messages
Its not such a good idea to open an active log file with vi/nano or any other text editor it makes it none writable (in most cases)..
tailf/tail -f work the best as hostechsupport said.
Remote Hands and Your Local Tech for the Los Angeles area.
(310) 573-8050 - LinkedIn
tail command with "-f" option will only follow the result as the file grows, it works great if we would like to sit and watch the new processes
In this case, he wants to see the logs of the past couple days. so tail -f doesn't work, also tail "-n number" option will print the output on the screen and its tough to analyse the logs
So, commands like "less filename" will work fine in this situation.
Yes, less will work best in this case
Server Surgeon George
Linux, BSD and Windows Administration Services
Toll Free US 877-378-7436 International +1-213-291-9191
tail -10000 will show you the last 10000 lines, head -10000 (first 10000)
If you can file a file or peice of a clue:
grep clue messages
find clue in multiple word format:
grep 'clue phrase' messages
using |less looking through a 200MB log file might make your eyes bleed
Last edited by page-zone; 01-11-2007 at
Originally Posted by
That, and if its a 1GB file, it might take a while to open. But I believe opening it opens a copy using RAM, it doesn't lock the file itself. But I could be wrong. Saving it would eliminate anything that was put into it while it was open though.