Linux/Ubuntu2016. 11. 14. 19:26

정리 잘 된 블로그 있어서 링크


[링크 : http://logon.tistory.com/391]


grub update

$ sudo vi /etc/default/grub

$ sudo update-grub


avahi disable

$ sudo /etc/default/avahi-daemon



'Linux > Ubuntu' 카테고리의 다른 글

crontab 과 cron 서비스 reload  (0) 2017.01.04
우분투에서 lamp / apm 설치 간편하게..  (0) 2016.12.29
fcitx-hangul  (0) 2016.11.14
xwindow 가상 터미널 비활성화 하기  (2) 2016.10.11
linux console disable on runtime  (0) 2016.10.11
Posted by 구차니
Linux/Ubuntu2016. 11. 14. 19:23

ibus는 한불 간건가?


[링크 : http://geekcoders.tistory.com/entry/Ubuntu-1604-fcitx-한글-설정]

[링크 : http://packages.ubuntu.com/trusty/utils/fcitx-hangul]


+

odroid u3 16.04에서 ibus 대신에 fcitx 하는데  빠르게 입력하고 공백을 넣어도 문제없이 잘 입력된다.

나중에 문제되면 nimf로 갈아타봐야지 일단은 귀찮...


여기서는 fcitx도 문제가 있으니 nimf로 하라고 하네..

[링크 : http://logon.tistory.com/391]

'Linux > Ubuntu' 카테고리의 다른 글

우분투에서 lamp / apm 설치 간편하게..  (0) 2016.12.29
ubuntu 16.04 설정관련  (0) 2016.11.14
xwindow 가상 터미널 비활성화 하기  (2) 2016.10.11
linux console disable on runtime  (0) 2016.10.11
linux cpu hotplug  (0) 2016.10.11
Posted by 구차니
Linux/Ubuntu2016. 10. 11. 18:54

없으면 허전한 녀석이라 꺼볼일은 없을 듯?


$ sudo vi /etc/X11/xorg.conf

Section "ServerFlags"

    Option "DontVTSwitch" "true"

EndSection 



[링크 : http://askubuntu.com/questions/357039/how-do-i-disable-virtual-consoles-tty1-6]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu 16.04 설정관련  (0) 2016.11.14
fcitx-hangul  (0) 2016.11.14
linux console disable on runtime  (0) 2016.10.11
linux cpu hotplug  (0) 2016.10.11
ubuntu php4 설치  (0) 2016.10.06
Posted by 구차니
Linux/Ubuntu2016. 10. 11. 18:47

런타임으로 콘솔을 끄는건 메시지만 출력하지 않는 것 같고..

kernel argument로 주어진 포트를 close 하는 건 다시 찾아 봐야 할 듯..


---

이건 딱히 다른 티가 안나고..

uart로 콘솔 연결해 보기 전에는 모르겠네...


$ sudo dmesg -n 1

[링크 : http://askubuntu.com...how-do-i-disable-messages-or-logging-from-printing-on-the-console-virtual-termin]


얘는 에러가 나네...

$ sudo sysctl disable serial-getty@ttySAC1.service

sysctl: cannot stat /proc/sys/disable: No such file or directory

sysctl: cannot stat /proc/sys/serial-getty@ttySAC1/service: No such file or directory


$ ll /proc/sys

total 0

dr-xr-xr-x   1 root root 0 ene  1  2000 ./

dr-xr-xr-x 150 root root 0 ene  1  1970 ../

dr-xr-xr-x   1 root root 0 oct 12 00:57 debug/

dr-xr-xr-x   1 root root 0 oct 12 00:57 dev/

dr-xr-xr-x   1 root root 0 ene  1  2000 fs/

dr-xr-xr-x   1 root root 0 ene  1  2000 kernel/

dr-xr-xr-x   1 root root 0 ene  1  2000 net/

dr-xr-xr-x   1 root root 0 ene  1  2000 vm/ 


# systemctl disable serial-getty@ttyS0.service

[링크 : http://developer.toradex.com/knowledge-base/how-to-disable-enable-debug-messages-in-linux]


$ sudo vi /etc/sysctl.conf

kernel.printk = 0 4 1 7 

[링크 : https://wiki.openwrt.org/doc/recipes/terminate.console.on.serial]


# sysctl -w kernel.printk="2 4 1 7"

kernel.printk = 2 4 1 7

# sysctl kernel.printk

kernel.printk = 2       4       1       7


$ sysctl kernel.printk

kernel.printk = 1       4       1       7 

[링크 : http://superuser.com/questions/351387/how-to-stop-kernel-messages-from-flooding-my-console]


inittab이나 grub 로더를 통해서 하는건데odroid에는 inittab이 존재하지 않는다.

[링크 : https://help.ubuntu.com/community/SerialConsoleHowto]


[링크 : https://linux.die.net/man/8/change_console]

'Linux > Ubuntu' 카테고리의 다른 글

fcitx-hangul  (0) 2016.11.14
xwindow 가상 터미널 비활성화 하기  (2) 2016.10.11
linux cpu hotplug  (0) 2016.10.11
ubuntu php4 설치  (0) 2016.10.06
ubuntu apt를 통해 자동 업데이트 되지 않도록 하기  (0) 2016.10.05
Posted by 구차니
Linux/Ubuntu2016. 10. 11. 18:31

cpu를 끄는 법이긴 한데..

odroid 에서는 먹긴하네

나중에 전원소비량 차이도 생기는지 재봐야지


$ lscpu

Architecture:          armv7l

Byte Order:            Little Endian

CPU(s):                4

On-line CPU(s) list:   0-3

Thread(s) per core:    1

Core(s) per socket:    4

Socket(s):             1 


$ su

# echo 0 > /sys/devices/system/cpu/cpu3/online

# lscpu

Architecture:          armv7l

Byte Order:            Little Endian

CPU(s):                4

On-line CPU(s) list:   0-2

Off-line CPU(s) list:  3

Thread(s) per core:    1

Core(s) per socket:    3

Socket(s):             1 


확실히 꺼질때랑 켜질때랑 파일들도 달라지고

켜져있는데 다시 켜라면 에러가 발생한다.

root@odroid_2:/sys/devices/system/cpu/cpu1# ll

total 0

drwxr-xr-x  5 root root    0 ene  1  2000 ./

drwxr-xr-x 10 root root    0 ene  1  2000 ../

lrwxrwxrwx  1 root root    0 oct 12 00:50 cpufreq -> ../cpu0/cpufreq/

drwxr-xr-x  4 root root    0 oct 12 00:50 cpuidle/

-rw-r--r--  1 root root 4096 ene  1  2000 online

drwxr-xr-x  2 root root    0 oct 12 00:50 power/

lrwxrwxrwx  1 root root    0 oct 12 00:50 subsystem -> ../../../../bus/cpu/

drwxr-xr-x  2 root root    0 oct 12 00:45 topology/

-rw-r--r--  1 root root 4096 ene  1  2000 uevent


root@odroid_2:/sys/devices/system/cpu/cpu1# echo 1 > online

bash: echo: write error: Invalid argument


root@odroid_2:/sys/devices/system/cpu/cpu1# echo 0 > online


root@odroid_2:/sys/devices/system/cpu/cpu1# ll

total 0

drwxr-xr-x  4 root root    0 ene  1  2000 ./

drwxr-xr-x 10 root root    0 ene  1  2000 ../

drwxr-xr-x  4 root root    0 oct 12 00:50 cpuidle/

-rw-r--r--  1 root root 4096 oct 12 00:50 online

drwxr-xr-x  2 root root    0 oct 12 00:50 power/

lrwxrwxrwx  1 root root    0 oct 12 00:50 subsystem -> ../../../../bus/cpu/

-rw-r--r--  1 root root 4096 ene  1  2000 uevent 


root@odroid_2:/sys/devices/system/cpu/cpu1# echo 0 > online

bash: echo: write error: Invalid argument


$ dmesg | tail

[  151.618760] CPU3: shutdown

[  307.728391] CPU3: Booted secondary processor

[  357.968383] CPU1: shutdown

[  443.399593] CPU1: Booted secondary processor 


[링크 : http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/]


+

2016.10.14

전력 측정하면서 cpu 를 하나씩 꺼보는데

2.06W 에서 2.08W로 오차범위 내에 오락가락 하는것 외에는 차이가 없다.

그냥 단순하게 스케쥴러에서 뺴버리는 그런 건가? 전원 관리를 통해 차단은 하지 않고?

Posted by 구차니
Linux/Ubuntu2016. 10. 6. 10:32

글 자체는 2014년 글이라 14.04 LTS로 추정되지만..

해봐야 하는데.. 집에 서버를 켜야 하는데 공유기 원격접속이 꺼졌네.. 망할 U+


sudo apt-get install apache2

sudo apt-get install php4

sudo apt-get install libapache2-mod-php4

sudo /etc/init.d/apache2 restart 


[링크 : http://ubtutorials.com/tutorial/908/installing-php4-and-apache-ubuntu]


12.04 LTS에서 해보니 php4는 없다 -_-!!!

Posted by 구차니
Linux/Ubuntu2016. 10. 5. 20:49

odroid 쓰다 보니 커널이 자동 업데이트 되면서 정상작동하지 않아

특정 패키지(그러니까.. 커널?)를 업데이트 되지 않도록 할 필요가 있다.


These lines are irrelevant to kernel upgrades. And also that is not good to comment them. You will not be able to install some packages if you do it.


You can freeze any package including kernel packages by


sudo apt-mark hold <package_name>

for example


sudo apt-mark hold linux-image-generic linux-headers-generic

But you need to check which kernel meta-package is installed for LTS versions. It may be linux-generic-lts-utopic, etc. 

[링크 : http://askubuntu.com/questions/678630/how-can-i-avoid-kernel-updates]

+ 2016.11.14

Hold a package:

sudo apt-mark hold package_name


Remove the hold:

sudo apt-mark unhold package_name 


[링크 : http://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package]


어.. 설치가 안되어 있는데 왜 엉긴거지?

$ apt-cache search linux-image-generic

linux-image-generic - Generic Linux kernel image

linux-image-generic-lts-raring - Generic Linux kernel image

linux-image-generic-lts-saucy - Generic Linux kernel image

linux-image-generic-lts-trusty - Generic Linux kernel image

linux-image-generic-lpae - Generic Linux kernel image

linux-image-generic-lpae-lts-saucy - Generic Linux kernel image

linux-image-generic-lpae-lts-trusty - Generic Linux kernel image

linux-image-highbank - Linux kernel image for the armhf architecture.

linux-image-omap - Linux kernel image for the armhf architecture.

linux-image-generic-lts-utopic - Generic Linux kernel image

linux-image-generic-lts-vivid - Generic Linux kernel image

linux-image-generic-lts-wily - Generic Linux kernel image

linux-image-generic-lts-xenial - Generic Linux kernel image

linux-image-generic-lpae-lts-utopic - Generic Linux kernel image

linux-image-generic-lpae-lts-vivid - Generic Linux kernel image

linux-image-generic-lpae-lts-wily - Generic Linux kernel image

linux-image-generic-lpae-lts-xenial - Generic Linux kernel image 


'Linux > Ubuntu' 카테고리의 다른 글

linux cpu hotplug  (0) 2016.10.11
ubuntu php4 설치  (0) 2016.10.06
dhcp 받아오기 실패시 static ip로 설정하기 (timeout 시)  (0) 2016.10.05
proprietary driver on lubuntu  (0) 2016.09.09
gnome-disks 벤치마크  (0) 2016.09.05
Posted by 구차니
Linux/Ubuntu2016. 10. 5. 18:18

dhclient.conf에서 lease를 이용하면 된다고 한다.


timeout 10;

lease {

interface "eth0";

fixed-address 10.0.0.10;

option subnet-mask 255.255.255.0;

renew 2 2022/1/1 00:00:01;

rebind 2 2022/1/1 00:00:01;

expire 2 2022/1/1 0:00:01;


or you can assign a second IP to the interface like /etc/network/interfaces


auto lo

iface lo inet loopback

iface eth0 inet dhcp


auto eth0:1

iface eth0:1 inet static

address 10.10.10.2

netmask 255.255.255.0

[링크 : http://stackoverflow.com/questions/12727175/set-static-ip-if-not-obtained-from-dhcp-script]


The timeout statement


timeout time ;


The timeout statement determines the amount of time that must pass between the time that the client begins to try to determine its address and the time that it decides that it's not going to be able to contact a server. By default, this timeout is sixty seconds. After the timeout has passed, if there are any static leases defined in the configuration file, or any leases remaining in the lease database that have not yet expired, the client will loop through these leases attempting to validate them, and if it finds one that appears to be valid, it will use that lease's address. If there are no valid static leases or unexpired leases in the lease database, the client will restart the protocol after the defined retry interval.Lease Declarations



The lease declaration


lease { lease-declaration [ ... lease-declaration ] }


The DHCP client may decide after some period of time (see PROTOCOL TIMING) that it is not going to succeed in contacting a server. At that time, it consults its own database of old leases and tests each one that has not yet timed out by pinging the listed router for that lease to see if that lease could work. It is possible to define one or more fixed leases in the client configuration file for networks where there is no DHCP or BOOTP service, so that the client can still automatically configure its address. This is done with the lease statement.


NOTE: the lease statement is also used in the dhclient.leases file in order to record leases that have been received from DHCP servers. Some of the syntax for leases as described below is only needed in the dhclient.leases file. Such syntax is documented here for completeness.


A lease statement consists of the lease keyword, followed by a left curly brace, followed by one or more lease declaration statements, followed by a right curly brace. The following lease declarations are possible:

[링크 : https://linux.die.net/man/5/dhclient.conf]


odroid 설정파일

$ vi /etc/dhcp/dhclient.conf

# Configuration file for /sbin/dhclient, which is included in Debian's

#       dhcp3-client package.

#

# This is a sample configuration file for dhclient. See dhclient.conf's

#       man page for more information about the syntax of this file

#       and a more comprehensive list of the parameters understood by

#       dhclient.

#

# Normally, if the DHCP server provides reasonable information and does

#       not leave anything out (like the domain name, for example), then

#       few changes must be made to this file, if any.

#


option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;


#send host-name "andare.fugue.com";

send host-name = gethostname();

#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;

#send dhcp-lease-time 3600;

#supersede domain-name "fugue.com home.vix.com";

#prepend domain-name-servers 127.0.0.1;

request subnet-mask, broadcast-address, time-offset, routers,

        domain-name, domain-name-servers, domain-search, host-name,

        dhcp6.name-servers, dhcp6.domain-search,

        netbios-name-servers, netbios-scope, interface-mtu,

        rfc3442-classless-static-routes, ntp-servers,

        dhcp6.fqdn, dhcp6.sntp-servers;

#require subnet-mask, domain-name-servers;

#timeout 60;

#retry 60;

#reboot 10;

#select-timeout 5;

#initial-interval 2;

#script "/etc/dhcp3/dhclient-script";

#media "-link0 -link1 -link2", "link0 link1";

#reject 192.33.137.209;


#alias {

#  interface "eth0";

#  fixed-address 192.5.5.213;

#  option subnet-mask 255.255.255.255;

#}


#lease {

#  interface "eth0";

#  fixed-address 192.33.137.200;

#  medium "link0 link1";

#  option host-name "andare.swiftmedia.com";

#  option subnet-mask 255.255.255.0;

#  option broadcast-address 192.33.137.255;

#  option routers 192.33.137.250;

#  option domain-name-servers 127.0.0.1;

#  renew 2 2000/1/12 00:00:01;

#  rebind 2 2000/1/12 00:00:01;

#  expire 2 2000/1/12 00:00:01;

#} 


어? odroid에 해봤는데 안되네.. 머지??!?!

아무튼.. dhcp는 link가 탐지되어야 하니 최소한 랜은 꽂혀서 hub에 연결은 되어야 dhcp client가 가동된다.


+

$ sudo vi /etc/dhcp/dhclient-enter-hooks.d/debug

RUN="yes"

                                echo "$var='${!var}'" >> /tmp/dhclient-script.debug 


[링크 : https://lists.debian.org/debian-user/2010/10/msg00375.html]

위의 내용을 바꾸면 /tmp/dhclient-script.debug 에 로그가 쌓이는데


Wed Oct 5 21:23:43 KST 2016: entering /sbin, dumping variables.

reason='PREINIT'

interface='eth0'

--------------------------

Wed Oct 5 21:23:54 KST 2016: entering /sbin, dumping variables.

reason='FAIL'

interface='eth0'

--------------------------

Wed Oct 5 21:24:10 KST 2016: entering /sbin, dumping variables.

reason='PREINIT'

interface='eth0'

--------------------------

Wed Oct 5 21:24:11 KST 2016: entering /sbin, dumping variables.

reason='TIMEOUT'

interface='eth0'

new_ip_address='192.168.219.130'

new_network_number='192.168.219.0'

new_subnet_mask='255.255.255.0'

new_broadcast_address='192.168.219.255'

new_routers='192.168.219.1'

new_domain_name_servers='1.214.68.2 61.41.153.2'

--------------------------

Wed Oct 5 21:24:14 KST 2016: entering /sbin, dumping variables.

reason='FAIL'

interface='eth0'

--------------------------

Wed Oct 5 21:27:14 KST 2016: entering /sbin, dumping variables.

reason='FAIL'

interface='eth0'

--------------------------

Wed Oct 5 21:27:40 KST 2016: entering /sbin, dumping variables.

reason='PREINIT'

interface='eth0'

--------------------------

Wed Oct 5 21:27:41 KST 2016: entering /sbin, dumping variables.

reason='BOUND'

interface='eth0'

new_ip_address='192.168.219.130'

new_network_number='192.168.219.0'

new_subnet_mask='255.255.255.0'

new_broadcast_address='192.168.219.255'

new_routers='192.168.219.1'

new_domain_name_servers='1.214.68.2 61.41.153.2'

old_ip_address='192.168.219.130'

old_network_number='192.168.219.0'

old_subnet_mask='255.255.255.0'

old_broadcast_address='192.168.219.255'

old_routers='192.168.219.1'

old_domain_name_servers='1.214.68.2 61.41.153.2'

-------------------------- 


운 좋게(?) timeout 한번나서 설정되었지만.. 내가 의도한 녀석은 아니고..

정상적으로 dhcp를 통해 받아와서야 BOUND로 표기되었다...

lease는 그냥 timeout 인건가.. 아니면 timeout을 길게줘야하나?



내용에 의하면.. 내가 원하는... DHCP 값을 못 받아 올 경우

기본 값으로 설정하는 용도로는 맞지 않다는 거군....

Expire

The DHCP client has failed to renew its lease or acquire a new one, and the lease has expired. The IP address must be relinquished, and all related parameters should be deleted, as in RENEW and REBIND.


Fail

The DHCP client has been unable to contact any DHCP servers, and any leases that have been tested have not proved to be valid. The parameters from the last lease tested should be deconfigured. This can be handled in the same way as EXPIRE.


Timeout

The DHCP client has been unable to contact any DHCP servers. However, an old lease has been identified, and its parameters have been passed in as with BOUND. The client configuration script should test these parameters and, if it has reason to believe they are valid, should exit with a value of zero. If not, it should exit with a nonzero value.

The usual way to test a lease is to set up the network as with REBIND (since this may be called to test more than one lease) and then ping the first router defined in $routers. If a response is received, the lease must be valid for the network to which the interface is currently connected. It would be more complete to try to ping all of the routers listed in $new_routers, as well as those listed in $new_static_routes, but current scripts do not do this.


[링크 : https://linux.die.net/man/8/dhclient-script]

[링크 : https://www.freebsd.org/cgi/man.cgi?dhclient-script(8)]


[링크 : http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu php4 설치  (0) 2016.10.06
ubuntu apt를 통해 자동 업데이트 되지 않도록 하기  (0) 2016.10.05
proprietary driver on lubuntu  (0) 2016.09.09
gnome-disks 벤치마크  (0) 2016.09.05
lynx 마우스 사용하기  (0) 2016.08.18
Posted by 구차니
Linux/Ubuntu2016. 9. 9. 20:31

lxde 라고 별건 없고 그냥

시스템 쪽에 업데이트 실행해서 독점 드라이버 탭에서 하면되는데

안뜨네...


[링크 : http://askubuntu.com/questions/197110/enable-drivers-on-lubuntu]

Posted by 구차니
Linux/Ubuntu2016. 9. 5. 21:01

디스크 성능 테스트 용


[링크 : http://askubuntu.com/questions/249310/how-can-i-launch-disk-utility-after-installing-it]

'Linux > Ubuntu' 카테고리의 다른 글

dhcp 받아오기 실패시 static ip로 설정하기 (timeout 시)  (0) 2016.10.05
proprietary driver on lubuntu  (0) 2016.09.09
lynx 마우스 사용하기  (0) 2016.08.18
axel  (0) 2016.08.18
baobab - Disk Usage Analyzer  (0) 2016.06.13
Posted by 구차니