44 Make A Log

V0.0.1

44.1 Histroy

  • 2014-12-19, rayoslee, release V0.0.1

44.2 FAQ

  1. How to use klogd and syslogd in S605 ?

    • Enable klodg and syslogd in busybox config file
      • ALL Enable System Logging Utilities
    • Only run the below command
      • klogd and syslogd -O mylogfile
  2. How to use script and scriptreplay in S605 ?

    • Enable script in busybox config file
      • Enable Linux System Utilities ---> script and Linux System Utilities ---> scriptreplay
    • Case1 - check:
      • script yourfilerecorder (Go recordering)
      • exit (you can vi yourfilerecorder to see messages from just typing on screen/console)
    • Case2 - check and replay :
      • script -t 2>log.time -a log.txt (generate two files log.time and log.txt)
      • exit
      • scriptreplay log.time log.txt (repeated your action just now)
  3. How to use sysctl in S605 ?

    • Enable sysctl in busybox config file
      • Enable Process Utilities ---> sysctl
    • Only run the below command
      • sysctl -w kernel.printk=“3 4 1 3” (you can stop flooding messages)
  4. You can add the below patch in S605 to make the log

    • This is spi booting profile, profile_spi
    mount -t jffs2 /dev/$mtdskyeyeblock /mnt/nand1-2
    mtdskyeye=`echo $mtdskyeye | sed "s/://"`
    mtdskyeyeblock=`echo $mtdskyeye | sed "s/mtd/mtdblock/"`
    mount -t jffs2 /dev/$mtdskyeyeblock /mnt/nand1-2
    
    +++#=============20141219, rayoslee====================
    +++date "2014-12-19 13:00"
    +++#sysctl -w kernel.printk="3 4 1 3"
    
    +++klogd
    +++mkdir /mnt/nand1-2/log -p
    +++index_X=`ls /mnt/nand1-2/log | wc -l`
    +++S605LOG="/mnt/nand1-2/log/S605-$index_X.log"
    +++if [ -e $S605LOG ];then
    +++  echo $S605LOG exists
    +++  #index_X=$[index_X + 1]
    +++  #index_X=`echo "$index_X+1" | bc`
    +++  index_X=`expr $index_X + 1`
    +++  S605LOG="/mnt/nand1-2/log/S605-$index_X.log"
    +++fi
    
    +++syslogd -O $S605LOG
    
    +++#./syslogtest_arm
    +++#===================================================
    
    if [ $? = 0 ]; then
    
      # Execute SKYEYE on nand1-2
      ln -s /mnt/nand1-2          /mnt/skyeye