Hp unix Log File monitoring and file cleanup

Source: Internet
Author: User
Tags syslog

Common Unix log files:

File Name Content Monitoring Method

 

/Etc/rc. log/etc/rc running records read text files,
/Var/adm/syslog. Log note the prompt information and corresponding
Var/adm/SW/*. Log Software Installation Log date, analyze related problems.
/Var/adm/wtmp user logon information can be viewed using the last command
/Var/adm/btmp User Logon failure information can be viewed using the lastb command
/Var/SAM/log/samlog Sam log
/Var/spool/mqueue/syslog sendmail log
/Etc/shutdownlog shutdown Information
/Usr/ADM/diag/logxxx
/Var/adm/Nettl. log * network logs are handled by HP engineers
/Var/adm/crash core dump file is the responsibility of HP engineers

 

File cleanup:

1. Log File cleanup
Run the following command to clear the log file:

#> File name
Or
# Cat/dev/null> file name

Note: Make sure the file is useless before clearing the file.

2. Cleanup of other files

Core File
# Find/-name core-exec RM {}

Large file
Search
# Find/-Name (-size + n)-print
N = the file size is Bytes/512 bytes.

# Du-S *

Delete
# Rm file name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.