Linux/Ubuntu2014. 4. 19. 00:03
당연한 추세겠지만..
서버는 이제 64bit only!!!



Posted by 구차니
Linux/Ubuntu2014. 4. 16. 02:53
어디 시간인 기준인지 모르겠다만.. 아무튼 17일날 2014년 LTS 공개!!!
부디 가볍게 구성되었길 ㅠㅠ
그리고 Gnome 제발.. 구버전 형태의 기본 윈도우 매니저로 돌아오길 ㅠㅠ

 London 15th April 2014: Canonical today announces Ubuntu 14.04 LTS will be released on 17th April 2014, bringing a new level of reliability, performance and interoperability to cloud and scale out environments with support and maintenance for five years.

[링크 : http://insights.ubuntu.com/news/ubuntu-14-04-lts-the-cloud-platform-of-choice/

Posted by 구차니
Linux2014. 4. 11. 00:33
오라클 시작/종료 스크립트 짜다 보니
<< EOF
EOF 
라는 좋은 문구발견!

아무튼.. 리다이렉트 비스므리하게 생겼는데
<< EOF를 하면
EOF가 나올때 까지의 명령어를
실행중인 프로그램에 입력해 줄 수 있다.

입력의 끝을 나타내는 EOF는 반드시
앞에 공백이나 탭이 있어서는 안된다.


[링크 : http://originalchoi.tistory.com/7]

'Linux' 카테고리의 다른 글

mount - relatime / noatime  (0) 2014.08.28
linux shared object(so) tutorial  (0) 2014.06.30
cron / crontab  (0) 2013.12.20
ltrace strace ldd readelf objdump 결과물  (0) 2013.11.26
Linux Router Project - Dead!!!  (2) 2013.11.26
Posted by 구차니
Linux2013. 12. 20. 23:33
아는 지인의 요청으로 검색하게 된 내용


crontab의 경우 시스템 전체와 사용자 별로 설정을 저장한다.
crontab [-u user] file
crontab [-u user] [-l | -r | -e] [-i] [-s]
 
[링크 : http://linux.die.net/man/1/crontab ] 

ubuntu 12.10 LTS에서 도움말을 보니 추가된 내용이 있는데
$ man crontab
FILES
       /etc/cron.allow
       /etc/cron.deny
       /var/spool/cron/crontabs

       There  is  one  file  for  each  user's  crontab under the /var/spool/cron/crontabs directory. Users are not
       allowed to edit the files under that directory directly to ensure that only users allowed by the  system  to
       run  periodic  tasks  can  add them, and only syntactically correct crontabs will be written there.  This is
       enforced by having the directory writable only by the crontab group and configuring crontab command with the
       setgid bid set for that specific group. 

/etc/crontab 은 system 전체에 대한 (데몬용) crontab이고
/var/spool/cron/crontabs/ 에는 사용자별 crontab 파일이 존재한다.

또한 cron에 대한 로그는
기본적으로
/var/log/syslog에서 "CRON" 키워드로 검색을 하면 나오지만 안나온다면
cron에서 실행되는 스크립트의 마지막에 로그를 남기도록 하는 수 밖에 없을듯 하다. 
Posted by 구차니
Linux2013. 11. 26. 12:03
아오.. 잘 안쓰니 맨날 까먹어..
한번 정리를 해놔야 할듯..

$ ldd a.out
        linux-gate.so.1 =>  (0xb7704000)
        libgomp.so.1 => /usr/lib/i386-linux-gnu/libgomp.so.1 (0xb76d6000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76bb000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7510000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7507000)
        /lib/ld-linux.so.2 (0xb7705000) 

$ strace ./a.out
execve("./a.out", ["./a.out"], [/* 19 vars */]) = 0
brk(0)                                  = 0x8b30000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7701000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=112875, ...}) = 0
mmap2(NULL, 112875, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb76e5000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libgomp.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`*\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=59044, ...}) = 0
mmap2(NULL, 61768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76d5000
mmap2(0xb76e3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd) = 0xb76e3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p[\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=124663, ...}) = 0
mmap2(NULL, 107008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76ba000
mmap2(0xb76d1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16) = 0xb76d1000
mmap2(0xb76d3000, 4608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76d3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\226\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1734120, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76b9000
mmap2(NULL, 1743580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb750f000
mmap2(0xb76b3000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a4) = 0xb76b3000
mmap2(0xb76b6000, 10972, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76b6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\30\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30684, ...}) = 0
mmap2(NULL, 33360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7506000
mmap2(0xb750d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb750d000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7505000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7505700, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb76b3000, 8192, PROT_READ)   = 0
mprotect(0xb76d1000, 4096, PROT_READ)   = 0
mprotect(0xb750d000, 4096, PROT_READ)   = 0
mprotect(0xb76e3000, 4096, PROT_READ)   = 0
mprotect(0x8049000, 4096, PROT_READ)    = 0
mprotect(0xb7724000, 4096, PROT_READ)   = 0
munmap(0xb76e5000, 112875)              = 0
set_tid_address(0xb7505768)             = 3083
set_robust_list(0xb7505770, 0xc)        = 0
futex(0xbfe14f74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, b7505700) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb76bf570, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb76bf5f0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="devmini", ...}) = 0
sched_getaffinity(3083, 128, {f})       = 4
brk(0)                                  = 0x8b30000
brk(0x8b51000)                          = 0x8b51000
mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xb6d04000
mprotect(0xb6d04000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb7504424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb7504ba8, {entry_number:6, base_addr:0xb7504b40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb7504ba8) = 3084
mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xb6503000
mprotect(0xb6503000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb6d03424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb6d03ba8, {entry_number:6, base_addr:0xb6d03b40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb6d03ba8) = 3085
mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xb5d02000
mprotect(0xb5d02000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb6502424, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb6502ba8, {entry_number:6, base_addr:0xb6502b40, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb6502ba8) = 3086
futex(0x8b30654, FUTEX_WAIT_PRIVATE, 0, NULLres = 0
) = -1 EAGAIN (Resource temporarily unavailable)
write(1, "res = 0\n", 8res = 0
)                = 8
futex(0xb76b68b8, FUTEX_WAKE_PRIVATE, 1) = 1
res = 0
res = 0
futex(0x8b3004c, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
exit_group(0)                           = ?

$ ltrace ./a.out
__libc_start_main(0x8048500, 1, 0xbf8a64d4, 0x8048540, 0x80485b0 <unfinished ...>
GOMP_parallel_start(0x8048512, 0, 0, 0x8048561, -1)                 = 299961
printf("res = %d\n", 0res = 0
res = 0
 <unfinished ...>
unexpected breakpoint at 0xfffffffe
+++ killed by SIGSEGV +++

$ readelf -a a.out
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x8048410
  Start of program headers:          52 (bytes into file)
  Start of section headers:          4420 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         9
  Size of section headers:           40 (bytes)
  Number of section headers:         30
  Section header string table index: 27

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .interp           PROGBITS        08048154 000154 000013 00   A  0   0  1
  [ 2] .note.ABI-tag     NOTE            08048168 000168 000020 00   A  0   0  4
  [ 3] .note.gnu.build-i NOTE            08048188 000188 000024 00   A  0   0  4
  [ 4] .gnu.hash         GNU_HASH        080481ac 0001ac 000020 04   A  5   0  4
  [ 5] .dynsym           DYNSYM          080481cc 0001cc 000080 10   A  6   1  4
  [ 6] .dynstr           STRTAB          0804824c 00024c 0000ac 00   A  0   0  1
  [ 7] .gnu.version      VERSYM          080482f8 0002f8 000010 02   A  5   0  2
  [ 8] .gnu.version_r    VERNEED         08048308 000308 000040 00   A  6   2  4
  [ 9] .rel.dyn          REL             08048348 000348 000008 08   A  5   0  4
  [10] .rel.plt          REL             08048350 000350 000028 08   A  5  12  4
  [11] .init             PROGBITS        08048378 000378 00002e 00  AX  0   0  4
  [12] .plt              PROGBITS        080483b0 0003b0 000060 04  AX  0   0 16
  [13] .text             PROGBITS        08048410 000410 0001dc 00  AX  0   0 16
  [14] .fini             PROGBITS        080485ec 0005ec 00001a 00  AX  0   0  4
  [15] .rodata           PROGBITS        08048608 000608 000012 00   A  0   0  4
  [16] .eh_frame_hdr     PROGBITS        0804861c 00061c 000044 00   A  0   0  4
  [17] .eh_frame         PROGBITS        08048660 000660 000104 00   A  0   0  4
  [18] .ctors            PROGBITS        08049f04 000f04 000008 00  WA  0   0  4
  [19] .dtors            PROGBITS        08049f0c 000f0c 000008 00  WA  0   0  4
  [20] .jcr              PROGBITS        08049f14 000f14 000004 00  WA  0   0  4
  [21] .dynamic          DYNAMIC         08049f18 000f18 0000d8 08  WA  6   0  4
  [22] .got              PROGBITS        08049ff0 000ff0 000004 04  WA  0   0  4
  [23] .got.plt          PROGBITS        08049ff4 000ff4 000020 04  WA  0   0  4
  [24] .data             PROGBITS        0804a014 001014 000008 00  WA  0   0  4
  [25] .bss              NOBITS          0804a01c 00101c 000008 00  WA  0   0  4
  [26] .comment          PROGBITS        00000000 00101c 00002a 01  MS  0   0  1
  [27] .shstrtab         STRTAB          00000000 001046 0000fc 00      0   0  1
  [28] .symtab           SYMTAB          00000000 0015f4 000450 10     29  46  4
  [29] .strtab           STRTAB          00000000 001a44 00024e 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

There are no section groups in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4
  INTERP         0x000154 0x08048154 0x08048154 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux.so.2]
  LOAD           0x000000 0x08048000 0x08048000 0x00764 0x00764 R E 0x1000
  LOAD           0x000f04 0x08049f04 0x08049f04 0x00118 0x00120 RW  0x1000
  DYNAMIC        0x000f18 0x08049f18 0x08049f18 0x000d8 0x000d8 RW  0x4
  NOTE           0x000168 0x08048168 0x08048168 0x00044 0x00044 R   0x4
  GNU_EH_FRAME   0x00061c 0x0804861c 0x0804861c 0x00044 0x00044 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
  GNU_RELRO      0x000f04 0x08049f04 0x08049f04 0x000fc 0x000fc R   0x1

 Section to Segment mapping:
  Segment Sections...
   00
   01     .interp
   02     .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
   03     .ctors .dtors .jcr .dynamic .got .got.plt .data .bss
   04     .dynamic
   05     .note.ABI-tag .note.gnu.build-id
   06     .eh_frame_hdr
   07
   08     .ctors .dtors .jcr .dynamic .got

Dynamic section at offset 0xf18 contains 22 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libgomp.so.1]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000c (INIT)                       0x8048378
 0x0000000d (FINI)                       0x80485ec
 0x6ffffef5 (GNU_HASH)                   0x80481ac
 0x00000005 (STRTAB)                     0x804824c
 0x00000006 (SYMTAB)                     0x80481cc
 0x0000000a (STRSZ)                      172 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x8049ff4
 0x00000002 (PLTRELSZ)                   40 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x8048350
 0x00000011 (REL)                        0x8048348
 0x00000012 (RELSZ)                      8 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x8048308
 0x6fffffff (VERNEEDNUM)                 2
 0x6ffffff0 (VERSYM)                     0x80482f8
 0x00000000 (NULL)                       0x0

Relocation section '.rel.dyn' at offset 0x348 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
08049ff0  00000406 R_386_GLOB_DAT    00000000   __gmon_start__

Relocation section '.rel.plt' at offset 0x350 contains 5 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
0804a000  00000107 R_386_JUMP_SLOT   00000000   printf
0804a004  00000207 R_386_JUMP_SLOT   00000000   GOMP_parallel_start
0804a008  00000307 R_386_JUMP_SLOT   00000000   GOMP_parallel_end
0804a00c  00000407 R_386_JUMP_SLOT   00000000   __gmon_start__
0804a010  00000507 R_386_JUMP_SLOT   00000000   __libc_start_main

There are no unwind sections in this file.

Symbol table '.dynsym' contains 8 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000000     0 FUNC    GLOBAL DEFAULT  UND printf@GLIBC_2.0 (2)
     2: 00000000     0 FUNC    GLOBAL DEFAULT  UND GOMP_parallel_start@GOMP_1.0 (3)
     3: 00000000     0 FUNC    GLOBAL DEFAULT  UND GOMP_parallel_end@GOMP_1.0 (3)
     4: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     5: 00000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.0 (2)
     6: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
     7: 0804860c     4 OBJECT  GLOBAL DEFAULT   15 _IO_stdin_used

Symbol table '.symtab' contains 69 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 08048154     0 SECTION LOCAL  DEFAULT    1
     2: 08048168     0 SECTION LOCAL  DEFAULT    2
     3: 08048188     0 SECTION LOCAL  DEFAULT    3
     4: 080481ac     0 SECTION LOCAL  DEFAULT    4
     5: 080481cc     0 SECTION LOCAL  DEFAULT    5
     6: 0804824c     0 SECTION LOCAL  DEFAULT    6
     7: 080482f8     0 SECTION LOCAL  DEFAULT    7
     8: 08048308     0 SECTION LOCAL  DEFAULT    8
     9: 08048348     0 SECTION LOCAL  DEFAULT    9
    10: 08048350     0 SECTION LOCAL  DEFAULT   10
    11: 08048378     0 SECTION LOCAL  DEFAULT   11
    12: 080483b0     0 SECTION LOCAL  DEFAULT   12
    13: 08048410     0 SECTION LOCAL  DEFAULT   13
    14: 080485ec     0 SECTION LOCAL  DEFAULT   14
    15: 08048608     0 SECTION LOCAL  DEFAULT   15
    16: 0804861c     0 SECTION LOCAL  DEFAULT   16
    17: 08048660     0 SECTION LOCAL  DEFAULT   17
    18: 08049f04     0 SECTION LOCAL  DEFAULT   18
    19: 08049f0c     0 SECTION LOCAL  DEFAULT   19
    20: 08049f14     0 SECTION LOCAL  DEFAULT   20
    21: 08049f18     0 SECTION LOCAL  DEFAULT   21
    22: 08049ff0     0 SECTION LOCAL  DEFAULT   22
    23: 08049ff4     0 SECTION LOCAL  DEFAULT   23
    24: 0804a014     0 SECTION LOCAL  DEFAULT   24
    25: 0804a01c     0 SECTION LOCAL  DEFAULT   25
    26: 00000000     0 SECTION LOCAL  DEFAULT   26
    27: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
    28: 08049f04     0 OBJECT  LOCAL  DEFAULT   18 __CTOR_LIST__
    29: 08049f0c     0 OBJECT  LOCAL  DEFAULT   19 __DTOR_LIST__
    30: 08049f14     0 OBJECT  LOCAL  DEFAULT   20 __JCR_LIST__
    31: 08048440     0 FUNC    LOCAL  DEFAULT   13 __do_global_dtors_aux
    32: 0804a01c     1 OBJECT  LOCAL  DEFAULT   25 completed.6159
    33: 0804a020     4 OBJECT  LOCAL  DEFAULT   25 dtor_idx.6161
    34: 080484a0     0 FUNC    LOCAL  DEFAULT   13 frame_dummy
    35: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
    36: 08049f08     0 OBJECT  LOCAL  DEFAULT   18 __CTOR_END__
    37: 08048760     0 OBJECT  LOCAL  DEFAULT   17 __FRAME_END__
    38: 08049f14     0 OBJECT  LOCAL  DEFAULT   20 __JCR_END__
    39: 080485c0     0 FUNC    LOCAL  DEFAULT   13 __do_global_ctors_aux
    40: 00000000     0 FILE    LOCAL  DEFAULT  ABS test.c
    41: 08048512    35 FUNC    LOCAL  DEFAULT   13 thread._omp_fn.0
    42: 08049f04     0 NOTYPE  LOCAL  DEFAULT   18 __init_array_end
    43: 08049f18     0 OBJECT  LOCAL  DEFAULT   21 _DYNAMIC
    44: 08049f04     0 NOTYPE  LOCAL  DEFAULT   18 __init_array_start
    45: 08049ff4     0 OBJECT  LOCAL  DEFAULT   23 _GLOBAL_OFFSET_TABLE_
    46: 080485b0     2 FUNC    GLOBAL DEFAULT   13 __libc_csu_fini
    47: 080485b2     0 FUNC    GLOBAL HIDDEN    13 __i686.get_pc_thunk.bx
    48: 0804a014     0 NOTYPE  WEAK   DEFAULT   24 data_start
    49: 00000000     0 FUNC    GLOBAL DEFAULT  UND printf@@GLIBC_2.0
    50: 00000000     0 FUNC    GLOBAL DEFAULT  UND GOMP_parallel_start@@GOMP
    51: 0804a01c     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
    52: 00000000     0 FUNC    GLOBAL DEFAULT  UND GOMP_parallel_end@@GOMP_1
    53: 080485ec     0 FUNC    GLOBAL DEFAULT   14 _fini
    54: 08049f10     0 OBJECT  GLOBAL HIDDEN    19 __DTOR_END__
    55: 0804a014     0 NOTYPE  GLOBAL DEFAULT   24 __data_start
    56: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    57: 0804a018     0 OBJECT  GLOBAL HIDDEN    24 __dso_handle
    58: 0804860c     4 OBJECT  GLOBAL DEFAULT   15 _IO_stdin_used
    59: 00000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@@GLIBC_
    60: 08048540    97 FUNC    GLOBAL DEFAULT   13 __libc_csu_init
    61: 0804a024     0 NOTYPE  GLOBAL DEFAULT  ABS _end
    62: 08048410     0 FUNC    GLOBAL DEFAULT   13 _start
    63: 08048608     4 OBJECT  GLOBAL DEFAULT   15 _fp_hw
    64: 0804a01c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
    65: 08048500    18 FUNC    GLOBAL DEFAULT   13 main
    66: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    67: 080484c4    60 FUNC    GLOBAL DEFAULT   13 thread
    68: 08048378     0 FUNC    GLOBAL DEFAULT   11 _init

Histogram for `.gnu.hash' bucket list length (total of 2 buckets):
 Length  Number     % of total  Coverage
      0  1          ( 50.0%)
      1  1          ( 50.0%)    100.0%

Version symbols section '.gnu.version' contains 8 entries:
 Addr: 00000000080482f8  Offset: 0x0002f8  Link: 5 (.dynsym)
  000:   0 (*local*)       2 (GLIBC_2.0)     3 (GOMP_1.0)      3 (GOMP_1.0)
  004:   0 (*local*)       2 (GLIBC_2.0)     0 (*local*)       1 (*global*)

Version needs section '.gnu.version_r' contains 2 entries:
 Addr: 0x0000000008048308  Offset: 0x000308  Link: 6 (.dynstr)
  000000: Version: 1  File: libgomp.so.1  Cnt: 1
  0x0010:   Name: GOMP_1.0  Flags: none  Version: 3
  0x0020: Version: 1  File: libc.so.6  Cnt: 1
  0x0030:   Name: GLIBC_2.0  Flags: none  Version: 2

Notes at offset 0x00000168 with length 0x00000020:
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 2.6.24

Notes at offset 0x00000188 with length 0x00000024:
  Owner                 Data size       Description
  GNU                  0x00000014       NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: 672fb53e31fe8755c4fad0c0c3efdad910b3c693

$ objdump -x a.out

a.out:     file format elf32-i386
a.out
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08048410

Program Header:
    PHDR off    0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
         filesz 0x00000120 memsz 0x00000120 flags r-x
  INTERP off    0x00000154 vaddr 0x08048154 paddr 0x08048154 align 2**0
         filesz 0x00000013 memsz 0x00000013 flags r--
    LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
         filesz 0x00000764 memsz 0x00000764 flags r-x
    LOAD off    0x00000f04 vaddr 0x08049f04 paddr 0x08049f04 align 2**12
         filesz 0x00000118 memsz 0x00000120 flags rw-
 DYNAMIC off    0x00000f18 vaddr 0x08049f18 paddr 0x08049f18 align 2**2
         filesz 0x000000d8 memsz 0x000000d8 flags rw-
    NOTE off    0x00000168 vaddr 0x08048168 paddr 0x08048168 align 2**2
         filesz 0x00000044 memsz 0x00000044 flags r--
EH_FRAME off    0x0000061c vaddr 0x0804861c paddr 0x0804861c align 2**2
         filesz 0x00000044 memsz 0x00000044 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 flags rw-
   RELRO off    0x00000f04 vaddr 0x08049f04 paddr 0x08049f04 align 2**0
         filesz 0x000000fc memsz 0x000000fc flags r--

Dynamic Section:
  NEEDED               libgomp.so.1
  NEEDED               libpthread.so.0
  NEEDED               libc.so.6
  INIT                 0x08048378
  FINI                 0x080485ec
  GNU_HASH             0x080481ac
  STRTAB               0x0804824c
  SYMTAB               0x080481cc
  STRSZ                0x000000ac
  SYMENT               0x00000010
  DEBUG                0x00000000
  PLTGOT               0x08049ff4
  PLTRELSZ             0x00000028
  PLTREL               0x00000011
  JMPREL               0x08048350
  REL                  0x08048348
  RELSZ                0x00000008
  RELENT               0x00000008
  VERNEED              0x08048308
  VERNEEDNUM           0x00000002
  VERSYM               0x080482f8

Version References:
  required from libgomp.so.1:
    0x042628d0 0x00 03 GOMP_1.0
  required from libc.so.6:
    0x0d696910 0x00 02 GLIBC_2.0

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .interp       00000013  08048154  08048154  00000154  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .note.ABI-tag 00000020  08048168  08048168  00000168  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .note.gnu.build-id 00000024  08048188  08048188  00000188  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .gnu.hash     00000020  080481ac  080481ac  000001ac  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .dynsym       00000080  080481cc  080481cc  000001cc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .dynstr       000000ac  0804824c  0804824c  0000024c  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .gnu.version  00000010  080482f8  080482f8  000002f8  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 .gnu.version_r 00000040  08048308  08048308  00000308  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  8 .rel.dyn      00000008  08048348  08048348  00000348  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  9 .rel.plt      00000028  08048350  08048350  00000350  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 10 .init         0000002e  08048378  08048378  00000378  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 11 .plt          00000060  080483b0  080483b0  000003b0  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 12 .text         000001dc  08048410  08048410  00000410  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 13 .fini         0000001a  080485ec  080485ec  000005ec  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 14 .rodata       00000012  08048608  08048608  00000608  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 .eh_frame_hdr 00000044  0804861c  0804861c  0000061c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 16 .eh_frame     00000104  08048660  08048660  00000660  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 17 .ctors        00000008  08049f04  08049f04  00000f04  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 18 .dtors        00000008  08049f0c  08049f0c  00000f0c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 19 .jcr          00000004  08049f14  08049f14  00000f14  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 20 .dynamic      000000d8  08049f18  08049f18  00000f18  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 21 .got          00000004  08049ff0  08049ff0  00000ff0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 22 .got.plt      00000020  08049ff4  08049ff4  00000ff4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 23 .data         00000008  0804a014  0804a014  00001014  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 24 .bss          00000008  0804a01c  0804a01c  0000101c  2**2
                  ALLOC
 25 .comment      0000002a  00000000  00000000  0000101c  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
08048154 l    d  .interp        00000000              .interp
08048168 l    d  .note.ABI-tag  00000000              .note.ABI-tag
08048188 l    d  .note.gnu.build-id     00000000              .note.gnu.build-id
080481ac l    d  .gnu.hash      00000000              .gnu.hash
080481cc l    d  .dynsym        00000000              .dynsym
0804824c l    d  .dynstr        00000000              .dynstr
080482f8 l    d  .gnu.version   00000000              .gnu.version
08048308 l    d  .gnu.version_r 00000000              .gnu.version_r
08048348 l    d  .rel.dyn       00000000              .rel.dyn
08048350 l    d  .rel.plt       00000000              .rel.plt
08048378 l    d  .init  00000000              .init
080483b0 l    d  .plt   00000000              .plt
08048410 l    d  .text  00000000              .text
080485ec l    d  .fini  00000000              .fini
08048608 l    d  .rodata        00000000              .rodata
0804861c l    d  .eh_frame_hdr  00000000              .eh_frame_hdr
08048660 l    d  .eh_frame      00000000              .eh_frame
08049f04 l    d  .ctors 00000000              .ctors
08049f0c l    d  .dtors 00000000              .dtors
08049f14 l    d  .jcr   00000000              .jcr
08049f18 l    d  .dynamic       00000000              .dynamic
08049ff0 l    d  .got   00000000              .got
08049ff4 l    d  .got.plt       00000000              .got.plt
0804a014 l    d  .data  00000000              .data
0804a01c l    d  .bss   00000000              .bss
00000000 l    d  .comment       00000000              .comment
00000000 l    df *ABS*  00000000              crtstuff.c
08049f04 l     O .ctors 00000000              __CTOR_LIST__
08049f0c l     O .dtors 00000000              __DTOR_LIST__
08049f14 l     O .jcr   00000000              __JCR_LIST__
08048440 l     F .text  00000000              __do_global_dtors_aux
0804a01c l     O .bss   00000001              completed.6159
0804a020 l     O .bss   00000004              dtor_idx.6161
080484a0 l     F .text  00000000              frame_dummy
00000000 l    df *ABS*  00000000              crtstuff.c
08049f08 l     O .ctors 00000000              __CTOR_END__
08048760 l     O .eh_frame      00000000              __FRAME_END__
08049f14 l     O .jcr   00000000              __JCR_END__
080485c0 l     F .text  00000000              __do_global_ctors_aux
00000000 l    df *ABS*  00000000              test.c
08048512 l     F .text  00000023              thread._omp_fn.0
08049f04 l       .ctors 00000000              __init_array_end
08049f18 l     O .dynamic       00000000              _DYNAMIC
08049f04 l       .ctors 00000000              __init_array_start
08049ff4 l     O .got.plt       00000000              _GLOBAL_OFFSET_TABLE_
080485b0 g     F .text  00000002              __libc_csu_fini
080485b2 g     F .text  00000000              .hidden __i686.get_pc_thunk.bx
0804a014  w      .data  00000000              data_start
00000000       F *UND*  00000000              printf@@GLIBC_2.0
00000000       F *UND*  00000000              GOMP_parallel_start@@GOMP_1.0
0804a01c g       *ABS*  00000000              _edata
00000000       F *UND*  00000000              GOMP_parallel_end@@GOMP_1.0
080485ec g     F .fini  00000000              _fini
08049f10 g     O .dtors 00000000              .hidden __DTOR_END__
0804a014 g       .data  00000000              __data_start
00000000  w      *UND*  00000000              __gmon_start__
0804a018 g     O .data  00000000              .hidden __dso_handle
0804860c g     O .rodata        00000004              _IO_stdin_used
00000000       F *UND*  00000000              __libc_start_main@@GLIBC_2.0
08048540 g     F .text  00000061              __libc_csu_init
0804a024 g       *ABS*  00000000              _end
08048410 g     F .text  00000000              _start
08048608 g     O .rodata        00000004              _fp_hw
0804a01c g       *ABS*  00000000              __bss_start
08048500 g     F .text  00000012              main
00000000  w      *UND*  00000000              _Jv_RegisterClasses
080484c4 g     F .text  0000003c              thread
08048378 g     F .init  00000000              _init

'Linux' 카테고리의 다른 글

리눅스 쉘 스크립트 << EOF 를 이용해서 자동화 하기  (0) 2014.04.11
cron / crontab  (0) 2013.12.20
Linux Router Project - Dead!!!  (2) 2013.11.26
하드 디스크 통채로 덤프해서 마운트 하기  (0) 2013.07.06
리눅스 포팅  (0) 2013.06.19
Posted by 구차니
Linux2013. 11. 26. 09:59
예전부터 들어서 해볼까 하다가 못해본걸 이제야 찾았더니
너무 늦었네.. ㅠㅠ
사이트 폐쇄 및 프로젝트 종료!!
어디서 iso를 받을데 없으려나..

[링크 : http://web.archive.org/web/20030624030005/http://www.linuxrouter.org/]
[링크 : http://en.wikipedia.org/wiki/Linux_Router_Project]
[링크 : http://www.linuxrouter.org/] << 죽음

'Linux' 카테고리의 다른 글

cron / crontab  (0) 2013.12.20
ltrace strace ldd readelf objdump 결과물  (0) 2013.11.26
하드 디스크 통채로 덤프해서 마운트 하기  (0) 2013.07.06
리눅스 포팅  (0) 2013.06.19
fstab 필드 항목 내용  (0) 2013.05.24
Posted by 구차니
Linux/Ubuntu2013. 9. 19. 21:22
윈도우에서는 옵티머스를 통해 Nvidia의 그래픽과 intel 내장형 HD3000/4000 등과 스위치가 가능한데
리눅스는 여전히 안될줄 알았더니
2011년 8월 4일 이후 범블비 프로젝트에 nvidia가 지원을 하면서 안되진 않는데
이건 되는것도 안되는것도 아니여 라는 껄쩍찌근한 반응을 보니..


[링크 : https://wiki.ubuntu.com/Bumblebee]
[링크 : https://launchpad.net/~bumblebee]

[링크 : http://deviantcj.tistory.com/467]
[링크 : http://edoli.tistory.com/120]
[링크 : http://gigglehd.com/zbxe/9432956]
Posted by 구차니
Linux/Ubuntu2013. 7. 10. 16:24
korea 에서 Main으로 바꾸니 더욱 빨라진 기분..
(기분이라기 보다는 느낌? ㅋㅋㅋ
바꾸기 전에는 국내 서버에서 30kB/s 이렇게 날아오던던게 메가급으로 날아온다 -_-
어떻게 국내가 더 느려진겨?)

 
Posted by 구차니
Linux/Ubuntu2013. 7. 10. 16:16
비정상 실행시 /etx/X11/xorg.conf.failsafe 파일을 가지고 노는게 나을려나..
$ ll /etc/X11/
total 96
drwxr-xr-x  10 root root  4096 Jul 10 16:00 ./
drwxr-xr-x 127 root root 12288 Jul 10 15:56 ../
lrwxrwxrwx   1 root root    13 Sep  9  2012 X -> /usr/bin/Xorg*
-rwxr-xr-x   1 root root   709 Apr  1  2010 Xreset*
drwxr-xr-x   2 root root  4096 Feb 14 07:09 Xreset.d/
drwxr-xr-x   2 root root  4096 Feb 14 07:09 Xresources/
-rwxr-xr-x   1 root root  3730 Jan 20  2012 Xsession*
drwxr-xr-x   2 root root  4096 Feb 14 07:10 Xsession.d/
-rw-r--r--   1 root root   265 Jul  2  2008 Xsession.options
-rw-r--r--   1 root root   601 Feb 14 07:09 Xwrapper.config
drwxr-xr-x   2 root root  4096 Feb 14 07:10 app-defaults/
drwxr-xr-x   2 root root  4096 Feb 14 07:10 cursors/
-rw-r--r--   1 root root    18 Feb 14 07:09 default-display-manager
drwxr-xr-x   4 root root  4096 Feb 14 07:09 fonts/
-rw-r--r--   1 root root 17394 Dec  3  2009 rgb.txt
drwxr-xr-x   3 root root  4096 Feb 14 07:10 xinit/
drwxr-xr-x   2 root root  4096 Jan 24  2012 xkb/ 

아래 경로로 옮겨진 10-monitor.conf를 생성해서 가지고 노는게 좋으려나?
$ ll /usr/share/X11/xorg.conf.d/
total 36
drwxr-xr-x 2 root root 4096 Feb 14 07:09 ./
drwxr-xr-x 5 root root 4096 Feb 14 07:09 ../
-rw-r--r-- 1 root root 1099 Jan 19 21:39 10-evdev.conf
-rw-r--r-- 1 root root  590 Dec  8  2012 11-evdev-quirks.conf
-rw-r--r-- 1 root root  364 Dec  8  2012 11-evdev-trackpoint.conf
-rw-r--r-- 1 root root 1593 Dec  8  2012 50-synaptics.conf
-rw-r--r-- 1 root root  115 Dec  8  2012 50-vmmouse.conf
-rw-r--r-- 1 root root  842 Dec  8  2012 50-wacom.conf
-rw-r--r-- 1 root root  590 Dec  8  2012 51-synaptics-quirks.conf


아무튼
$ sudo service lightgdm stop 
$ sudo X -configure 
라고 입력하니 $HOME 에 xorg.conf.new 라고 빈내용의 설정파일이 생성된다.

$ cat xorg.conf.new
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        Screen      2  "Screen2" RightOf "Screen1"
        Screen      3  "Screen3" RightOf "Screen2"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/cyrillic"
        FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/100dpi"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath     "built-ins"
EndSection

Section "Module"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor2"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor3"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"                   # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "Backlight"                 # <str>
        #Option     "DRI"                       # [<bool>]
        #Option     "ColorKey"                  # <i>
        #Option     "VideoKey"                  # <i>
        #Option     "Tiling"                    # [<bool>]
        #Option     "LinearFramebuffer"         # [<bool>]
        #Option     "SwapbuffersWait"           # [<bool>]
        #Option     "XvPreferOverlay"           # [<bool>]
        #Option     "HotPlug"                   # [<bool>]
        #Option     "RelaxedFencing"            # [<bool>]
        #Option     "XvMC"                      # [<bool>]
        #Option     "Throttle"                  # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "DelayedFlush"              # [<bool>]
        #Option     "TearFree"                  # [<bool>]
        #Option     "PerCrtcPixmaps"            # [<bool>]
        #Option     "FallbackDebug"             # [<bool>]
        #Option     "DebugFlushBatches"         # [<bool>]
        #Option     "DebugFlushCaches"          # [<bool>]
        #Option     "DebugWait"                 # [<bool>]
        #Option     "BufferCache"               # [<bool>]
        #Option     "TripleBuffer"              # [<bool>]
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "kmsdev"                    # <str>
        #Option     "ShadowFB"                  # [<bool>]
        Identifier  "Card1"
        Driver      "modesetting"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "Rotate"                    # <str>
        #Option     "fbdev"                     # <str>
        #Option     "debug"                     # [<bool>]
        Identifier  "Card2"
        Driver      "fbdev"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "DefaultRefresh"            # [<bool>]
        #Option     "ModeSetClearScreen"        # [<bool>]
        Identifier  "Card3"
        Driver      "vesa"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Card1"
        Monitor    "Monitor1"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen2"
        Device     "Card2"
        Monitor    "Monitor2"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen3"
        Device     "Card3"
        Monitor    "Monitor3"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

xrandr 로 모니터 지원 해상도를 설정하면 된다는데 어떻게 설정을 해야 하려나..
$ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0 +
   1600x1200      65.0     60.0  
   1680x1050      60.0  
   1680x945       60.0  
   1400x1050      74.9     60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       74.9     59.8  
   1152x864       75.0  
   1280x768       74.9     59.9  
   1024x768       75.0     70.1     60.0
   1024x576       60.0  
   800x600        72.2     75.0     60.3     56.2  
   848x480        60.0  
   640x480        75.0     72.8     60.0  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis) 

Section "Monitor"
  Identifier "Monitor0"
  Modeline "1920x1080_60.00" 82.97 1000 1064 1168 1336 1000 1001 1004 1035 -HSync +Vsync
EndSection

Section "Screen"
  Identifier "Screen0"
  Device "HDMI-1"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00" "1024x768"
  EndSubSection
EndSection 
[링크 : http://samuelmartin.wordpress.com/2012/05/29/enabling-resolutions-in-ubuntu-12-04-lubuntu-12-04/]
[링크 : http://ubuntu.or.kr/viewtopic.php?p=103635

Posted by 구차니
Linux/Ubuntu2013. 7. 10. 14:38
집에 아이피가 공유기를 사용하여 192.168.0.x대로 되어있고
PPTP를 NAT 사용하지 않고 안드로이드 폰으로 연결하는 경우에 대한 설정이다.

일단 서버 아이피는 192.168.0.199로 고정되어 있고
회선은 KT 이므로 DNS는 168.126.63.1 와 168.126.63.2 로 설정하였다.

pptp 사용시 암호는 username / password 이며
공유기에서는 1723 번 포트를 포워딩 해주어야 한다.

$ sudo apt-get install pptpd
$ sudo vi /etc/pptpd.conf
# (Recommended)
localip 192.168.0.199
remoteip 192.168.0.234-238,192.168.0.245 

$ sudo vi /etc/ppp/pptpd-options
# Network and Routing

# If pppd is acting as a server for Microsoft Windows clients, this
# option allows pppd to supply one or two DNS (Domain Name Server)
# addresses to the clients.  The first instance of this option
# specifies the primary DNS address; the second instance (if given)
# specifies the secondary DNS address.
# Attention! This information may not be taken into account by a Windows
# client. See KB311218 in Microsoft's knowledge base for more information.
#ms-dns 10.0.0.1
#ms-dns 10.0.0.2
ms-dns 168.1
26.63.1
ms-dns 168.1
26.63.2  

$ sudo vi /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
username        pptpd   password                * 



혹시나 했지만.. packet forwarding이 설정되지 않으면 안된다.
NAT와는 별개로 포워딩은 켜줘야 PPTP로 전송이 됨.

$ sudo vi /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1 

$ sudo sysctl -p

[링크 : http://prettygom.com/entry/우분투에서-pptp-VPN-설정]


---
안드로이드에서 테스트
PPTP로 설정후


아이디 / 암호를 넣고


접속하면 끝!


상태바에도 올라간다!

 
Posted by 구차니