Results 1 to 3 of 3

Thread: HOW TO: Manually add custom messages to the syslog

  1. #1

    HOW TO: Manually add custom messages to the syslog

    Thanks to the help from snowbat from boards.ie, he answered my question about adding custom messages to the syslog.

    1. Have the custom firmware setup from kfurge.
    2. Setup custom firmware to at least step 3.8.
    3. Ensure the paths are setup ie:

    Code:
    export PATH=/opt/bin:${PATH}
    export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
    4. To add messages to the syslog.....

    Code:
    echo "Hello world" | logger -p local0.notice
    Check your the log by either "logread" or the routers webpage, and your message should be there!

    CAVEAT: I've only just discovered this (havn't tested this in rc.local yet!) and I hope the more experienced linux guys can explain better about how to use this feature.

    Thanks,
    LK.

  2. #2
    I can confirm that this will work in rc.local as well.

    E.g.

    Code:
    #!/bin/sh
    
    pool=`nvram get apps_pool`
    share=`nvram get apps_share`
    internal_hdd=/dev/ide/host2/bus0/target0/lun0/disc
    
    if [ \! -f /tmp/rc.local.done ]; then
    
    # Indicate we've already done this
    touch /tmp/rc.local.done
    
    #
    # Mount /opt and connect in various system files
    #
    if [ -e /shares/${pool}/opt ]; then
     mount -o bind /shares/${pool}/opt /opt
     
     cat /proc/mounts > /opt/etc/fstab
     
     ln -s /opt/etc/shells /tmp/shells
     ln -s /opt/etc/fstab /tmp/fstab
     
     export PATH=/opt/bin:/opt/sbin:${PATH}
     export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
    fi
    
    # Start utelnetd on local interface only!
    /apps/bin/utelnetd -i br0 &
    
    # Sleep for a little bit to not interfere with normal system startup
    # before we kill a bunch of Asus processes.
    sleep 5
    
    # The killing of watchdog is necessary
    # to allow the disk to spin down (watchdog is a horribly written hack
    # anyway!)
    killall -q -9 watchdog
    
    # Do the necessary steps so the internal HDD will spin down
    mount -o remount,noatime,nodiratime /shares/${pool}
    hdparm -S 180 ${internal_hdd}
    smartctl -dT ${internal_hdd}
    
    # Add confirmation that rc.local was executed
    echo "rc.local executed" | logger -p local0.notice
    
    fi

  3. #3

    WL-700gE No Incoming and Outgoing Logs?

    How can this WL-700gE router not show incoming and outgoing packets?

    Isn't that just a basic feature, it is in my old Linksys that I got 10 years ago, without logs is like buying a car without a gas gauge.

Similar Threads

  1. И снова про мультикаст...
    By Sabur in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 477
    Last Post: 17-05-2010, 06:57
  2. Help needed adding my own messages to syslog
    By kantjer in forum WL-500gP Tutorials
    Replies: 4
    Last Post: 24-06-2008, 23:30
  3. How to automatically start post-boot?
    By VaZso in forum WL-500g Q&A
    Replies: 8
    Last Post: 04-07-2006, 12:48
  4. complete changelog up to 1.8.2.1
    By Antiloop in forum WL-500g Firmware Releases
    Replies: 0
    Last Post: 27-10-2004, 10:27

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •