조금 오래된 기사인데..

먼가 졸지에 정신병이 생긴 기분?


[링크 : http://www.imaeil.com/sub_news/sub_news_view.php?news_id=7713&yy=2017]

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

AMD 라이젠(zen) 프로세서 발표  (0) 2017.03.05
환공어묵  (0) 2017.02.23
운전하다가 드는 뻘생각  (0) 2017.02.16
출퇴근 길 2층 버스...  (0) 2017.02.15
하이마트 놀러가서... 카메라 만져보니  (0) 2017.02.14
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 2. 17. 20:11

gcc 에서는 설정이 존재하는데

영 찾아도 설정이 안보이네


[링크 : http://www.avrfreaks.net/forum/bootloader-atmega168-using-iar-compiler]


-h 옵션은 XLINK 라는 녀석에게 먹이는건데 도대체 어떻게 주는거야...

[링크 : http://www.atmel.com/Images/doc1079.pdf]

[링크 : http://supp.iar.com/FilesPublic/UPDINFO/005316/xlink.ENU.pdf]



+

_..X_FLASH_BASE 는 링커에서 넘겨주는 것 같은데

아무튼. 이 값을 기준으로 (문제는 0x000 이라는거지만) 세그먼트들의 위치가 정해지는데

문제는

-h(CODE)0-(_..X_INTVEC_SIZE-1) 

를 통해서 0x000 으로 부터 정렬하도록 되어 있어서

?FILL1 세그먼트가 생겨난다는거.. 그래서 홀로 떵그러니 0x0000 에서 존재하는데 문제가 안되려나...

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avr bod(Brown out Detect)  (0) 2017.08.11
avr pwm 관련  (0) 2017.04.19
avr hex start addres 다시 설정이 가능할까?  (0) 2017.02.12
우리로봇기술 사이트 폐쇄  (0) 2016.08.24
avr iar __flash winavr PROGMEM  (0) 2016.07.06
Posted by 구차니

주중에 월차내고



'개소리 왈왈 > 사진과 수다' 카테고리의 다른 글

삐라 획득!  (0) 2017.02.27
견생 그렇지 머  (2) 2017.02.26
EOS M 1년 남짓한 컷수..  (0) 2017.02.16
내가 예민한거 였을까?  (2) 2016.10.30
굿바이 USB 케이블  (0) 2016.10.17
Posted by 구차니

1. 요즘 들어 내 눈이 나쁘진건가..

그럴리는 없고... 솔찍히 구분은 안가지만 HID인지 고휘도 LED 인지

눈은 부신데 밝지는 않은 망할 조명들. 조금은 색온도 낮추는게 더 좋을거 같은데

틴팅한 차들 치고 LED가 위로 치켜뜨지 않은게 드물어서

이게 기본 셋팅인진 모르겠지만 언젠가 부터

마주오는 놈들 눈뽕에 똥고 찌르는 놈들 눈뽕 갈수록 심해지는 듯



2. 안개도 안꼈는데 왜 안개등을?

안개등은 확산빔이라 눈뽕 지대로인데.. 왜 켜놓지..

전기도 많이 먹어서 경차에서 그거 켜보면 전력부족해서 RPM도 팍팍 더 올리던데..




3. 망할 DRL -_-

주간용이라 밝은데다가 확산빔 -_-

근데 밝아서 라이트 안켜고 다니는 사람들도 꽤 많다는게 함정이고

DRL이 시동걸면 대개 바로 켜지다 보니.. 야간에도 맞은편에서 DRL 때문에 눈부시는 지랄 같은 상황 ㅠㅠ

조도센서랑 연동해서 밤되면 꺼지던가 시계랑 연동을 해서 꺼지던가 좀 하지

상시 켜놓으니 운전하기 점점 짜증.






머.. 전반적으로 라이트가 강해져서 생기는 반대급부인데

어두운 곳에서 조명이 더 세짐으로서 암순응에 역효과가 생겨서

밝지 않게 운전하던 사람들이나 눈이 예민한 나 같은 사람들은

정말 야간 운전은 한 5년 전과 비교해서 더더욱 못해먹을 느낌 ㅠㅠ




+

글찾다 보니 DRL이 안개등 켜면 꺼진다는 글도 보이네..

[링크 : http://naver.me/GKGYTqHv]

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

환공어묵  (0) 2017.02.23
파국화?  (0) 2017.02.18
출퇴근 길 2층 버스...  (0) 2017.02.15
하이마트 놀러가서... 카메라 만져보니  (0) 2017.02.14
소득공제 돌려보니 뱉으라네?!?!? ㅠㅠ  (0) 2017.01.31
Posted by 구차니

작년 4월에 구매한 EOS M

일년도 채 되지 않았는데 동영상이랑 db 파일이랑 제외하면 5천장 정도 찍은듯

많이도 찍었다.. 인가 조금 밖에 안 찍었다 인가...



파일 번호로는.. 6200 장 인가? ㄷㄷ

IMG_0771.JPG

IMG_6944.JPG

'개소리 왈왈 > 사진과 수다' 카테고리의 다른 글

견생 그렇지 머  (2) 2017.02.26
역 그리고 나들이(흑백 사진)  (0) 2017.02.16
내가 예민한거 였을까?  (2) 2016.10.30
굿바이 USB 케이블  (0) 2016.10.17
쌍무지개  (0) 2016.08.29
Posted by 구차니
embeded/raspberry pi2017. 2. 15. 20:30

근데.. gpio 포트번호는 어떻게 매칭이 되는거지?


export에 값을 주어야 노드가 생성된다.

$ echo 11 > /sys/class/gpio/export 

$ echo out > /sys/class/gpio/gpio11/direction

$ echo 1 > /sys/class/gpio/gpio11/value

$ echo 0 > /sys/class/gpio/gpio11/value


$ echo 11 > /sys/class/gpio/unexport  

[링크 : https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio]

[링크 : https://www.kernel.org/doc/Documentation/gpio/sysfs.txt]


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

Posted by 구차니
Linux2017. 2. 15. 19:31

약간 다른 상황이지만..

임베디드 리눅스에서 minicom도 없고 screen도 없어서

순수(?) 터미널로만 받는 방법 찾게 됨

 

stty -speed 19200 -f /dev/ttyS1

 

echo -ne '\033[2J' > /dev/ttyS1

cat -v < /dev/ttyS1 

[링크 : http://unix.stackexchange.com/questions/117037/how-to-send-data-to-a-serial-port-and-see-any-answer]

 

일단 안되서! 명령어 도움말을 보니

# stty --help

BusyBox v1.20.2 (2015-12-21 15:35:08 KST) multi-call binary.

 

Usage: stty [-a|g] [-F DEVICE] [SETTING]...

 

Without arguments, prints baud rate, line discipline,

and deviations from stty sane

 

        -F DEVICE       Open device instead of stdin

        -a              Print all current settings in human-readable form

        -g              Print in stty-readable form

        [SETTING]       See manpage 

 

# stty -a -F /dev/ttyAMA2

speed 9600 baud;stty: /dev/ttyAMA2

 line = 0;

intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;

eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;

werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;

-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts

-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff

-iuclc -ixany -imaxbel -iutf8

opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0

isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt

echoctl echoke 

 

# stty -F /dev/ttyAMA2 speed 115200

9600 

 

# stty -a -F /dev/ttyAMA2

speed 115200 baud;stty: /dev/ttyAMA2

 line = 0;

intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;

eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;

werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;

-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts

-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff

-iuclc -ixany -imaxbel -iutf8

opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0

isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt

echoctl echoke 

 

putty에서 시리얼 열어 놓고

baudrate 맞추고 하니 잘 된다.

다만.. 232가 아닌 485라.. RX만 확인하고 TX는 아직 미확인 ㅠㅠ

 

 

+

바로 종료되서 글씨가 안나오면 아래와 같이 타임아웃 시간을 늘려주는 것이 방법이다.

# stty -F /dev/ttyAMA2 min 0 time 10 

 

[링크 : http://stackoverflow.com/questions/6713668/how-i-can-read-tty-file-with-timeout]

 

 

+

2021.02.18

부등호 방향에 유의 ㅠㅠ

stty 115200 < /dev/ttyS0

[링크 : https://iam777.tistory.com/490]

'Linux' 카테고리의 다른 글

wget 로그인 정보 설정  (0) 2017.04.17
원격지 mac address 얻기  (0) 2017.03.13
리눅스 파일 시간관련  (0) 2017.01.01
ctime mtime.. 엌?!  (0) 2016.12.31
base64 유틸리티  (0) 2016.12.28
Posted by 구차니

운이 좋은건지 모르겠지만.. 출퇴근 길에 2층 버스가 1대 도입되서 타고 다니는데

요즘 늑장이 늘었는지 매번 2층 버스 타는 기행(?)을 벌어지는 중...

아무튼 2층 버스 첨에는 신기한데 탈수록 불만인게 늘어나는 중



1. 낮아!!!

내 키가 168인데 2층에서는 머리카락 닿는 느낌 170 넘으면 무릎을 굽혀야 할 듯?

(참고로 캔버스 같은 바닥이 얕은 녀석이라  정말 끽해야 172cm 정도 높이가 될 느낌)

1층은 180cm 넘으면 상당히 괴로울 낮은 높이


2. 눈부셔!!!

망할 LED 등에 천장이 낮은 문제의 결합으로, 자려고 하기에는 드럽게 밝다 -_-

모자달린 잠바는 필수!


3. 좁아!!!

일단 세보진 않았지만 1층 약 15 좌석 2층 55석 정도 합쳐서 70석 정도 될거 같은데

1층 버스가 45명 뜨는거 봐서는 한 좌석 자리가 좁은건 안봐도 비디오

그래서 패딩까지 입고 나만큼 덩치 큰 남자 둘이 앉으면 보기 괴로울 정도 -_ㅠ


4. 느려!!!

자면서 가다 보니 대충 시간이나 급 커브 지역을 기준으로 깨는데.. 확실히 시간으로 깨면 덜 감..

속도제한이 걸린건지 아직 새차라 그런지 차고가 높아서 그런지 1층 버스 보다 얌전히 운전하심


5. 앞자리가 명당이 아냐!!!

1층은 좁고(벽쪽에 전광판등으로 인해 창턱에 손을 못 걸치니) 2층은... 춥고 앞이 좁다

그래서 처음에는 다들 신기해서 그 자리에 먼저 타더니 이제 두달 지나니 가장 늦게차는 편




개인적으로 눈부신데 좁은게 치명타



다만 장점은...

1. 부드럽게 달림

속도가 느리게 달리는것과 연관이 있는거 같은데, 2층에서도 확실히 출렁이거나 덜컹이는게 적다.

완충장치가 더 좋은건가...



적고보니 단점만 느껴지는 기분이네 ㅋㅋㅋ


Posted by 구차니

생각을 해보니..

차단될때 마다 blacklist 파일에 추가해주면

다음번 재시작 시에 blacklist를 보고 자동으로 DROP 하도록 되어 있으니

REJECT 하는 자동 차단이랑 섞어서 쓰면 쓸만할지도?!


$ cat /etc/fail2ban/action.d/iptables-multiport24.conf

actionban = iptables -I fail2ban-<name> 1 -s <ip>/24 -j <blocktype>

            echo <ip> >> /etc/fail2ban/ip.blacklist 


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

fail2ban ssh 차단 실패???  (0) 2017.03.06
fail2ban phpmyadmin  (0) 2017.02.28
fail2ban 차단 관련...  (0) 2017.02.09
ssh 로그인 보안 - fail2ban  (4) 2017.02.08
apache ip deny  (0) 2017.02.08
Posted by 구차니
Linux/Ubuntu2017. 2. 15. 14:50

음.. 프로세스 별로 처리인가?

유저별로 제한이라던가 하는 기능은 없나보네..


$ cpulimit

Error: You must specify a target process

CPUlimit version 2.1

Usage: cpulimit TARGET [OPTIONS...] [-- PROGRAM]

   TARGET must be exactly one of these:

      -p, --pid=N        pid of the process

      -e, --exe=FILE     name of the executable program file

                         The -e option only works when

                         cpulimit is run with admin rights.

      -P, --path=PATH    absolute path name of the

                         executable program file

   OPTIONS

      -b  --background   run in background

      -c  --cpu=N        override the detection of CPUs on the machine.

      -l, --limit=N      percentage of cpu allowed from 1 up.

                         Usually 1 - 400, but can be higher

                         on multi-core CPUs (mandatory)

      -q, --quiet        run in quiet mode (only print errors).

      -k, --kill         kill processes going over their limit

                         instead of just throttling them.

      -r, --restore      Restore processes after they have

                         been killed. Works with the -k flag.

      -s, --signal=SIG   Send this signal to the watched process when cpulimit exits.

                         Signal should be specificed as a number or

                         SIGTERM, SIGCONT, SIGSTOP, etc. SIGCONT is the default.

      -v, --verbose      show control statistics

      -z, --lazy         exit if there is no suitable target process,

                         or if it dies

          --             This is the final CPUlimit option. All following

                         options are for another program we will launch.

      -h, --help         display this help and exit 


[링크 : http://cpulimit.sourceforge.net/]

[링크 : https://www.howtoforge.com/how-to-limit-cpu-usage-with-cpulimit-on-ubuntu-linux]

[링크 : https://www.digitalocean.com/community/tutorials/how-to-limit-cpu-usage-on-ubuntu-12-10]

[링크 : http://manpages.ubuntu.com/manpages/precise/man1/cpulimit.1.html]



+

ulimit을 통해 전체 시스템에 대해서 일괄적으로 cpu및 메모리 등의 용량 제한을 걸 수 있는 듯?


[링크 : http://www.linuxquestions.org/questions/linux-server-73/how-to-limit-the-users-cpu-usage-617928/]

    [링크 : http://www.linuxquestions.org/questions/debian-26/how-to-limit-the-cpu-usage-per-user-715490/]

[링크 : http://stackoverflow.com/questions/437433/limit-the-memory-and-cpu-available-for-a-user-in-linux]

[링크 : https://linux.die.net/man/3/ulimit]


<item>

core

limits the core file size (KB)

data

maximum data size (KB)

fsize

maximum filesize (KB)

memlock

maximum locked-in-memory address space (KB)

nofile

maximum number of open files

rss

maximum resident set size (KB) (Ignored in Linux 2.4.30 and higher)

stack

maximum stack size (KB)

cpu

maximum CPU time (minutes)

nproc

maximum number of processes

as

address space limit (KB)

maxlogins

maximum number of logins for this user except for this with uid=0

maxsyslogins

maximum number of all logins on system

priority

the priority to run user process with (negative values boost process priority)

locks

maximum locked files (Linux 2.4 and higher)

sigpending

maximum number of pending signals (Linux 2.6 and higher)

msgqueue

maximum memory used by POSIX message queues (bytes) (Linux 2.6 and higher)

nice

maximum nice priority allowed to raise to (Linux 2.6.12 and higher) values: [-20,19]

rtprio

maximum realtime priority allowed for non-privileged processes (Linux 2.6.12 and higher) 


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

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

cgroups  (0) 2017.08.24
리눅스 하드 절전 설정  (0) 2017.05.23
우분투 루트 인증서 업데이트 내역  (0) 2017.01.18
우분투 창 관리 - 윈7처럼 창분할 단축키  (0) 2017.01.09
crontab 과 cron 서비스 reload  (0) 2017.01.04
Posted by 구차니