log personal message to /var/log/messages
To log personal messages to /var/log/messages when you write script, you can use logger simple example: logger i am testing And check the result with tail, it display last 10 line of messages by...
View ArticleI am watching you
To repeatly watching a certain file, such as log files, you can do that: watch tail /var/log/messages By default, this will be refresh every 2 seconds, and tail with list last 10 entries by default...
View Articlehead and tail
Given a list of text lines in a file, to display the first 10 lines: head foo.txt To display the last 10 lines: tail foo.txt Try -n option to specify the number of lines to display: tail -n3 foo.txt #...
View ArticleObtain some system statistics from vmstat
vmstat know as virtual memory statistics reporter, but it gives more information the just only virtual memory. Besides memory, it covers overall CPU usage, IO, Swap, Proc, System interupts and context...
View ArticleTop Ten Processes Watcher
top command provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. But if you want get...
View ArticleSyslog: Sending log from remote servers to syslog daemon
syslog is a standard for logging service in Linux, it usually run as daemon like syslogd or rsyslogd. Syslog daemon will be forward and store logs in /var/log directory, you may configure it to store...
View Article