ascii image


0010101000011111101001101010000010011000
1110101110110101011011111010010010001011
0001011100011101111001010011010010111110
0000010111101001100000110011101100001000
0011000000111010001111111000100110000001
1010110110000000000001011001000110001010
0101100010101100000100000010100100010101
0001011001011101100011000101110111101110
0110010100110100111101110100110011111101
0010111100110011010010110010101111011011
0100000000001001001011000010110100101001
1101000111100000110111011100110111000010
1111110001111111101101001010000111101100
0010110000100000111011000000101100010110
0101111000011100111010000000011111101111
0010010011110010011101001000110101000101
0000000001000100001111111100111010001111

Saturday, 27 September 2014

Stopping the network manager and applet from running in Ubuntu Cinnamon

Cinnamon 2.2.13
Ubuntu 14.04


# do not start network manager

echo manual > /etc/init/network-manager.override


# remove network manager applet from cinnamon dock panel

vi /usr/share/cinnamon-session/sessions/cinnamon.session

#RequiredComponents=cinnamon;cinnamon-settings-daemon;cinnamon-screensaver;nemo-autostart;nm-applet;
RequiredComponents=cinnamon;cinnamon-settings-daemon;cinnamon-screensaver;nemo-autostart;

# reboot

Thursday, 3 April 2014

Mapping ATA device numbers to hard drive device names on Ubuntu


A nice little one liner:

# ls -l /sys/block/sd* | sed 's/.*\(sd.*\) -.*\(host.*\)\/t.*/\2 => \1/'
host0 => sda
host1 => sdb
host6 => sdc
host7 => sdd
host8 => sde
host9 => sdf

therefore

host0 => ata0 => sda


Which is the same with this: 

The first number in the [] brackets shows the ata number


# lsscsi --long
[0:0:0:0]    disk    ATA      WDC WD40EZRX-00S 80.0  /dev/sda
  state=running queue_depth=31 scsi_level=6 type=0 device_blocked=0 timeout=30
[1:0:0:0]    disk    ATA      WDC WD40EZRX-00S 80.0  /dev/sdb
  state=running queue_depth=31 scsi_level=6 type=0 device_blocked=0 timeout=30
[6:0:0:0]    disk    ATA      WDC WD20EZRX-00D 80.0  /dev/sdc
  state=running queue_depth=1 scsi_level=6 type=0 device_blocked=0 timeout=30
[7:0:0:0]    disk    ATA      WDC WD20EZRX-00D 80.0  /dev/sdd
  state=running queue_depth=1 scsi_level=6 type=0 device_blocked=0 timeout=30
[8:0:0:0]    disk    ATA      SAMSUNG HD103UJ  1AA0  /dev/sde
  state=running queue_depth=1 scsi_level=6 type=0 device_blocked=0 timeout=30
[9:0:0:0]    disk    ATA      SAMSUNG HD103UJ  1AA0  /dev/sdf
  state=running queue_depth=1 scsi_level=6 type=0 device_blocked=0 timeout=30

Friday, 28 March 2014

more hidden Draytek commands

> sys version systeminfo
Router Model: Vigor2830n    Version: 3.6.4_sb_232201 English
Profile version: 3.0.0    Status: 1 (0x7ce1a234)
Router IP: 192.168.0.254    Netmask: 255.255.255.0
Firmware Build Date/Time: Mar 18 2013 12:47:45
Router Name: Vigor2830n
Revision: 34461 drayos2011
ADSL Firmware Version: 232201_A  Annex A

============== CPU usage ===============
CPU speed : 333 MHz
CPU1 speed: 333 MHz
DDR speed : 166 MHz
CPU usage :  0 %
========= Linear Memory usage ============
Dynamic memory usage : 56 % (17306K/31483K)
         Free memory : 13153K(13469168 bytes)
 DSP occupied memory : 1024K(1048576 bytes)
  Total memory usage : 79 % (51358K/64512K)
Idle task idle time : 0 sec



> sys version wdtdbg   
Router Model: Vigor2830n    Version: 3.6.4_sb_232201 English
Profile version: 3.0.0    Status: 1 (0x7ce1a234)
Router IP: 192.168.0.254    Netmask: 255.255.255.0
Firmware Build Date/Time: Mar 18 2013 12:47:45
Router Name: Vigor2830n
Revision: 34461 drayos2011
ADSL Firmware Version: 232201_A  Annex A

WDT debug flag is OFF.



> sys version osswdbg
Router Model: Vigor2830n    Version: 3.6.4_sb_232201 English
Profile version: 3.0.0    Status: 1 (0x7ce1a234)
Router IP: 192.168.0.254    Netmask: 255.255.255.0
Firmware Build Date/Time: Mar 18 2013 12:47:45
Router Name: Vigor2830n
Revision: 34461 drayos2011
ADSL Firmware Version: 232201_A  Annex A

OS content switch debug flag is OFF.


> sys version russia
Router Model: Vigor2830n    Version: 3.6.4_sb_232201 English
Profile version: 3.0.0    Status: 1 (0x7ce1a234)
Router IP: 192.168.0.254    Netmask: 255.255.255.0
Firmware Build Date/Time: Mar 18 2013 12:47:45
Router Name: Vigor2830n
Russia fw: No
Revision: 34461 drayos2011
ADSL Firmware Version: 232201_A  Annex A


> sys version ostaskinfo%^&*
Router Model: Vigor2830n    Version: 3.6.4_sb_232201 English
Profile version: 3.0.0    Status: 1 (0x7ce1a234)
Router IP: 192.168.0.254    Netmask: 255.255.255.0
Firmware Build Date/Time: Mar 18 2013 12:47:45
Router Name: Vigor2830n
Revision: 34461 drayos2011
ADSL Firmware Version: 232201_A  Annex A

-----OS Task Information (Internal debug only) -------------------
 P#=116,Sts=1,Dly=0024, SP=80981348 Name:(void(*)(void))if_task_wan
   Stack: top=80981440, btm=8097d844, size=15356
          now used=   248, now free= 15108(98%)
          max used=   248, min free= 15108(98%)
 P#=118,Sts=1,Dly=005e, SP=80988610 Name:(void(*)(void))httpd_main
   Stack: top=80988c58, btm=8098505c, size=15356
          now used=  1608, now free= 13748(89%)
          max used=  8276, min free=  7080(46%)
 P#=119,Sts=1,Dly=0120, SP=8098c184 Name:ap_task
   Stack: top=8098c864, btm=80988c68, size=15356
          now used=  1760, now free= 13596(88%)
          max used=  2580, min free= 12776(83%)
 P#=120,Sts=1,Dly=0007, SP=80990398 Name:(void(*)(void))if_task_bridge
   Stack: top=80990470, btm=8098c874, size=15356
          now used=   216, now free= 15140(98%)
          max used=   216, min free= 15140(98%)
 P#=121,Sts=0,Dly=000a, SP=80997ba8 Name:timer_task
   Stack: top=80997c88, btm=8099408c, size=15356
          now used=   224, now free= 15132(98%)
          max used=  2268, min free= 13088(85%)
 P#=122,Sts=1,Dly=0019, SP=809aa44c Name:relay_task
   Stack: top=809aa8c4, btm=809a6cc8, size=15356
          now used=  1144, now free= 14212(92%)
          max used=  1144, min free= 14212(92%)
 P#=123,Sts=1,Dly=03de, SP=809ade20 Name:RemoteCapiTask
   Stack: top=809ae4d0, btm=809aa8d4, size=15356
          now used=  1712, now free= 13644(88%)
          max used=  1712, min free= 13644(88%)
 P#=135,Sts=1,Dly=0000, SP=8099b6ec Name:CM_Task
   Stack: top=8099b894, btm=80997c98, size=15356
          now used=   424, now free= 14932(97%)
          max used=  3396, min free= 11960(77%)
 P#=136,Sts=1,Dly=0093, SP=8099edf8 Name:PPTP_Task
   Stack: top=8099f4a0, btm=8099b8a4, size=15356
          now used=  1704, now free= 13652(88%)
          max used=  2604, min free= 12752(83%)
 P#=137,Sts=1,Dly=000b, SP=809a2a04 Name:IPv6_Task
   Stack: top=809a30ac, btm=8099f4b0, size=15356
          now used=  1704, now free= 13652(88%)
          max used=  4268, min free= 11088(72%)
 P#=138,Sts=1,Dly=005b, SP=809a6828 Name:sstp_task
   Stack: top=809a6cb8, btm=809a30bc, size=15356
          now used=  1168, now free= 14188(92%)
          max used=  1168, min free= 14188(92%)
*P#=139,Sts=0,Dly=0000, SP=809b1604 Name:(void (*)(void))tnsfunc
   Stack: top=809b20dc, btm=809ae4e0, size=15356
          now used=  2776, now free= 12580(81%)
          max used=  3772, min free= 11584(75%)
*P#=140,Sts=0,Dly=0000, SP=80984f3c Name:DSL_DRV_AutobootThreadMain
   Stack: top=8098504c, btm=80981450, size=15356
          now used=   272, now free= 15084(98%)
          max used=  2840, min free= 12516(81%)
 P#=141,Sts=1,Dly=0024, SP=809b9344 Name:dhcp_daemon
   Stack: top=809b98f4, btm=809b5cf8, size=15356
          now used=  1456, now free= 13900(90%)
          max used=  1468, min free= 13888(90%)
 P#=142,Sts=1,Dly=0000, SP=809bcf00 Name:ike_daemon
   Stack: top=809bd500, btm=809b9904, size=15356
          now used=  1536, now free= 13820(89%)
          max used=  1536, min free= 13820(89%)
 P#=143,Sts=1,Dly=0008, SP=809c0e54 Name:ftpstart
   Stack: top=809c110c, btm=809bd510, size=15356
          now used=   696, now free= 14660(95%)
          max used=  1504, min free= 13852(90%)
 P#=144,Sts=1,Dly=0019, SP=809c4ae8 Name:telnetd_main
   Stack: top=809c4d18, btm=809c111c, size=15356
          now used=   560, now free= 14796(96%)
          max used=  1356, min free= 14000(91%)
 P#=145,Sts=1,Dly=0000, SP=809c8384 Name:sshd_main
   Stack: top=809c8924, btm=809c4d28, size=15356
          now used=  1440, now free= 13916(90%)
          max used=  1740, min free= 13616(88%)
 P#=146,Sts=1,Dly=0000, SP=809cc450 Name:gena_task
   Stack: top=809cc530, btm=809c8934, size=15356
          now used=   224, now free= 15132(98%)
          max used=   224, min free= 15132(98%)
 P#=147,Sts=1,Dly=0008, SP=809d005c Name:soap_task
   Stack: top=809d013c, btm=809cc540, size=15356
          now used=   224, now free= 15132(98%)
          max used=   224, min free= 15132(98%)
 P#=148,Sts=1,Dly=0024, SP=809d36a0 Name:RIP_Task
   Stack: top=809d3d48, btm=809d014c, size=15356
          now used=  1704, now free= 13652(88%)
          max used=  2388, min free= 12968(84%)
 P#=149,Sts=1,Dly=0000, SP=809d7834 Name:sntp_task
   Stack: top=809d7954, btm=809d3d58, size=15356
          now used=   288, now free= 15068(98%)
          max used=  3400, min free= 11956(77%)
 P#=150,Sts=1,Dly=005f, SP=809daea0 Name:LPD_Task
   Stack: top=809db560, btm=809d7964, size=15356
          now used=  1728, now free= 13628(88%)
          max used=  1728, min free= 13628(88%)
 P#=151,Sts=1,Dly=0000, SP=809df06c Name:usb_event_task
   Stack: top=809df16c, btm=809db570, size=15356
          now used=   256, now free= 15100(98%)
          max used=  1908, min free= 13448(87%)
 P#=152,Sts=1,Dly=0000, SP=809e2c78 Name:usb_stor_control_thread
   Stack: top=809e2d78, btm=809df17c, size=15356
          now used=   256, now free= 15100(98%)
          max used=   256, min free= 15100(98%)
 P#=153,Sts=1,Dly=011e, SP=809e688c Name:Common_Mail_Task
   Stack: top=809e6984, btm=809e2d88, size=15356
          now used=   248, now free= 15108(98%)
          max used=   248, min free= 15108(98%)
 P#=154,Sts=1,Dly=0022, SP=809e9f68 Name:snmpmain
   Stack: top=809ea590, btm=809e6994, size=15356
          now used=  1576, now free= 13780(89%)
          max used=  2240, min free= 13116(85%)
 P#=155,Sts=1,Dly=0008, SP=809ee0ac Name:lte_connection_thread
   Stack: top=809ee19c, btm=809ea5a0, size=15356
          now used=   240, now free= 15116(98%)
          max used=   240, min free= 15116(98%)
*P#=161,Sts=0,Dly=0000, SP=80993dd4 Name:(void(*)(void))if_task_lan
   Stack: top=8099407c, btm=80990480, size=15356
          now used=   680, now free= 14676(95%)
          max used=  3132, min free= 12224(79%)
 P#=162,Sts=0,Dly=0024, SP=818d6f74 Name:PMU_Task
   Stack: top=818d7048, btm=818d6048, size=4096
          now used=   212, now free=  3884(94%)
          max used=   244, min free=  3852(94%)
*P#=163,Sts=0,Dly=0000, SP=818d8aec Name:IdleTask
   Stack: top=818d9060, btm=818d7060, size=8192
          now used=  1396, now free=  6796(82%)
          max used=  1704, min free=  6488(79%)
Opened task no. = 31





> sys version osstackinfo%^&*
Router Model: Vigor2830n    Version: 3.6.4_sb_232201 English
Profile version: 3.0.0    Status: 1 (0x7ce1a234)
Router IP: 192.168.0.254    Netmask: 255.255.255.0
Firmware Build Date/Time: Mar 18 2013 12:47:45
Router Name: Vigor2830n
Revision: 34461 drayos2011
ADSL Firmware Version: 232201_A  Annex A

-----OS Task Stack Information (Internal debug only) : min free space ---
 P#=116: size= 15356, free= 15108(98%) > XXXXXXXXXX :(void(*)(void))if_task_wan
 P#=118: size= 15356, free=  7080(46%) > XXXXX      :(void(*)(void))httpd_main
 P#=119: size= 15356, free= 12776(83%) > XXXXXXXXX  :ap_task
 P#=120: size= 15356, free= 15140(98%) > XXXXXXXXXX :(void(*)(void))if_task_bridge
 P#=121: size= 15356, free= 13088(85%) > XXXXXXXXX  :timer_task
 P#=122: size= 15356, free= 14212(92%) > XXXXXXXXXX :relay_task
 P#=123: size= 15356, free= 13644(88%) > XXXXXXXXX  :RemoteCapiTask
 P#=135: size= 15356, free= 11960(77%) > XXXXXXXX   :CM_Task
 P#=136: size= 15356, free= 12752(83%) > XXXXXXXXX  :PPTP_Task
 P#=137: size= 15356, free= 11088(72%) > XXXXXXXX   :IPv6_Task
 P#=138: size= 15356, free= 14188(92%) > XXXXXXXXXX :sstp_task
 P#=139: size= 15356, free= 11584(75%) > XXXXXXXX   :(void (*)(void))tnsfunc
 P#=140: size= 15356, free= 12516(81%) > XXXXXXXXX  :DSL_DRV_AutobootThreadMain
 P#=141: size= 15356, free= 13888(90%) > XXXXXXXXXX :dhcp_daemon
 P#=142: size= 15356, free= 13820(89%) > XXXXXXXXX  :ike_daemon
 P#=143: size= 15356, free= 13852(90%) > XXXXXXXXXX :ftpstart
 P#=144: size= 15356, free= 14000(91%) > XXXXXXXXXX :telnetd_main
 P#=145: size= 15356, free= 13616(88%) > XXXXXXXXX  :sshd_main
 P#=146: size= 15356, free= 15132(98%) > XXXXXXXXXX :gena_task
 P#=147: size= 15356, free= 15132(98%) > XXXXXXXXXX :soap_task
 P#=148: size= 15356, free= 12968(84%) > XXXXXXXXX  :RIP_Task
 P#=149: size= 15356, free= 11956(77%) > XXXXXXXX   :sntp_task
 P#=150: size= 15356, free= 13628(88%) > XXXXXXXXX  :LPD_Task
 P#=151: size= 15356, free= 13448(87%) > XXXXXXXXX  :usb_event_task
 P#=152: size= 15356, free= 15100(98%) > XXXXXXXXXX :usb_stor_control_thread
 P#=153: size= 15356, free= 15108(98%) > XXXXXXXXXX :Common_Mail_Task
 P#=154: size= 15356, free= 13116(85%) > XXXXXXXXX  :snmpmain
 P#=155: size= 15356, free= 15116(98%) > XXXXXXXXXX :lte_connection_thread
 P#=161: size= 15356, free= 12224(79%) > XXXXXXXX   :(void(*)(void))if_task_lan
 P#=162: size=  4096, free=  3852(94%) > XXXXXXXXXX :PMU_Task
 P#=163: size=  8192, free=  6488(79%) > XXXXXXXX   :IdleTask
Opened task no. = 31




Vigor adsl status describe debug

> adsl status descdbg
  --------------------------- ATU-R Info (hw: annex A, f/w: annex A) -----------
 Dsl rx desc error count=0, ch=0
 last err desc[0]=00000000, desc[1]=00000000[00000000]


Another hidden command ?

Saturday, 22 February 2014

Lenovo z710 - double suspend issue on Ubuntu 13.10

My z710 when suspended after a lid close, would un-suspend when the lid opened and then after 5 secs re-suspend itself.

Fix for this was to turn off the logind.conf settings and allow acpid to do all the work

vi /etc/systemd/logind.conf


#ignore all and use acpid instead
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
PowerKeyIgnoreInhibited=no
SuspendKeyIgnoreInhibited=no
HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no

Lenovo z710 and Ubuntu 13.10 wifi auto connect fix

My z710 wasn't auto connecting the wifi at bootup.

rfkill list showed odd modules that were blocked but not shown loaded with lsmod.

root@nick-Lenovo-Z710:~# rfkill list
0: ideapad_wlan: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
1: ideapad_bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: ideapad_3g: Wireless WAN
    Soft blocked: no
    Hard blocked: no
3: phy0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
4: brcmwl-0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no


Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> rfkill0: found WiFi radio killswitch (at /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/PNP0C09:00/VPC2004:00/rfkill/rfkill0) (platform driver ideapad_acpi)
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> rfkill2: found WWAN radio killswitch (at /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/PNP0C09:00/VPC2004:00/rfkill/rfkill2) (platform driver ideapad_acpi)
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> rfkill3: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ieee80211/phy0/rfkill3) (driver wl)
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> rfkill4: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/eth1/rfkill4) (driver wl)
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> WiFi enabled by radio killswitch; disabled by state file
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> WWAN enabled by radio killswitch; enabled by state file
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> WiMAX enabled by radio killswitch; enabled by state file
Feb 22 20:24:25 nick-Lenovo-Z710 NetworkManager[942]: <info> WiFi now disabled by radio killswitch



The easiest fix was to unload and reload the 'wl' module

rmmod wl
modprobe wl

so i put this into /etc/rc.local, rebooted.

Wifi auto connect worked as soon as i logged in.


Friday, 17 January 2014

Displaying HEC FEC errors on a Draytek Vigor 2830n router

Displaying HEC FEC errors on a Draytek Vigor 2830n router


> adsl status more
  --------------------------- ATU-R Info (hw: annex A, f/w: annex A) -----------
                  Near End        Far End
 LatencyPath  :      2               2
 LoS          :      0               0
 LoF          :      0               0
 LPR          :      0               0
 RFI          :      0               0
 Ncd          :      0               0
 Lcd          :      0               0
 FECS         :    162               0
 ES           :      1               0
 LOSS         :      0               0
 UAS          :      0               0
 HECError     :      7               0
 CRC          :      1               0
 RsCorrection :   3671               0
 INP          :      0               0
 InterleaveDelay :    800             800
>   


Found this by uncompressing the firmware and running 'strings' over it.
Couldn't find it in the Draytek telnet command reference guide.