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