Linux file monitoring

Source: Internet
Author: User

Keywords: linux, monitoring


If you want to keep your server running at peak performance, you should set the Linux server's RunLevel runlevel to 3, which is the console mode, and use the STARTX command to start it when you need a graphical desktop. Modify configuration/etc/inittab to find Initdefault, change the ID: 5:initdefault to Id:3:initdefault.

System management issues that need to be checked regularly

    • Configuration Management
    • Backup
    • Test your backup
    • Log rotation
    • Resource monitoring
    • Process monitoring
    • Safety Reinforcement Hardening
    • Security updates
    • Log monitoring/security scan/Intrusion detection

Tools

The SAR program is the Swiss Army knife in the system monitoring tool.

Wireshark, Tcpdump analysis FTP transmission.

/usr/sbin/lsof See which files, directories, and sockets are open by a running process.

Lists files that have been opened in the system. In a Linux environment, everything is a file, a device is a file, a directory is a file, and even a sockets is a file.

Watch-d-N-tail/var/log/messages

Watch can help you monitor the results of a command and save it from running manually over and over again. Under Linux, watch is a periodic execution of a program and displays the results of the execution in full screen. can be used to monitor the results of all commands, such as tail a log file, LS monitors the size of a file change.

Instance

1. see who is using a file

Lsof/filepath/file

2. File information opened by a user

Lsof-u username

3. List all TCP network connection information

Lsof-i TCP


Reference

Linux Operations Trends-phase 1th


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux file monitoring

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.