نمایش نتایج: از شماره 1 تا 3 , از مجموع 3

موضوع: تو رو خدا راهنمايي كنيد

  1. #1
    عضو انجمن MelatHOST آواتار ها
    تاریخ عضویت
    Jan 2009
    محل سکونت
    رشت
    نوشته ها
    412
    تشکر تشکر کرده 
    81
    تشکر تشکر شده 
    330
    تشکر شده در
    232 پست

    پیش فرض تو رو خدا راهنمايي كنيد

    با سلام
    امروز ديدم اين خطا به ايملم ارسال شده
    Drive Critical: /dev/sda6 (/usr) is 91% full
    پوشه local داخل usr الان 6 گيگابايت از هاست رو پر كرده
    لطفاً راهنمايي كنيد عجله دارم
    ویرایش توسط MelatHOST : August 16th, 2009 در ساعت 07:02

  2. تعداد تشکر ها از MelatHOST به دلیل پست مفید


  3. # ADS




     

  4. #2
    عضو انجمن MelatHOST آواتار ها
    تاریخ عضویت
    Jan 2009
    محل سکونت
    رشت
    نوشته ها
    412
    تشکر تشکر کرده 
    81
    تشکر تشکر شده 
    330
    تشکر شده در
    232 پست

    پیش فرض پاسخ : تو رو خدا راهنمايي كنيد

    الان رفتم داخل پوشه local و حجم هر فايل رو نگاه كردم به صورت زير ليست شد

    108K ./bandmin
    332K ./sim
    12K ./etc
    180K ./share
    13M ./php4
    24K ./ddos
    8.0K ./libexec
    28K ./man
    8.0K ./games
    8.0K ./apache.backup_archive
    1.4G ./cpanel
    34M ./frontpage
    4.9M ./lib
    17M ./bin
    4.8G ./apache
    24K ./sbin
    3.0M ./include
    384M ./cpanel-rollback
    8.0K ./src
    15M ./Zend
    2.6M ./IonCube
    36M ./apache.backup

  5. تعداد تشکر ها از MelatHOST به دلیل پست مفید


  6. #3
    عضو انجمن MelatHOST آواتار ها
    تاریخ عضویت
    Jan 2009
    محل سکونت
    رشت
    نوشته ها
    412
    تشکر تشکر کرده 
    81
    تشکر تشکر شده 
    330
    تشکر شده در
    232 پست

    پیش فرض پاسخ : تو رو خدا راهنمايي كنيد

    خودم مشكل را حل كردم آموزش را براي شما ميگذارم تا انشالله شما از اين مشكلا براتون پيش نياد

    1. Introduction

    Maintaining your logs is essential to keep your hard drive partitions healthy and to avoid potential problems that occur when partitions become 0 full. There is nothing worse then your /var partition filling up completely because you didn’t keep an eye on your logs. When a partition fills up, all kinds of weird things can happen which is why we strongly recommend you keep an eye on them as part of your daily routine.

    We will go over the different logs, what they are used for, and how you can maintain them.
    2. Maintaining Your Logs

    There are several logs that you should monitor on a daily basis and they are as follows:

    - /usr/local/apache/logs/error_log & /usr/local/apache/logs/access_log

    - /usr/local/apache/domlogs/

    - /var/log/

    - /var/spool/exim/input/ & /var/spool/exim/msglog/

    These are the most common logs likely to cause dedicated server owners a headache. We will go over each one and how to keep them in order.
    2.1 Error_log & Access_log

    This is the most common log to fill up your /usr partition. If some morning you log into WHM and notice a flashing red light for the /usr partition and it’s reading at over �, the first thing you should do is log into your server via SSH and go to that directory:

    cd /usr/local/apache/logs/

    ls –l

    This will list the contents of the directory along with the size of each file. You will most likely notice your error_log is quite large. If so, delete this log, restart apache and then check your disk usage again using the command:

    df

    This command will show you all your partitions and the disk spaced used/available for each. You should notice the /usr partition has more disk space available now.
    2.2 Domlogs

    Domlogs is a directory located at /usr/local/apache/domlogs which contains 2 logs for each domain located on your server. The logs are named using the following format:

    domain.com

    domain.com-bytes_log

    The first log contains all your hits, which is used to calculate the daily Webalizer and Analog stats in cpanel. The second log contains ever byte transferred from the account domain.com, and is used to calculate the HTTP bandwidth on a monthly basis.

    While we do not recommend you delete these logs too often since your stats and bandwidth stats may get slightly skewed, sometimes it is necessary to remove them in order to free up space on your /usr partition. To delete these logs use the command:

    rm –f /usr/local/apache/domlogs/*

    Then restart apache using:

    /etc/rc.d/init.d/httpd stop

    /etc/rc.d/init.d/httpd start

    These logs will be recreated from scratch by Apache.
    2.3 /var/log

    This directory contains important logs such as exim_mainlog, messages, and chkservd.log. While these logs are rotated regularly, archived logs are not deleted. You can safely delete any log that has a .1, .2, .3, or .4 extension, as these are the ‘old’ archived logs. You can remove these archived logs very easily using the command:

    rm –f /var/log/*.1

    rm –f /var/log/*.2

    rm –f /var/log/*.3

    rm –f /var/log/*.4

    This will delete any file in that directory which is an archived log and free up disk space on your /var partition.
    2.4 /var/spool/exim/input/ & /var/spool/exim/msglog/

    These files are generated by Exim (the mail server) from bounced emails, or emails waiting to be delivered and are in the message queue. If you notice your /var partition filling up and you have removed your archived logs from section 2.3, then you most likely have a lot of entries in these directories. You should verify the size of this directory to see if it is a problem:

    du -h /var/spool/exim/input

    du -h /var/spool/exim/msglog

    If any of these directories is very large chances are they are the culprit. Remove the contents using:

    rm –rf /var/spool/exim/input/*

    rm –rf /var/spool/exim/msglog/*

    You might not notice an immediate difference in ‘disk space used’ after deleting these logs, but after a few minutes your partition information should be updated which you can view using the command:

    df
    3 Rearranging/Moving Your Logs

    Sometimes your logs are just too big and fill up too fast for the current partition they are on. A simple solution to this is to move them to a different partition. For example, let’s say your /usr partition is over � and every time you delete your logs, within a few hours it is back at � again. The solution is simple and we will discuss how to do this.

    First thing you need to do is to move your logs. We recommend you shut down the service that uses this log along with the chkservd daemon which checks your services. In this example you would want to shutdown chkservd followed by Apache:

    /etc/rc.d/init.d/chkservd stop

    /etc/rc.d/init.d/httpd stop

    Then you would move the two directories to a different partition. Most people use their /home partition, but if you have a backup drive in your server you may want to use it. I prefer to use my backup drive (for logs, since I don't consider my logs to be critical data) as this takes some of the work off the main drive, so I would create a directory on my backup drive:

    mkdir /backup/usr/

    Then I would move the directories over:

    mv /usr/local/apache/domlogs /backup/usr/

    mv /usr/local/apache/logs /backup/usr/

    That will move the two major log directories from your /usr partition to your /backup partition. The last thing you need to do is create the symbolic links in the ‘old’ locations so that Apache can find where you have moved these logs.

    cd /usr/local/apache/

    ln –s /backup/usr/domlogs/ domlogs

    ln –s /backup/usr/logs/ logs

    This will create the links in the ‘old’ location to point to the ‘new’ location. The last thing to do is restart Apache and chkservd:

    /etc/rc.d/init.d/httpd start

    /etc/rc.d/init.d/chkservd start

    And that’s it! Your logs are now stored on your backup partition and will never hassle your /usr partition again.
    4 Conclusion

    Monitoring your logs is all part of owning a dedicated server and is essential to keeping your server running smoothly. If you are familiar with crontab and how to use it then I’m sure you can see how easy it would be to automate log maintenance.

    We recommend that you verify your logs daily to avoid any unusual events such as a partitions filling up. It’s also important to understand your logs and the wealth of information they can offer you. Chances are the answer to your questions when troubleshooting a problem can be found in your logs.

  7. تعداد تشکر ها ازMelatHOST به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. پاسخ ها: 27
    آخرين نوشته: July 1st, 2017, 01:01
  2. فروشتون تو تابستون بخصوص تو 10 روز اخیر کمتر شده ؟
    توسط persiantools در انجمن مباحث دیگر
    پاسخ ها: 19
    آخرين نوشته: July 24th, 2012, 01:46
  3. پاسخ ها: 27
    آخرين نوشته: December 19th, 2011, 23:13
  4. پاسخ ها: 10
    آخرين نوشته: April 15th, 2011, 23:25
  5. پاسخ ها: 1
    آخرين نوشته: May 17th, 2010, 12:47

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •