jimwhite Posted May 14, 2007 Share Posted May 14, 2007 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 ? Quote Link to comment
Billped Posted May 14, 2007 Share Posted May 14, 2007 I'm an old Solaris guy, but isn't there .login or .cshrc or similar? Bill Quote Link to comment
jimwhite Posted May 24, 2007 Author Share Posted May 24, 2007 I'd have to walk downstairs and log in.... Quote Link to comment
limetech Posted May 25, 2007 Share Posted May 25, 2007 Do you mean that after you open a telnet session to your server and login, you want it to automatically exeucte that 'tail' command? Quote Link to comment
jimwhite Posted May 29, 2007 Author Share Posted May 29, 2007 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... ?? Quote Link to comment
WeeboTech Posted May 29, 2007 Share Posted May 29, 2007 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 Quote Link to comment
matthewwhite Posted June 2, 2007 Share Posted June 2, 2007 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. Quote Link to comment
jimwhite Posted June 3, 2007 Author Share Posted June 3, 2007 That's my Boy Thanks!! Quote Link to comment
Joe L. Posted June 3, 2007 Share Posted June 3, 2007 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 Quote Link to comment
limetech Posted June 8, 2007 Share Posted June 8, 2007 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? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.