Page MenuHomeVyOS Platform

"show log tail" only displays last logentries, should it "follow"?
Closed, WontfixPublicBUG

Description

vyos@vyos:~$ show log tail
Oct  8 19:17:01 LR1 CRON[3804]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  8 19:17:01 LR1 CRON[3805]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct  8 19:17:01 LR1 CRON[3804]: (CRON) info (No MTA installed, discarding output)
Oct  8 19:17:01 LR1 CRON[3804]: pam_unix(cron:session): session closed for user root
Oct  8 20:17:01 LR1 CRON[3905]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  8 20:17:01 LR1 CRON[3906]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct  8 20:17:01 LR1 CRON[3905]: (CRON) info (No MTA installed, discarding output)
Oct  8 20:17:01 LR1 CRON[3905]: pam_unix(cron:session): session closed for user root
Oct  8 20:39:24 LR1 sshd[3942]: Accepted publickey for cpo from 172.16.30.111 port 50690 ssh2: RSA 6a:50:46:6d:45:96:ea:94:f6:f5:6c:25:fb:fd:29:bd
Oct  8 20:39:24 LR1 sshd[3942]: pam_unix(sshd:session): session opened for user cpo by (uid=0)
vyos@vyos:~$

On EdgeOS the command "follows" the logfile, meaning output appended data as the file grows (tail -f style).

I like this implementation so I can simply open up a second SSH session to my router and see the logfile online with show log tail

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rc1
Why the issue appeared?
Will be filled on close

Event Timeline

syncer triaged this task as Normal priority.Oct 9 2018, 6:45 AM
syncer edited projects, added VyOS 1.2 Crux (VyOS 1.2.0-rc2); removed VyOS 1.2 Crux.
dmbaturin claimed this task.
dmbaturin added a subscriber: dmbaturin.

@c-po The difference is due to EdgeOS being forked from an earlier Vyatta Core version, and never picking up the post-6.4 op mode improvements.
One of the ideas was to put all commands with potentially infinite output in the "monitor" subtree. So the command that follows the log file is "run monitor log".

The output of all "show" commands is guaranteed to be finite, so it's safe for scripts and, potentially, a GUI.