Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Automate the "tail" command ????

Featured Replies

I've seen this:

 

Probably the easiest way to do this is open a telnet window and type:

 

tail  -f  /var/log/syslog

 

This will output the last few lines of the system log and then each time a new message is generated it will print in the telnet window.  Then if some kind of error is leading up to the crash you should be able to select/copy/paste & post it here.

 

Is there any way to automate this, i.e. automaticaly (on boot) login and execute this as in a batch file on a PC ?

I'm an old Solaris guy, but isn't there .login or .cshrc or similar?

 

 

Bill

  • 2 weeks later...
  • Author

I'd have to walk downstairs and log in....  :-\

 

Do you mean that after you open a  telnet session to your server and login, you want it to automatically exeucte that 'tail' command?

  • Author

Do you mean that after you open a  telnet session to your server and login, you want it to automatically exeucte that 'tail' command?

 

actually, I'd like it to execute unattended without logging on at all.... like autoexec.bat in DOS... ??

 

Do you mean that after you open a  telnet session to your server and login, you want it to automatically exeucte that 'tail' command?

 

actually, I'd like it to execute unattended without logging on at all.... like autoexec.bat in DOS... ??

 

 

I'm sure there is a way to do this via inittab

 

tail:345:respawn:/usr/bin/tail -f /var/log/messages > /dev/tty12

 

Perhaps even automating the vt switch.

 

tail:345:respawn:/usr/bin/switchto 12;exec /usr/bin/tail -f /var/log/messages > /dev/tty12

 

 

 

 

Find the entry in /etc/syslog.conf pointing to /var/log/messages. Copy the message reporting levels but change the device they point to, to tty1:

 

*.info;*.!warn;authpriv.none;cron.none;mail.none;news.none     -/dev/tty1

 

(make sure to seperate news.none and -/dev/tty1 with at least 1 TAB, not spaces)

 

save the file and restart the syslog daemon

pkill -HUP syslogd

 

Now all your messages will go to tty1, which is the default tty upon boot.  To scroll the messages, use [shift-page up] and [shift-page down].

Use [ctrl-shift-F2] to get to tty2, F3 for tty3, etc...  Back to F1 for the messages.

 

The other option, is to substitute -/dev/tty1 with @123.456.789 (ip address of a PC you keep on all the time). Install kiwi syslog daemon (free version) http://www.kiwisyslog.com/syslog-info.php as a service on the PC. The syslog facility on the OS will forward the messages to your PC. Kiwi will capture the messages for you to read.

  • Author

That's my Boy  ;D

 

Thanks!! 8)

 

great advise...  unfortunatly, when you reboot the unRaid server will replace your edited syslog.conf with its original one.

 

You might be able to copy the edited file to /boot

 

Then, add a line to the "go" script to copy it back to /etc/syslog.conf, followed by a second line to restart the syslog daemon

 

like this...

cp /boot/syslog.conf /etc/syslog.conf

pkill -HUP syslogd

Yes, what Joe says.

 

You can also have messages forwarded to another system on your network, for example a PC running a windows version of syslogd.

 

This works pretty well - I've been meaning to create a write-up on this... maybe someone would like to take a stab at it and post to the wiki?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.