SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,414
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)

    Shell server tutorial

    I have a VPS and it runs along nicely without much input. Today I have recived a couple of emails about checking a log and another log file is around 2GB.
    I am not a Linux user and am not that happy with command line and so do not do much work via the shell and have decided I should do more and would like an extremly simple tutorial on how things work.

    For instance I am told that instead of deleting the log file through FTP I should empty it with # cat /dev/null > log file to empty

    Now all well and good and I have downloaded Putty which gives me shell access.

    I can log into the server OK but when I put in cat /dev/null > brcm-iscsi.log nothing happened; I did not use the # as putty already had it there. I then tried # cat /dev/null > brcm-iscsi.log but agan nothing happend. I assume I should put a path in for the file but where am I in the file system and what should the path be? How would I know where the file is anyway without first FTPing into the server and finding it?
    WHM tells me for security to stop certain processes from running as I do not need them but again how to do it and where are the processes in the file system to stop!

    You can see that basicly I have no idea and need some simple tutorials. The tutorials I find start off quite well but the writer soon forgets that he is writing something for an idiot and assumes you know something vital.

    Anyway a link/links to a tutorials or book recomendation would be great.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,656
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Rubble,

    It's been ages since I tweaked my log file setup but, since you've got WHM, I know that there is a setting to allow "rotation" of log files, i.e., upon reaching a size (or is it period of coverage - weekly or monthly), it will "rollover" to an empty log file and start anew. The oldest will be deleted, i.e., you only save one or two generations of log behind the current log. Quite obviously, a 2Gb log file contains ancient entries of no particluar value - I'd merely delete it and start over.

    If you're not using the log for anything, I'd recommend a brief period and only saving one prior period (so your host's sysadmin types can view hacker attempts at your website).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,414
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    Thanks for the info DK and that lead me to some information on the cpanel website.
    I think this only relates to cpanel logs and not other logs but I will check it out tomorrow as it looks like rotation is already set ( must have been a default as I did not set it ) and the rotation file size is 300mb.

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,656
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Rubble,

    If it's set to 300mb and you're at 2Gb, then something's wrong: Set but not enabled? Remember, too, that there are logs for just about anything: Visit, error, mod_rewrite even has its own log (if enabled). Then the verbosity of your logs can also be controlled (at least for mod_rewrite) and you don't want to know every little "thought" it has, believe me! Well, at least that can get you back to your host for help managing the logs via cPanel (or view some cPanel tutorials - my host has them for the forgetful types ... like me).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •