Community discussions

MikroTik App
 
gcakici
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Feb 23, 2006 11:44 am

Writing logs to the internal hard drive

Mon Oct 01, 2007 10:42 pm

We should keep logs for many purposes but we need them for just archiving. It'll be good to use the internal hard drive (an extra one other than the os drive) as a log disk just like the web proxy package using that device for proxying. We can take them any time we like just a backup file over ftp.

Gokalp
 
User avatar
tgrand
Long time Member
Long time Member
Posts: 667
Joined: Mon Aug 21, 2006 2:57 am
Location: Winnipeg, Manitoba, Canada

Re: Writing logs to the internal hard drive

Tue Oct 02, 2007 5:27 am

If you do this the index gets larger and larger, and the performance of the router could be impacted if you view the log from the ROS.

Use a syslog server, it is optomized for this type of activity.
 
User avatar
jorj
Member
Member
Posts: 397
Joined: Mon Mar 12, 2007 4:34 pm
Location: /dev/null

Re: Writing logs to the internal hard drive

Wed Oct 03, 2007 3:26 pm

use DUDE.
 
gcakici
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Thu Feb 23, 2006 11:44 am

Re: Writing logs to the internal hard drive

Thu Oct 04, 2007 2:30 am

I don't want to use the logs in the routeros. I just want to write inside the device. With that, you won't be affected by any third party device failure and you can reach your archive any time to export out side.

We're already using syslog stuff but you need a second device other than routeros and you have to maintain it for availability.

Gokalp
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Writing logs to the internal hard drive

Thu Oct 04, 2007 1:06 pm

for now, only this is possible. limited to system drive:

[normis@demo2.mt.lv] > log print file=ssss
[normis@demo2.mt.lv] > file pri
 # NAME                   TYPE                  SIZE       CREATION-TIME
 0 console.rif            .rif file             416620     oct/02/2007 14:29:44
 1 supout.rif             .rif file             384316     sep/25/2007 22:31:57
 2 ssss.txt               .txt file             9327       oct/04/2007 13:06:59
 
year
just joined
Posts: 1
Joined: Tue Jan 26, 2010 7:35 am

Re: Writing logs to the internal hard drive

Tue Jan 26, 2010 7:37 am

Can an external one be used or is an internal hard drive preferred?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Writing logs to the internal hard drive

Tue Jan 26, 2010 9:07 am

it's changed now. you can now save it to any disk. just change the logging action "disk" to set the drive you want.
To log everything to file, add new log action:
/system logging action add name=file target=disk
disk-file-name=log
then make everything log using this new action:
/system logging action=file
you can log only errors there by issuing command:
/system logging topics=error action=file
This will log into files log.0.txt and log.1.txt. You can
specify maximum size of file in lines by specifying
disk-lines-per-file. <file>.0.txt is active file were new
logs are going to be appended and once it size will
reach maximum it will become <file>.1.txt, and new
empty <file>.0.txt will be created.
You can log into USB flashes or into MicroSD/CF (on
Routerboards) by specifying it’s directory name before
file name. For example, if you have accessable usb
flash as usb1 directory under /files, you should issue
following command:
/system logging action add name=usb target=disk
disk-file-name=usb1/log

Who is online

Users browsing this forum: ckonsultor, jollyrogr and 25 guests