Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux swatch Command

Linux swatch Command

Linux Command Reference Linux Command Reference

The Linux swatch command is used for system monitoring.

swatch can be used to monitor system log files and execute specified actions when particular events are detected. The events monitored by swatch and their corresponding actions are stored in swatch's configuration file. The default configuration file is .swatchrc in the user's home directory. However, in Red Hat Linux there is no .swatchrc configuration file in the default user home directory. You can copy the /usr/doc/swatch-2.2/config_files/swatchrc.personal file to .swatchrc in your home directory, then modify .swatchrc to specify the events to monitor and the actions to execute.

Syntax

swatch [-A <分隔字符>][-c <设置文件>][-f <记录文件>][-I <分隔字符>][-P <分隔字符>][-r <时间>][-t <记录文件>]

Parameter Description:

Example

Enable system monitoring

# swatch

Linux Command Reference Linux Command Reference