'잡동사니'에 해당되는 글 13412건

  1. 2014.12.11 VNC web 버전?
  2. 2014.12.10 qt dialog / webkit 연동
  3. 2014.12.10 mmu와 rtos
  4. 2014.12.10 expect - shell script
  5. 2014.12.09 distcc 작동모드
  6. 2014.12.09 tty / pts redirect
  7. 2014.12.09 printf POSIX 확장 %1$d
  8. 2014.12.08 ccache & distcc
  9. 2014.12.08 distcc on ubuntu
  10. 2014.12.07 rootfs / 부트 속도 향상하기
프로그램 사용/VNC2014. 12. 11. 09:32
HTML5 / websocket을 이용한다는데
쓸만한지 클라이언트측 부하는 얼마나 걸릴지 체크할 필요는 있어보인다.


[링크 : http://stackoverflow.com/questions/3240633/web-based-vnc-client]
    [링크 : http://kanaka.github.io/noVNC/]
    [링크 : http://guac-dev.org/]
[링크 : https://chrome.google.com/webstore/detail/vnc%C2%AE-viewer-for-google-ch/...a] 크롬 확장

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

rfb(remote framebuffer) protocol  (0) 2022.01.26
gconf-editor / ubuntu 14.04 LTS vino + VNC 접속불가  (0) 2015.03.22
VNC 5.0.5  (0) 2013.09.04
tsclient에 VNC 추가하기  (0) 2011.12.31
UVNC - Ultra VNC  (2) 2010.11.26
Posted by 구차니
Programming/qt2014. 12. 10. 22:42
QT 다이얼로그 자체를 편리하게 웹으로 바로 출력하는 건 없고
Dialog에 webkit을 불러 사용하는 방법 정도다 -_ㅠ

하긴.. 다이얼로그를 변환없이 바로 웹으로 출력이 되면 그건 혁명이지..



실제로 가능한진 실제로 구현해 봐야겠지만
Qtwui나
QtWebkit 도 있는데 대부분 검색으로 나오는건 Diaglog에 웹 브라우저를 넣는것이 대부분인 것으로 보인다.

[링크 : http://ariya.ofilabs.com/2011/10/hybrid-nativeweb-using-dialog-boxes.html]
[링크 : http://qt-project.org/doc/qt-4.8/qwebframe.html#addToJavaScriptWindowObject
[링크 : http://qt-project.org/doc/qt-4.8/qtwebkit-bridge.html ]

'Programming > qt' 카테고리의 다른 글

qt webkit javascript 엔진 V8로 교체하기?  (0) 2014.12.11
Qt for Embedded Linux 와 VNC  (0) 2014.12.11
qt signal & slot - connect / disconnect / emit  (0) 2014.11.21
qt 프로젝트 파일 연관  (0) 2014.11.20
QT font 관련  (0) 2014.11.06
Posted by 구차니
embeded2014. 12. 10. 20:06
MMU는 Memory Management Unit
RTOS는 Real Time OS 인데 ucLinux 에서 MMU 없이 RTOS에 가깝게 구현하다 보니
헷갈리는게 있는건가 싶기도 한데..

[링크 : http://en.wikipedia.org/wiki/Memory_management_unit]
[링크 : http://en.wikipedia.org/wiki/Real-time_operating_system]

일단 MMU가 없으면 가상주소를 쓸수 없어 물리 주소를 바로 맵핑하기에
context switching에 장점이 있을수 있다고 한다.
암튼, MMU가 없다고 RTOS 인건 아닌데 도대체 어디서 헷갈린걸까 -_-

[링크 : https://kldp.org/node/63733]
[링크 : http://xenostudy.tistory.com/10]
[링크 : http://www.freertos.org

uclinux는 micro-computer linux로
MMU가 없는 마이크로 프로세서에 대한 linux port 라고 한다.
[링크 : http://www.uclinux.org/ ]

'embeded' 카테고리의 다른 글

PowerQUICC  (0) 2015.04.02
S29AL016J 플래시 메모리 BYTE/WORD MODE  (0) 2014.12.23
ltib / rc.conf  (0) 2014.11.24
Z80 M6800  (0) 2014.01.27
기즈모 스피어 / 라즈베리 파이  (0) 2014.01.02
Posted by 구차니
Linux2014. 12. 10. 09:34
옆 사람에게 듣게 된 녀석인데..
과거(?) 이야기나 통신프로그램에서 자동응답 하듯
리눅스 쉘에 나오는 글씨에 대해서 반응하는 스크립트를 작성할수 있는 녀석

예를들어
expect로
login: 이라는 것과 password: 라는 것에
자동으로 아이디와 비밀번호를 넣어 줄수 있다고 한다!!!

[링크 : http://linux.die.net/man/1/expect]
[링크 : http://en.wikipedia.org/wiki/Expect]

[링크 : http://ktdsoss.tistory.com/151
[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=791984&mid=lecture_tip

'Linux' 카테고리의 다른 글

플래시용 파일 시스템과 EXT4  (0) 2014.12.14
TTY / PTS 약자  (0) 2014.12.14
tty / pts redirect  (0) 2014.12.09
rootfs / 부트 속도 향상하기  (0) 2014.12.07
tar.gz 의 내용은 갱신이.. 안됨  (0) 2014.12.06
Posted by 구차니
gss-api (Generic Security Services Application Program Interface)
안전하게 소스코드를 공유해서 분산빌드 하는데 필요한 API

distcc 의 모드
plain - distcc를 구동하는 쪽(client)에서 pre-processor를 처리후 원격지에서 컴파일 / 어셈블리
           결과물만 돌려받고 로컬에서 링킹
pump - 원격지(distcc 서버)에서 pre-processor / 컴파일 / 어셈블리까지 처리

ccache 와 pump동시 사용불가

구성방법은
distcc
ccache + distcc
pump + distcc 이나
include path 등의 문제로 인해 distcc 단독으로 사용하거나 ccache + distcc 정도가 무난할 것으로 생각된다.


HOW PLAIN (NON-PUMP) DISTCC WORKS
distcc only ever runs the compiler and assembler remotely. With plain distcc, the preprocessor must always run locally because it needs to access various header files on the local machine which may not be present, or may not be the same, on the volunteer. The linker similarly needs to examine libraries and object files, and so must run locally.
The compiler and assembler take only a single input file (the preprocessed source) and produce a single output (the object file). distcc ships these two files across the network and can therefore run the compiler/assembler remotely.
Fortunately, for most programs running the preprocessor is relatively cheap, and the linker is called relatively infrequent, so most of the work can be distributed.
distcc examines its command line to determine which of these phases are being invoked, and whether the job can be distributed.
 
HOW DISTCC-PUMP MODE WORKS
In pump mode, distcc runs the preprocessor remotely too. To do so, the preprocessor must have access to all the files that it would have accessed if had been running locally. In pump mode, therefore, distcc gathers all of the recursively included headers, except the ones that are default system headers, and sends them along with the source file to the compilation server.
In distcc-pump mode, the server unpacks the set of all source files in a temporary directory, which contains a directory tree that mirrors the part of the file system that is relevant to preprocessing, including symbolic links.
The compiler is then run from the path in the temporary directory that corresponds to the current working directory on the client. To find and transmit the many hundreds of files that are often part of a single compilation, pump mode uses an incremental include analysis algorithm. The include server is a Python program that implements this algorithm. The pump command starts the include server so that throughout the build it can answer include queries by distcc commands.
The include server uses static analysis of the macro language to deal with conditional compilation and computed includes. It uses the property that when a given header file has already been analyzed for includes, it is not necessary to do so again if all the include options (-I's) are unchanged (along with other conditions).
For large builds, header files are included, on average, hundreds of times each. With distcc-pump mode each such file is analyzed only a few times, perhaps just once, instead of being preprocessed hundreds of times. Also, each source or header file is now compressed only once, because the include server memoizes the compressed files. As a result, the time used for preparing compilations may drop by up to an order of magnitude over the preprocessing of plain distcc.
Because distcc in pump mode is able to push out files up to about ten times faster, build speed may increase 3X or more for large builds compared to plain distcc mode.

RESTRICTIONS FOR PUMP MODE
Using pump mode requires both client and servers to use release 3.0 or later of distcc and distccd (respectively).
The incremental include analysis of distc-pump mode rests on the fundamental assumption that source and header files do not change during the build process. A few complex build systems, such as that for Linux kernel 2.6, do not quite satisfy this requirement. To overcome such issues, and other corner cases such as absolute filepaths in includes, see the include_server(1) man page.
Another important assumption is that the include configuration of all machines must be identical. Thus the headers under the default system path must be the same on all servers and all clients. If a standard GNU compiler installation is used, then this requirement applies to all libraries whose header files are installed under /usr/include or /usr/local/include/. Note that installing software packages often lead to additional headers files being placed in subdirectories of either.
If this assumption does not hold, then it is possible to break builds with distcc-pump mode, or worse, to get wrong results without warning. Presently this condition is not verified, and it is on our TODO list to address this issue.
An easy way to guarantee that the include configurations are identical is to use a cross-compiler that defines a default system search path restricted to directories of the compiler installation.
See the include_server(1) manual for more information on symptoms and causes of violations of distcc-pump mode assumptions. 

USING DISTCC WITH CCACHE
ccache is a program that speeds software builds by caching the results of compilations. ccache is normally called before distcc, so that results are retrieved from a normal cache. Some experimentation may be required for idiosyncratic makefiles to make everything work together.
The most reliable method is to set

CCACHE_PREFIX="distcc"
This tells ccache to run distcc as a wrapper around the real compiler. ccache still uses the real compiler to detect compiler upgrades.
ccache can then be run using either a masquerade directory or by setting

CC="ccache gcc"
As of version 2.2, ccache does not cache compilation from preprocessed source and so will never get a cache hit if it is run from distccd or distcc. It must be run only on the client side and before distcc to be any use.
distcc's pump mode is not compatible with ccache.

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


[링크 : http://www.rasplay.org/?p=8567]
[링크 : http://en.m.wikipedia.org/wiki/Generic_Security_Services_Application_Program_Interface]

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

distcc 크로스 컴파일/커널 빌드 관련  (0) 2016.09.13
distcc 로 valgrind-3.6.1 컴파일 실패?  (0) 2014.12.12
ccache & distcc  (0) 2014.12.08
distcc on ubuntu  (0) 2014.12.08
distcc - 네트워크 분산 컴파일  (2) 2010.03.04
Posted by 구차니
Linux2014. 12. 9. 11:25
사용중인 콘솔이 강제 종료 되면서 붕 떠버린 작업이 되어버린 경우
이 작업을 다시 끌어 와야 할 필요가 있는데.. tty redirection을 통해
끊거나 끌어 올수가 있다고 한다.

screen 명령을 통하면
screen으로 떨어 낸것만 다시 데려 올수 있으나

tty redirection으로는 screen을 쓰지 않는 것 까지도 끌어 올수 있다고 하니
더 유용할 것 으로 생각된다.

되는지는 테스트 후 다시 수정..

[링크 : http://superuser.com/./redirect-input-from-one-terminal-to-another]
[링크 : http://stackoverflow.com/./redirect-the-stdin-to-come-from-a-different-terminal-using-bash]
[링크 : http://stackoverflow.com/./redirect-stderr-stdout-of-a-process-after-its-been-started-using-command-lin]

'Linux' 카테고리의 다른 글

TTY / PTS 약자  (0) 2014.12.14
expect - shell script  (0) 2014.12.10
rootfs / 부트 속도 향상하기  (0) 2014.12.07
tar.gz 의 내용은 갱신이.. 안됨  (0) 2014.12.06
tar 퍼미션 유지하기  (0) 2014.12.05
Posted by 구차니
Programming/C Win32 MFC2014. 12. 9. 11:07
printf 에서 POSIX 확장기능인데
즉.. 리눅스나 유닉스만 되려나? 윈도우에서 될거 같진 않은데..

아무튼 몇번째 변수를 출력하냐 라는 기능
다국어 번역이라던가 (어순이 바뀔 경우)
하나의 변수로 여러번 출력할때 라던가 유용할 듯
CharacterDescription
n$ n is the number of the parameter to display using this format specifier, allowing the parameters provided to be output multiple times, using varying format specifiers or in different orders. If any single placeholder specifies a parameter, all the rest of the placeholders MUST also specify a parameter. This is a POSIXextension and not in C99. Example: printf("%2$d %2$#x; %1$d %1$#x",16,17) produces

"17 0x11; 16 0x10"


[링크 : http://en.wikipedia.org/wiki/Printf_format_string]

'Programming > C Win32 MFC' 카테고리의 다른 글

#ifdef 와 #ifdef ()의 차이  (0) 2015.04.13
winUSB / win32 physical drive  (0) 2014.12.23
include guard  (0) 2014.11.05
vc++ vector와 Vector 차이점?  (0) 2014.07.03
순열생성관련  (0) 2014.06.27
Posted by 구차니
distcc는 단순하게(?) 분산 컴파일을 하는 녀석이고
ccache은 distcc시 컴파일 된 것을 캐싱해서 중복컴파일 하지 않도록 해준다는데.
아무튼 두개를 같이 쓰지 하나만 독립적으로 쓰는건 드물다고 한다.

그런데.. ccache -C와 같이 캐싱된걸 지우는게 가끔 필요한 것으로 봐서는
캐싱하고 문제가 생길 바에는 조금 느려도 매번 distcc만 사용해서 쌩으로 컴파일 하는게 나을지도 모르겠다.

[링크 : http://whatwant.tistory.com/421]
[링크 : https://ccache.samba.org/]

distcc pump mode
[링크 : http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html]
Posted by 구차니
서버측

$ 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 구차니