Quantcast
Channel: Tailing log files in two different hosts - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 4 View Live

Answer by Kenster for Tailing log files in two different hosts

ssh HOST_1 "tail -f MY_LOG_FILE" > MY_NAMED_PIPE The tail program is going to buffer its output in blocks of 8 KB or so, because it's not writing to a TTY. If MY_LOG_FILE isn't very active, this may...

View Article



Answer by kitekat75 for Tailing log files in two different hosts

You can also use tee with the append option (-a) to merge contents. In terminal #1 ssh HOST_1 "tail -f /path/to/file" | tee -a /path/to/merged/contents In terminal #2 ssh HOST_2 "tail -f /path/to/file"...

View Article

Answer by Timothy Martin for Tailing log files in two different hosts

I just did the following: mkfifo MY_PIPE ssh HOST_1 "tail -f /var/log/messages" > MY_PIPE On the local machine I ran: tail -f /var/log/messages > MY_PIPE In another terminal on the local machine:...

View Article

Tailing log files in two different hosts

I'm trying to tail two log files in different hosts and use the merged output as a single one. ssh HOST_1 "tail -f MY_LOG_FILE" I'm also using mkfifo to create a named pipe. mkfifo MY_PIPE The problem...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images