Recent changes Random page
GAMING
Technology
 
Gaming
Entertainment
Science Fiction
Biggest wikis
Hobbies
Music
See more...

Remote logging

From WiFi Wiki

Jump to: navigation, search

Contents

[edit] Enable remote logging on la Fonera Plus

This written is a partial answer to whom may say :"hey , now la fonera is open , what can I do with it ?"


The first thing that I thought was to anble remote logging.

Since I'm Fon beta tester , I think is correct to have logging facility in order to better understand what's going on on your router.

[edit] Ubuntu :Change the configuration file of your logging daemon

In Ubuntu linux you have to edit this file

sudo nano -w /etc/default/syslogd
SYSLOGD="-r"

Now our syslog is capable of receiving logs from remote hosts

We need restart syslog in order to apply new settings

sudo /etc/init.d/sysklogd restart


[edit] Windows: configuration for TFTPD32

Click on "settings" button to change parameter:

Section "TFTPD Configuration", change:

Local ports pool 514:514

Section "syslog server"
You can check option "Save syslog messages" and define a file name to save syslog in a file stored in TFTPD32 instalation directory

For real time displaying syslog events, go to tab "Syslog server" on TFTP32


[edit] Change the logging feature inside la fonera

ssh into la Fonera plus

ssh root@192.168.10.1
enter password :(default is ''admin'')
root@openwrt:~#

Now you have to edit the file in /etc/init.d/rcS. But in la Fonera plus there is no editor , so you cannot modify text files from within. The solution is brought by scp .

Open another console and type :

scp root@192.168.10.1:/etc/init.d/rcS rcS

And the file is transferred to you computer.

Edit the rcS file in this way :

nano -w rcS 
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org

${FAILSAFE:+exit}

# FIXME: add logging configuration
#[ -f /etc/config/network ] && . /etc/config/network
#eval $(ipcalc "$log_ipaddr")
#[ "$log_ipaddr" = "$IP" ] || log_ipaddr=""
'''(original string)syslogd -C16 #${log_ipaddr:+-L -R $log_ipaddr}'''
'''(NEW STRING)syslogd -R ipaddressofyourcomputer'''
klogd

(
        for i in /etc/rc.d/S*; do
                $i boot 2>&1
        done 

        sysctl -p >&-
) | logger -s -p 6 -t '' &

Now you have to reboot la fonera , you can switch off power unplugging or , as now finally you can do it , typing this command:

root@openwrt:~#reboot

[edit] Ubuntu: Checking logs on your computer

now all the fonera logs will be sent to your syslog machine . To better check which are related , you can do optionally this :

sudo nano -w /etc/hosts
xxx.xxx.xxx.xxx (address of la fonera)          fonera

Now enjoy your fonera full log.

 
sudo cat /var/log/messages | grep fonera | more
Oct 17 17:51:02 fonera : deleting routers 
Oct 17 17:51:02 fonera : adding router 192.168.1.254 
Oct 17 17:51:03 fonera : adding dns 192.168.1.254 
Oct 17 17:51:16 fonera : sh: Interface: not found 
Oct 17 17:51:21 fonera : RED: WARNING. Burst 2 seems to be to large. 
Oct 17 17:51:21 fonera : RED: WARNING. Burst 2 seems to be to large. 
Oct 17 17:51:44 fonera : sh: Interface: not found 
Oct 17 17:52:07 fonera : /bin/uci: /etc/config/fon: 41: get_serial: not found 
Oct 17 17:52:08 fonera : runlevel -> 1 
Oct 17 17:52:08 fonera : enqueued 
Oct 17 17:52:12 fonera : killall: watch_chilli: no process killed 
Oct 17 17:52:12 fonera : ERROR: chillispot is not running 
Oct 17 17:52:17 fonera : 36524 00119.229  171201.0     59.0  245951416895975.5  50628.7         0 
Oct 17 17:52:20 fonera : chillispot:/dev/null:1: malformed string in configuration file 
Oct 17 17:52:23 fonera : 25 22 * * * /bin/thinclient cron 
Oct 17 17:52:23 fonera : 53 8 * * * ntpclient -s -h ntp-1.cso.uiuc.edu 
Oct 17 17:52:23 fonera chillispot[4517]: tun.c: 664: 2 (No such file or directory) TX queue length set to 100
Oct 17 17:52:24 fonera chillispot[4517]: ChilliSpot 1.0-coova.4. Copyright 2002-2005 Mondru AB. Licensed under GPL. Copyright 2006 Coova
 Technologies Ltd. Licensed under GPL. See http://www.chillispot.org for credits.
Oct 17 17:52:24 fonera : fonsmcd successfully started 
Rate this article:
Share this article:
Wikia Spotlight
Related Communities