March 12, 201016 yr Hi, i'm currently having odd issues where my server is no longer connectable. I can't ping it or anything. Unfortunately i don't have another screen to check the syslog and the server is tucked away. I'd like to know how can i make a change to move the syslog either on the usb or on my hard drive (it's an 8GB flash drive so i'm not worried about space). that way after a reboot, I can read the syslog to find out what might have cause the disconnection. In fact, i'd like the whole /var/log folder to be moved to my harddrive. Regards, Flixxx
March 12, 201016 yr I'd like to know how can i make a change to move the syslog either on the usb... Easy. Add the following lines to your 'go' script. mv -f /boot/syslog.current /boot/syslog.last 2>/dev/null cat /var/log/syslog > /boot/syslog.current echo "*.debug /boot/syslog.current" >> /etc/syslog.conf /etc/rc.d/rc.syslog restart Reboot your server. Now you have the syslogs on your flash key. it's an 8GB flash drive so i'm not worried about space It's not the disk size you should be worried about. It's the limited number of writes on a flash disk. So, a better idea would be to use a separate flash key for te syslogs, not your boot flash key which has your unRAID license key.
March 12, 201016 yr Author Thanks a lot Good point also, i'll move it to a hidden folder on my hard drive.
March 12, 201016 yr Thanks a lot Good point also, i'll move it to a hidden folder on my hard drive. When your server totally craps out for some reason, that particular disk may not be easily acessible to you. And that's exactly the time when you'll need the syslogs to figure out why the system crapped out. So you will be better just of buying a cheap $5 flash key and using that for logging purposes.
March 12, 201016 yr That's a really good idea, Purko, and one that has never occurred to me. Thanks! However, would it be easier to just back up your unRAID key (and shares, and anything else important) onto a separate computer?
March 13, 201016 yr That's a really good idea, Purko, and one that has never occurred to me. Thanks! However, would it be easier to just back up your unRAID key (and shares, and anything else important) onto a separate computer? That does not work if you have a license .key file ties to the ID of the flash drive. (not a bad idea to have a backup, but if you have more than 2 data disks you'll be out of luck until you can get a replacement .key file from lime-tech.
April 20, 201016 yr FWIW, I also add this line to my /etc/syslog.conf file. *.* -/dev/tty12 (use tabs not spaces). Then do kill -1 $(</var/run/syslogd.pid) tail /var/log/syslog you should see Apr 20 14:14:02 Tower syslogd 1.4.1: restart. If you switch to tty12 with ALT-F12 all syslog messages will be printed there. If the system freezes, the last syslog message should be on the screen. If it's a hardware freeze screen blanking may not turn the monitor back on. I think you can turn off screen blanking with. setterm -blank 0 -powersave off -powerdown 0
May 31, 201016 yr Author Hi everyone, i'm revisiting this because it's not working 100% for me. Ok so here's what's hapenning... about once every week or two my server goes down. it's just not accessible through the network at all and I am forced to hard reboot (Don't have a screen attached to the server). I decided to move the syslog and watch what was the last entry and post it here. Unfortunately everytime I restart, the "syslog.last" file shows logs up to a certain day and then it's like it stops. For example it shows from May 3rd till May 12th but the server goes down on May 17th. From what I remember before I made the changes, when my syslog would fill up it would create a syslog.1 file and then continue it on a new file... I'm thinking the same thing is happenning so I wonder how I can fix it. Edit: I think i captured some logs when my system went down, i'll open a new post about that, id' still like to get this working properly though
June 4, 201016 yr Seems like you should also set up the powerdown script that will let you cleanly shut down by pressing (not holding down) the power button.
June 4, 201016 yr Author Seems like you should also set up the powerdown script that will let you cleanly shut down by pressing (not holding down) the power button. Thanks for that, but i can't access the powerdown script when my server goes down. i can't remote into the machine and i have no screen attached to the terminal. Are you saying if i hold down the power buttom the syslog gets deleted?
June 4, 201016 yr Seems like you should also set up the powerdown script that will let you cleanly shut down by pressing (not holding down) the power button. Thanks for that, but i can't access the powerdown script when my server goes down. i can't remote into the machine and i have no screen attached to the terminal. That powerdown script he was talking about can be hooked to the power button, so that if the computer is not totally crashed, pressing the power button may still be able to power down the server "cleanly".
Archived
This topic is now archived and is closed to further replies.