Latest web development tutorials

Linux swatch command

Linux command Daquan Linux command Daquan

Linux swatch command for system monitoring program.

swatch used to monitor system log files, and when it finds a specific event, perform the specified action. Events and actions corresponding to the monitored event swatch swatch are stored in the configuration file. The default configuration file for the support .swatchrc root directory. However, in Red Hat Linux default user root directory and not .swatchrc profile, you can copy files to .swatchrc /usr/doc/swatch-2.2/config_files/swatchrc.personal user under the root directory, and then modify. swatchrc event to be monitored and enforcement action.

grammar

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

Parameter Description:

  • -A <Separator characters> Default configuration file, delimited character action, the default is a comma.
  • -c <settings file> Specify configuration file, instead of using the default configuration file.
  • -f <log file> Check the specified log file, after the inspection is completed will not continue to monitor this log file.
  • -I <Separator characters> specifies the input record separator character, by default a newline character.
  • -P <Separator characters> Specifies the configuration file, delimited character of the event, the default is a comma.
  • -r <time> restart at a specified time.
  • -t <log file> Check the specified log file and the log file will be added to monitor the subsequent record.

Examples

Open System Monitoring

# swatch

Linux command Daquan Linux command Daquan