Difference between revisions of "OpenWRT on Asus WL-500gP: Command and Path Reference"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m
m (system logs)
Line 27: Line 27:
 
== system logs ==
 
== system logs ==
  
 +
syslogd is started on startup. You can read it with 'logread'.
 +
 +
There are two options for where to send the logging output: (1) to a local file stored in RAM, (2) to a remote system. The local file option is very easy but because it is stored in RAM it will go away whenever the router reboots.
 +
 +
Enable remote logging:
 +
 +
nvram set log_ipaddr=<your syslogd ip>
 +
nvram commit
 +
 +
To run syslogd and klogd
 +
 +
vi /etc/inittab
 +
 +
add the following lines:
 +
 +
::respawn:/sbin/syslogd -n
 +
::respawn:/sbin/klogd -n
 +
 +
Tells syslogd to write the log file to /var/log/messages
 +
 +
/var is linked to /tmp but we may need to create /var/log at boot time
 +
 +
vi /etc/init.d/rcS
 +
 +
add the following line:
 +
 +
mkdir /var/log
  
  

Revision as of 07:01, 28 July 2007

console commands

COMMAND                                     DESCRIPTION
ipkg package manager (update list status install)
logread display entries from log files
nvram show display nvram values
nvram set wl0_radio=0; wifi turn radio off
nvram set wl0_radio=1; wifi turn radio on
logread view system log, all logs

perform basic tasks by command path reference

restart network

/etc/init.d/S40network restart

search for files or folders

find / -name $1 -print

system logs

syslogd is started on startup. You can read it with 'logread'.

There are two options for where to send the logging output: (1) to a local file stored in RAM, (2) to a remote system. The local file option is very easy but because it is stored in RAM it will go away whenever the router reboots.

Enable remote logging:

nvram set log_ipaddr=<your syslogd ip>
nvram commit

To run syslogd and klogd

vi /etc/inittab

add the following lines:

::respawn:/sbin/syslogd -n
::respawn:/sbin/klogd -n

Tells syslogd to write the log file to /var/log/messages

/var is linked to /tmp but we may need to create /var/log at boot time

vi /etc/init.d/rcS

add the following line:

mkdir /var/log