'linux' 카테고리의 다른 글
virtualbox 사용법 (0) | 2013.03.07 |
---|---|
cpu clock(속도) 조절 (2) | 2013.03.04 |
opensource 정보 (0) | 2012.05.18 |
IPv4 packet forwarding (0) | 2012.05.03 |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
virtualbox 사용법 (0) | 2013.03.07 |
---|---|
cpu clock(속도) 조절 (2) | 2013.03.04 |
opensource 정보 (0) | 2012.05.18 |
IPv4 packet forwarding (0) | 2012.05.03 |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
Table of Contents
- 기본 환경
- virtual box 가 동작 안될때
- 가상 머신을 console 모드에서 실행시키는 방법
- 기본 환경
OS : Ubuntu 12.10
- virtual box 가 동작 안될때
dev/vboxdrv 어쩌구 저쩌구 하면서 동작 안될때가 많다.
이유는, 아래 순서로 설치해야 하는데,
- linux kernel header
- dkms
- virtualbox-dkms
어처구니 없게도, ubuntu 12.10 첫 설치때부터 이 순서가 제대로 지켜지질 않는다. virtualbox-dkms, dkms 를 삭제하고 위 순서대로 다시 설치하면 된다.
삭제와 재설치는 아래와 같이 하면 된다.
$ sudo aptitude remove virtualbox-dkms $ sudo aptitude remove dkms $ sudo aptitude install linux-headers-$(uname -r) $ sudo aptitude install dkms $ sudo aptitude install virtualbox-dkms |
- 가상 머신을 console 모드에서 실행시키는 방법
서버등에서 가상 머신을 돌리고 클라이언트에서 원격으로 접속하는 방식을 많이 사용하게 되는데, 이럴때 아래와 같이 실행시키면 된다.
poplinux@poplinux:/usr/src$ vboxmanage startvm win7 |
lxc 에 외부 IP 설정하여 직접 접속하는법 (0) | 2019.01.24 |
---|---|
cpu clock(속도) 조절 (2) | 2013.03.04 |
opensource 정보 (0) | 2012.05.18 |
IPv4 packet forwarding (0) | 2012.05.03 |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
Table of contents
1. 환경
2. cpu 설정 확인
3. 설정법
4. 정리글
1. 환경
CPU : Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz
RAM : 8GByte
model : Samsung SENS SF511
OS : ubuntu 12.04 64bit
2. cpu clock 설정 확인
2-1. cpu 정보 있는곳
cpu 0 : /sys/devices/system/cpu/cpu0/cpufreq
cpu 1 : /sys/devices/system/cpu/cpu1/cpufreq
cpu 2 : /sys/devices/system/cpu/cpu2/cpufreq
cpu 3 : /sys/devices/system/cpu/cpu3/cpufreq
poplinux@poplinux: ~$ (3.33) ls /sys/devices/system/cpu/cpu0/cpufreq/ affected_cpus cpuinfo_max_freq = > 사용 가능한 최고 clock related_cpus scaling_cur_freq scaling_max_freq stats bios_limit cpuinfo_min_freq scaling_available_frequencies => 설정 가능한 clock 목록 scaling_driver scaling_min_freq cpuinfo_cur_freq => 현재 동작중인 clock cpuinfo_transition_latency scaling_available_governors => 설정 가능한 동작 mode scaling_governor => 현재 설정되어 있는 동작 mode scaling_setspeed |
cpufreq 디렉토리에는 여러 파일이 있지만 위에 굵게 표시한 파일만 신경쓰면 된다.
3. 설정법
3-1. 준비
속도 설정은 직접 cpufreq/* 의 파일들을 수정해서 할 수도 있지만, cpufreq-set 바이너리를 사용하는 것이 편리하다.
아래와 같이 설치한다.
sudo aptitude install cpufrequtils |
3-2. 설정 방법
아래 명령을 수행하면, cpu0, cpu1, cpu2, cpu3 을 최대 성능을 내도록 설정하게 된다.
sudo cpufreq-set -c 0 -g performance |
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
파일의 내용을 "performance" 로 변경하게 된다.
3-3. 부팅시점에 자동 적용
3-2 에서 설명한 방법은 부팅 이후에 사용자가 수동으로 변경하는 방법으로 부팅 시점에 자동으로 설정하려면 아래와 같이 하면 된다.
step 1. /etc/init.d/cpufrequtils 수정
poplinux@poplinux: cpufreq$ (3.33) vi /etc/init.d/cpufrequtils GOVERNOR="performance" |
step 2. /etc/rc2.d/S19cpufrequtils 추가 ( 원래 있었으면 생략)
poplinux@poplinux: rc2.d $ (3.33) ln -s ../init.d/S19cpufrequtils ./ |
step 3. /etc/rc2.c/S99ondemand 삭제
ubuntu 에서는 CPU clock 를 상황에 따라 자동으로 변경하게 하는 것을 기본으로 하고 있는데 그걸 설정하는 스크립트가 S99ondemand 입니다.
이걸 삭제해야 합니다.
poplinux@poplinux: rc2.d $ (3.33) rm S99ondemand |
여기까지 작업하고 재부팅하면 사용 가능한 최대성능으로 동작하게 됩니다.(CPU 에 한해서)
4. 정리글
컴파일 할 때는 큰 영향은 없을 수도 있지만, 일상적인 사용시에는 버벅거림이 덜 하게 됩니다.
lxc 에 외부 IP 설정하여 직접 접속하는법 (0) | 2019.01.24 |
---|---|
virtualbox 사용법 (0) | 2013.03.07 |
opensource 정보 (0) | 2012.05.18 |
IPv4 packet forwarding (0) | 2012.05.03 |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
1. util-linux-ng
- linux 의 각종 기본 util(fdisk, more, fask) 의 소스 코드입니다.
- WEB PAGE : http://kernel.org/~kzak/util-linux-ng/
- DOWNLOAD : ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/
2. coreutils
- linux 의 가장 기본적인 binary(cp, mv, tail) 의 소스 코드입니다.
- WEB PAGE : http://gnu.org
3. netperf
- 네트웍 성능 측정용 도구입니다.
- WEB PAGE : http://www.netperf.org/netperf/NetperfPage.html
- DOWNLOAD : ftp://ftp.cup.hp.com/dist/networking/benchmarks/netperf/
4. bsdmainutils
- col, hexdump, write 등의 소스입니다.
virtualbox 사용법 (0) | 2013.03.07 |
---|---|
cpu clock(속도) 조절 (2) | 2013.03.04 |
IPv4 packet forwarding (0) | 2012.05.03 |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
iproute2 (0) | 2012.02.07 |
eth0 : 1.1.1.1/24
eth1 : 100.100.100.1/24
Router 2
eth0 : 1.1.1.2/24
eth1 : 200.200.200.1/24
Host 1
eth0 : 100.100.100.2/24
default gateway : 100.100.100.1
Host 2
eth0 : 200.200.200.2/24
default gateway : 200.200.200.1
이때, 커널에서 패킷 포워딩을 하도록 설정해 놓았는지 확인해 보아야 하는데,
/proc/sys/net/ipv4/ip_forward 를 "1"로 설정하면 패킷 포워딩이 동작하고 "0" 으로 설정하면 동작하지 않는다.
cpu clock(속도) 조절 (2) | 2013.03.04 |
---|---|
opensource 정보 (0) | 2012.05.18 |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
iproute2 (0) | 2012.02.07 |
ubuntu 에서 tftp server 설치하는법 (0) | 2011.11.24 |
Table of Content
1. Why?
2. BIOS 설정
3. GRUB 설정
1. Why?
x86 기반에서 작업을 하다보면 시리얼 때문에 고생하게 되는 경우가 종종 있다.
예를 들어 네트웍 관련 장비(라우터, Firewall, server)에서 작업할 경우, 장비에 VGA, keyboard, mouse 없이 딸랑 시리얼 포트만 달려있는 경우가 많은데 이런 장비에서 작업 하려면 모든 입,출력을 serial port 를 통해서 해야 한다.
보통의 상용 장비는 이런 준비가 다 되어 있지만, 처음부터 시작할 경우엔 개발자가 환경 준비를 모두 해 주어야 한다.
2. BIOS 설정
일반적으로 이런 장비들은 BIOS 에서 "모든 출력을 serial(console) 로 보내라" 고 설정하는 옵션이 있다. 이 옵션을 enable 시켜야 한다.
이 옵션을 살려주면 보통 부트로더 전까지 시리얼로 input/output 할 수 있다.
3. GRUB 설정
BIOS 에서 설정해 주었다고 하여도 GRUB Bootloader 가 동작되면 serial 로 아무런 메시지도 볼 수 없게 된다.
그 이유는 GRUB 가 동작하면서 text 기반에서 graphic 기반으로 모드를 바꾸기 때문에 시리얼로는 아무것도 볼 수 없게 되는 것이다.
우선 아래와 같이 graphic 관련 기능을 모두 주석 처리하자.
#if loadfind /use/share/grub/unicode.pf2 ; then # set gfxmode=auto # load_video # insmod gfxterm . . . #fi #terminal_output gfxterm # text 모드로 설정 linux_gfx_mode=text |
위와 같이 설정하면 일단 GRUB 부트로더까지는 시리얼로 볼 수 있다. 하지만 부팅을 시작하면 시리얼로는 아무것도 볼 수 없다. 이제는 kernel 옵션을 바꿔 주어야 한다.
그 다음엔 아래와 같이 kernel option 을 설정하면 부팅로그까지 시리얼로 볼 수 있다.
linux /boot/vmlinuz-3.0.0-15-generic root=UUID=865f57fe-30a8-4e6e-9bf8 ro console=tty0 console=ttyS0,115200 |
하지만 커널 부팅이 완료되고 나면 로그인 창을 볼 수가 없다.
아래와 같이 /etc/init/ttyS0 파일을 생성해 주어야 한다.
poplinux@test : $ cd /etc/init poplinux@test : /etc/init $ cp tty1.conf ttyS0.conf poplinux@test : /etc/init $ vi ttyS0.conf # ttyS0 -getty # This service maintains a getty on ttyS0 from the point the system is #started until it is shut down again. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -L 115200 ttyS0 vt100 |
이렇게 하면 로그인 쉘이 동작할때 시리얼로 메시지를 볼 수 있다.
opensource 정보 (0) | 2012.05.18 |
---|---|
IPv4 packet forwarding (0) | 2012.05.03 |
iproute2 (0) | 2012.02.07 |
ubuntu 에서 tftp server 설치하는법 (0) | 2011.11.24 |
GNOME 설정 (0) | 2011.09.27 |
기존 리눅스 시스템에서 사용하던 네트웍 관련 툴들을 하나로 묶어 놓은 유틸리티 입니다.
예를 들면 아래 표와 같이 기존 유틸리티와 iproute2 의 상관 관계를 살펴볼 수 있다.
용도 | 기존 net-tools | iproute2 |
Address and link configuration | ifconfig | ip addr, ip link |
Routing tables | route | ip route |
Neighbors | arp | ip neigh |
VLAN | vconfig | ip link |
Tunnels | iptunnel | ip tunnel |
Multicast | ipmaddr | ip maddr |
Statistics | netstat | ss |
IPv4 packet forwarding (0) | 2012.05.03 |
---|---|
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
ubuntu 에서 tftp server 설치하는법 (0) | 2011.11.24 |
GNOME 설정 (0) | 2011.09.27 |
Iconv 로 인코딩 변경하기 (0) | 2011.09.26 |
sudo aptitude install tftpd-hpa mkdir /tftpboot |
sudo vi /etc/default/tftpd-hpa # /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure" |
sudo service tftpd-hpa restart |
tftp 10.100.4.48 tftp> get test_file |
리눅스 콘솔내용을 시리얼로 출력해서 보려면 (0) | 2012.04.03 |
---|---|
iproute2 (0) | 2012.02.07 |
GNOME 설정 (0) | 2011.09.27 |
Iconv 로 인코딩 변경하기 (0) | 2011.09.26 |
LFS(Linux From Scratch) (0) | 2011.09.23 |
<?xml version="1.0"?>
<gconf>
<entry name="profile_list" mtime="1317083649" type="list" ltype="string">
<li type="string">
<stringvalue>Default</stringvalue>
</li>
<li type="string">
<stringvalue>Profile0</stringvalue>
</li>
</entry>
</gconf> |
user@user: $ gnome-terminal --window-with-profile poplinux_test |
iproute2 (0) | 2012.02.07 |
---|---|
ubuntu 에서 tftp server 설치하는법 (0) | 2011.11.24 |
Iconv 로 인코딩 변경하기 (0) | 2011.09.26 |
LFS(Linux From Scratch) (0) | 2011.09.23 |
우분투 run level 확인방법 (0) | 2011.09.22 |
ubuntu 에서 tftp server 설치하는법 (0) | 2011.11.24 |
---|---|
GNOME 설정 (0) | 2011.09.27 |
LFS(Linux From Scratch) (0) | 2011.09.23 |
우분투 run level 확인방법 (0) | 2011.09.22 |
화면 캡쳐하는 방법 (0) | 2011.09.21 |