서버측

$ sudo apt-get install distcc distccmon-gnome

$ sudo vi /etc/default/distcc

STARTDISTCC="true"
ALLOWEDNETS="192.168.1.5/24 127.0.0.1"
LISTENER="192.168.1.5 127.0.0.1"
NICE="10"
JOBS=""
ZEROCONF="false"
 
$ sudo service distcc start
 * Starting Distributed Compiler Daemon: distccd                         [ OK ]

$ ps -ef | grep dist
distccd  18285     1  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18286 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18289 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18290 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18291 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18292 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18293 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
minimonk 18297 17675  0 22:10 pts/1    00:00:00 grep --color=auto dist 

클라이언트 측
$ sudo apt-get install distcc
$ export DISTCC_HOSTS='192.168.1.5 localhost'
$ CC="distcc gcc" ./configure
$ make -j 8 

[링크 : http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_22]

클라이언트에서 make -j 8 하니 서버에서 이렇게 cpu가 올라간다!! 우오오?!


valgrind를 컴파일 하는데 흐음..
네트워크 를 생각외로 많이 사용해 지는거 같기도 하고? (일단은.. 1MB/s 정도?)



gnome으로 된 distcc 모니터는 설정에 관련된 부분은 존재하지 않는다 -_-
$ sudo apt-cache search distcc
ccontrol - Compilation controller
distcc - Simple distributed compiler client and server
distcc-pump - pump mode for distcc a distributed compiler client and server
distccmon-gnome - GTK+ monitor for distcc a distributed client and server
dmucs - distributed compilation system for use with distcc
ubuntu-orchestra-modules-distcc - Modules mainly used by orchestra-management-server

$ distccmon-gnome



아무런 내용이 나오지 않는건.. 호스트 파일이 존재하지 않아서 이려나?
$ sudo distcc --show-hosts
distcc[18944] (dcc_parse_hosts) Warning: /home/minimonk/.distcc/zeroconf/hosts contained no hosts; can't distribute work
distcc[18944] (dcc_zeroconf_add_hosts) CRITICAL! failed to parse host file.

distcc[18944] (dcc_show_hosts) CRITICAL! Failed to get host list 

$ distcc
distcc 3.1 i686-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built Jul 17 2011 15:03:13
Copyright (C) 2002, 2003, 2004 by Martin Pool.
Includes miniLZO (C) 1996-2002 by Markus Franz Xaver Johannes Oberhumer.
Portions Copyright (C) 2007-2008 Google.

distcc comes with ABSOLUTELY NO WARRANTY.  distcc is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Built with Zeroconf support.

Please report bugs to distcc@lists.samba.org

Usage:
   distcc [COMPILER] [compile options] -o OBJECT -c SOURCE
   distcc --help

Options:
   COMPILER                   defaults to "cc"
   --help                     explain usage and exit
   --version                  show version and exit
   --show-hosts               show host list and exit
   -j                         calculate the concurrency level from the host list.

Environment variables:
   See the manual page for a complete list.
   DISTCC_VERBOSE=1           give debug messages
   DISTCC_LOG                 send messages to file, not stderr
   DISTCC_SSH                 command to run to open SSH connections
   DISTCC_DIR                 directory for host list and locks

Server specification:
A list of servers is taken from the environment variable $DISTCC_HOSTS, or
$DISTCC_DIR/hosts, or ~/.distcc/hosts, or /etc/distcc/hosts.
Each host can be given in any of these forms, see the manual for details:

   localhost                  run in place
   HOST                       TCP connection, port 3632
   HOST:PORT                  TCP connection, specified port
   @HOST                      SSH connection
   USER@HOST                  SSH connection to specified host
   --randomize                Randomize the server list before execution

distcc distributes compilation jobs across volunteer machines running
distccd.  Jobs that cannot be distributed, such as linking or
preprocessing are run locally.  distcc should be used with make's -jN
option to execute in parallel on several machines.


$ vi /etc/default/distcc
# Defaults for distcc initscript
# sourced by /etc/init.d/distcc

#
# should distcc be started on boot?
#
# STARTDISTCC="true"

STARTDISTCC="false"

#
# Which networks/hosts should be allowed to connect to the daemon?
# You can list multiple hosts/networks separated by spaces.
# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
# Hosts are represented by a single IP Adress
#
# ALLOWEDNETS="127.0.0.1"

ALLOWEDNETS="127.0.0.1"

#
# Which interface should distccd listen on?
# You can specify a single interface, identified by it's IP address, here.
#
# LISTENER="127.0.0.1"

LISTENER="127.0.0.1"

#
# You can specify a (positive) nice level for the distcc process here
#
# NICE="10"

NICE="10"

#
# You can specify a maximum number of jobs, the server will accept concurrently
#
# JOBS=""

JOBS=""

#
# Enable Zeroconf support?
# If enabled, distccd will register via mDNS/DNS-SD.
# It can then automatically be found by zeroconf enabled distcc clients
# without the need of a manually configured host list.
#
# ZEROCONF="true"

ZEROCONF="false" 

$ vi /etc/distcc/hosts
# As described in the distcc manpage, this file can be used for a global
# list of available distcc hosts.
#
# The list from this file will only be used, if neither the
# environment variable DISTCC_HOSTS, nor the file $HOME/.distcc/hosts
# contains a valid list of hosts.
#
# Add a list of hostnames in one line, seperated by spaces, here.
+zeroconf 
[링크 : http://pointclouds.org/documentation/advanced/distcc.php]


Posted by 구차니
Linux2014. 12. 7. 23:28
와.. 얼마나 갈아 넣어야 이렇게 최적화가 가능할까..
ㄷㄷㄷ

[링크 : http://elinux.org/images/2/2b/Elce11_hart.pdf]

'Linux' 카테고리의 다른 글

expect - shell script  (0) 2014.12.10
tty / pts redirect  (0) 2014.12.09
tar.gz 의 내용은 갱신이.. 안됨  (0) 2014.12.06
tar 퍼미션 유지하기  (0) 2014.12.05
압축풀지 않고 tar 파일 용량 알아내기  (0) 2014.12.02
Posted by 구차니
Linux/Ubuntu2014. 12. 7. 23:02
man 페이지의 저장 경로는..
한군데가 아니라 은근 여러군데 인 듯..

그래도 우분투 계열에서 주로 사용하는 경로는
/usr/share/man
/usr/local/man
/usr/local/share/man 
정도?

$ manpath
/usr/local/man:/usr/local/share/man:/usr/share/man 

$ cat /etc/manpath.config
# manpath.config
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH                     manpath_element
# MANPATH_MAP           path_element    manpath_element
# MANDB_MAP             global_manpath  [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH                      /usr/src/pvm3/man
#
MANDATORY_MANPATH                       /usr/man
MANDATORY_MANPATH                       /usr/share/man
MANDATORY_MANPATH                       /usr/local/share/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
#               *PATH*        ->        *MANPATH*
#
MANPATH_MAP     /bin                    /usr/share/man
MANPATH_MAP     /usr/bin                /usr/share/man
MANPATH_MAP     /sbin                   /usr/share/man
MANPATH_MAP     /usr/sbin               /usr/share/man
MANPATH_MAP     /usr/local/bin          /usr/local/man
MANPATH_MAP     /usr/local/bin          /usr/local/share/man
MANPATH_MAP     /usr/local/sbin         /usr/local/man
MANPATH_MAP     /usr/local/sbin         /usr/local/share/man
MANPATH_MAP     /usr/X11R6/bin          /usr/X11R6/man
MANPATH_MAP     /usr/bin/X11            /usr/X11R6/man
MANPATH_MAP     /usr/games              /usr/share/man
MANPATH_MAP     /opt/bin                /opt/man
MANPATH_MAP     /opt/sbin               /opt/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
#               *MANPATH*     ->        *CATPATH*
#
MANDB_MAP       /usr/man                /var/cache/man/fsstnd
MANDB_MAP       /usr/share/man          /var/cache/man
MANDB_MAP       /usr/local/man          /var/cache/man/oldlocal
MANDB_MAP       /usr/local/share/man    /var/cache/man/local
MANDB_MAP       /usr/X11R6/man          /var/cache/man/X11R6
MANDB_MAP       /opt/man                /var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions.  These are commented out by default as the value
# of the definition is already the default.  To change: uncomment a
# definition and modify it.
#
#DEFINE         pager   pager -s
#DEFINE         cat     cat
#DEFINE         tr      tr '\255\267\264\327' '\055\157\047\170'
#DEFINE         grep    grep
#DEFINE         troff   groff -mandoc
#DEFINE         nroff   nroff -mandoc
#DEFINE         eqn     eqn
#DEFINE         neqn    neqn
#DEFINE         tbl     tbl
#DEFINE         col     col
#DEFINE         vgrind  vgrind
#DEFINE         refer   refer
#DEFINE         grap    grap
#DEFINE         pic     pic -S
#
#DEFINE         compressor      gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE         whatis_grep_flags               -i
#DEFINE         apropos_grep_flags              -iEw
#DEFINE         apropos_regex_grep_flags        -iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 0, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
#
SECTION         1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
#
#---------------------------------------------------------
# Range of terminal widths permitted when displaying cat pages. If the
# terminal falls outside this range, cat pages will not be created (if
# missing) or displayed.
#
#MINCATWIDTH    80
#MAXCATWIDTH    80
#
# If CATWIDTH is set to a non-zero number, cat pages will always be
# formatted for a terminal of the given width, regardless of the width of
# the terminal actually being used. This should generally be within the
# range set by MINCATWIDTH and MAXCATWIDTH.
#
#CATWIDTH       0
#
#---------------------------------------------------------
# Flags.
# NOCACHE keeps man from creating cat pages.
#NOCACHE 

[링크 : http://gsp.com/cgi-bin/man.cgi?section=1&topic=manpath]
Posted by 구차니
Linux2014. 12. 6. 19:39
tar 면은 삭제 + 추가를 통해 갱신이 가능할지 모르겠지만
tar.gz 와 같이 압축된 tar 파일은 갱신이 불가능하다
$ tar --delete mpc8xx_irq.h -f test.tar.gz
tar: 압축된 아카이브를 갱신할 수 없습니다
tar: Error is not recoverable: exiting now 

CPU가 후달리는.. 임베디드에서는
새로 압축하기 무리일 수도 있으니.. 어찌 해결책이 없으려나.. -_ㅠ

[링크 : http://linux.die.net/man/1/tar]
[링크 : http://www.linuxquestions.org/questions/linux-general-1/update-tar-gz-file-564851/]
[링크 : http://unix.stackexchange.com/questions/13093/add-update-a-file-to-an-existing-tar-gz-archive]

'Linux' 카테고리의 다른 글

tty / pts redirect  (0) 2014.12.09
rootfs / 부트 속도 향상하기  (0) 2014.12.07
tar 퍼미션 유지하기  (0) 2014.12.05
압축풀지 않고 tar 파일 용량 알아내기  (0) 2014.12.02
mbr , fdisk, partprobe?  (0) 2014.12.02
Posted by 구차니
Linux2014. 12. 5. 16:15
busybox의 SUID가 풀려서 검색을 해보니 -_-

--no-same-permissions
apply the user's umask when extracting permissions from the archive (default for ordinary users)
 
-p, --preserve-permissions, --same-permissions
extract information about file permissions (default for superuser)
 
[링크 : http://linux.die.net/man/1/tar] 

근데 오락가락 하는거 보면.. 약간은 버그성일지도 모르겠다 ?

[링크 : http://seclists.org/bugtraq/2005/Aug/137]
[링크 : http://comments.gmane.org/gmane.linux.busybox/2683]
Posted by 구차니
프로그램 사용/busybox2014. 12. 5. 14:22
su -c 해서 명령어를 실행시 아래와 같은 에러가 발생하는데
setresgid: Operation not permitted 

해결책은..
$ chmod +s /bin/busybox

su는 SUID 명령으로 다른 사람의 퍼미션으로 변경이 가능해야 하는데
rwsr-sr-s가 아닌
rwxr-xr-x 이면 다른 사람으로 퍼미션으로 변경이 불가능 하므로
위와 같은 에러가 발생한다.

[링크 : https://forum.openwrt.org/viewtopic.php?id=30690]

'프로그램 사용 > busybox' 카테고리의 다른 글

sh: line 1: kill: root: no such pid  (0) 2015.01.05
busybox tftp  (0) 2013.06.18
busybox - setconsole  (0) 2011.10.21
busybox ash "cannot open /dev/ttyAS1: no such device"  (0) 2010.04.20
busybox ps는 BSD 스타일?  (0) 2010.01.12
Posted by 구차니
프로그램 사용/GIMP2014. 12. 3. 20:34
채널 믹서로 해보려는데 잘 안되서

일단 BGR 이미지를 받아
Decompose 하고
다시
Compose 해서 채널을 Red -> Blue / Blue -> Red로 바꾸어 주면 된다.

Step 1. 색상 - 구성 - 분해


Step 2. 걍 귀찮으니 확인


Step 3. 색상 - 구성 - 구성


Step 4. 채널 표시에서 빨강 - 빨강 / 초록 - 초록 / 파랑 - 파랑


Step 5. 채널 표시에서 빨강 - 파랑 / 초록 - 초록 / 파랑 - 빨강으로


Step 6. 쨔잔~


[링크 : http://docs.gimp.org/en/plug-in-decompose-registered.html]
[링크 : http://docs.gimp.org/en/plug-in-compose.html]
Posted by 구차니
Linux2014. 12. 2. 13:59
용량도 미묘하게 다르고..
시간 차이는 없는 것으로 보인다.

$ tar -tvzf rootfs.tar.gz |awk '{ s += $3 } END { print s }'
2014. 12. 02. (화) 13:59:54 KST
472650652
2014. 12. 02. (화) 14:00:06 KST 

$ zcat rootfs.tar.gz |wc -c
2014. 12. 02. (화) 14:00:12 KST
483491840
2014. 12. 02. (화) 14:00:23 KST 

[링크 : http://superuser.com/../find-out-the-size-of-a-tar-gz-archive-in-the-terminal-without-unpacking]
[링크 : http://serverfault.com/questions/9930/get-extracted-size-from-tgz-before-extracting

'Linux' 카테고리의 다른 글

tar.gz 의 내용은 갱신이.. 안됨  (0) 2014.12.06
tar 퍼미션 유지하기  (0) 2014.12.05
mbr , fdisk, partprobe?  (0) 2014.12.02
HPET - High Precision Event Timer / linux  (0) 2014.11.27
timezone  (0) 2014.11.21
Posted by 구차니
Microsoft2014. 12. 2. 13:45
우연일 수도 있고..
내 자리에 전기가 불안정해서 그럴수도 있겠지만

1. putty에 분명 locale이 UTF-8 임에도 불구하고 한글이 깨지기 시작함을 인지
2. Thunderbird 메일 클라이언트에서 한글이 깨지기 시작함 -_-


그래서 리부팅을 하니 복구! -_-
역시.. MS의 최고 기술력은 리부팅시 복구되는 것일지도 -_-


잡솔 : 아마도 메모리에 캐싱된 폰트 영역이 손상되면서 기본 폰트로 나오거나 한 것 같긴한데..  

'Microsoft' 카테고리의 다른 글

MVVM - Model-View-ViewModel  (0) 2018.04.24
랜섬웨어 대응법... 일려나?  (0) 2016.03.28
extendable vhd에서 fixed vhd로 변환하기  (0) 2013.10.27
Vista 와 Win7의 점수차이  (0) 2011.08.13
windows 암호깨는 프로그램  (0) 2011.06.13
Posted by 구차니
Linux2014. 12. 2. 08:52
강제로 mbr을 갈아 엎으면
fdisk로 들어가서 정보가 보이는데
w를 해서 저장을 하지 않고  q로 나오면은 
커널에서도 변경된 파티션으로 인식하지 못하는 문제가 있다.

이를 해결하기 위해서는 멀 해야 하려나 -_- 

minimonk@devmini:~/nfs/Ver1.0.1.12$ sudo fdisk /dev/sdb

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Partition number (1-4): 2

Command (m for help): d
Selected partition 3

Command (m for help): p

Disk /dev/sdb: 1977 MB, 1977614336 bytes
61 heads, 62 sectors/track, 1021 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x37168ace

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks. 

minimonk@devmini:~/nfs/Ver1.0.1.12$  sudo dd if=./mbr.imx283 of=/dev/sdb
1+0 레코드 들어옴
1+0 레코드 나감
512 바이트 (512 B) 복사됨, 0.00272973 초, 188 kB/초 

minimonk@devmini:~/nfs/Ver1.0.1.12$ dmesg | tail
[420014.024095] sd 38:0:0:0: [sdb] No Caching mode page found
[420014.024112] sd 38:0:0:0: [sdb] Assuming drive cache: write through
[420014.026165]  sdb: 

minimonk@devmini:~/nfs/Ver1.0.1.12$ sudo fdisk /dev/sdb

Command (m for help): q

minimonk@devmini:~/nfs/Ver1.0.1.12$ dmesg | tail
[420014.024095] sd 38:0:0:0: [sdb] No Caching mode page found
[420014.024112] sd 38:0:0:0: [sdb] Assuming drive cache: write through
[420014.026165]  sdb: 

minimonk@devmini:~/nfs/Ver1.0.1.12$ sudo fdisk /dev/sdb

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

minimonk@devmini:~/nfs/Ver1.0.1.12$ dmesg | tail
[420091.481789] sd 38:0:0:0: [sdb] No Caching mode page found
[420091.481807] sd 38:0:0:0: [sdb] Assuming drive cache: write through
[420091.483255]  sdb: sdb1 sdb2 sdb3 

음.. 그냥.. fdisk를 EOF로 해서 w 하도록 해야하나 -_-
2014/04/11 - [Linux] - 리눅스 쉘 스크립트 << EOF 를 이용해서 자동화 하기

partprobe 라는걸 해봤지만.. 안되네..

[링크 : http://2factor.tistory.com/49
[링크 : http://faq.hostway.co.kr/Linux_ETC/4528
[링크 : http://linux.die.net/man/8/partprobe]  

---
오!! 된다!!!
$ sudo hdparm -z /dev/sdb

/dev/sdb:
 re-reading partition table

minimonk@devmini:~/nfs/Ver1.0.1.12$ dmesg | tail
[437273.173713] sd 44:0:0:0: [sdb] No Caching mode page found
[437273.173729] sd 44:0:0:0: [sdb] Assuming drive cache: write through
[437273.175179]  sdb: sdb1 sdb2 sdb3


[링크: http://serverfault.com/questions/36038/reread-partition-table-without-rebooting ]

'Linux' 카테고리의 다른 글

tar 퍼미션 유지하기  (0) 2014.12.05
압축풀지 않고 tar 파일 용량 알아내기  (0) 2014.12.02
HPET - High Precision Event Timer / linux  (0) 2014.11.27
timezone  (0) 2014.11.21
dd 출력파일 자르지 않기  (0) 2014.11.20
Posted by 구차니