Linux2015. 1. 22. 13:25

ntp의 목록 회람(?)기능으로 엄청난 udp 패킷을 생성시켜 DDoS로 사용되는 기능

물론 원래 그러라고 만든게 아니다~


[링크 : http://www.dailysecu.com/news_view.php?article_id=6121]

'Linux' 카테고리의 다른 글

LD_SHOW_AUXV  (0) 2015.02.10
cpu 활성화 기능 확인하기  (0) 2015.02.06
top manpage  (0) 2014.12.30
스크립트 상대경로를 절대경로로 변환하기  (0) 2014.12.30
lightdm 실행하지 않도록 하기  (0) 2014.12.24
Posted by 구차니
Linux/Ubuntu2015. 1. 12. 17:59

분명히 존재하는 녀석인데 안되서 멘붕 -_-

찾아보니.. libc6-i386 과 같이

64bit OS에 32bit 실행환경을 추가해주면 된다고 하니 실험은 해봐야지..


---

헐.. 레알이다?!?!?!

$ sudo apt-get install libc6-i386

$ ./arm-fsl-linux-gnueabi-gcc

arm-fsl-linux-gnueabi-gcc: no input files



$ sudo apt-get remove libc6-i386

$ ./arm-fsl-linux-gnueabi-gcc

bash: ./arm-fsl-linux-gnueabi-gcc: No such file or directory



[링크 : http://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists]

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

intel 내장형 SATA RAID 컨트롤러 /dev/mapping  (0) 2015.02.11
ld.so ?  (0) 2015.02.11
ssh 로그인시 apt-check 프로세스 cpu 점유  (0) 2014.12.24
manpath  (0) 2014.12.07
ctrl - alt - t 로 터미널 실행  (0) 2014.09.04
Posted by 구차니
Linux2014. 12. 30. 22:06

top을 보다가 cpu 상태 정보의 내용이 궁금해져서 조사..

Cpu(s):  0.2%us,  0.2%sy,  0.0%ni, 99.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

user / system / low nice / idle / io wait / hard IRQ / soft IRQ / steal

가장 큰 비중을 차지 할 앞의 두개 정도를 더하면 실제 사용량이라고 해야하나

아니면 100% 에서 세번째 idle을 뺀걸 보면 되려나?

그리고 DomU라.. 가상화 쓸 경우에 대해서는 따로 잡히는 건가 보네..


2c. SUMMARY Area Fields

The summary area fields describing CPU statistics are abbreviated. They provide information about times spent in: us = user mode sy = system mode ni = low priority user mode (nice) id = idle task wa = I/O waiting hi = servicing IRQs si = servicing soft IRQs st = steal (time given to other DomU instances)



1을 누르면 top도 cpu별로 점유율을 볼 수 있다!

3b. SUMMARY Area Commands

The summary area interactive commands are always available in both full-screen mode and alternate-display mode. They affect the beginning lines of your display and will determine the position of messages and prompts.

These commands always impact just the 'current' window/field group. See topic 4. ALTERNATE-DISPLAY Mode and the 'G' interactive command for insight into 'current' windows and field groups.


'l' :Toggle_Load_Average/Uptime -- On/Off

This is also the line containing the program name (possibly an alias) when operating in full-screen mode or the 'current' window name when operating in alternate-display mode.

'm' :Toggle_Memory/Swap_Usage -- On/Off

This command affects two summary area lines.

't' :Toggle_Task/Cpu_States -- On/Off

This command affects from 2 to many summary area lines, depending on the state of the '1' toggle and whether or not top is running under true SMP.

'1' :Toggle_Single/Separate_Cpu_States -- On/Off

This command affects how the 't' command's Cpu States portion is shown. Although this toggle exists primarily to serve massively-parallel SMP machines, it is not restricted to solely SMP environments.

When you see 'Cpu(s):' in the summary area, the '1' toggle is On and all cpu information is gathered in a single line. Otherwise, each cpu is displayed separately as: 'Cpu0, Cpu1, ...' 





[링크 : http://linux.die.net/man/1/top]

2010/09/12 - [Linux] - top (1) - load average ?


'Linux' 카테고리의 다른 글

cpu 활성화 기능 확인하기  (0) 2015.02.06
ntp monlist  (0) 2015.01.22
스크립트 상대경로를 절대경로로 변환하기  (0) 2014.12.30
lightdm 실행하지 않도록 하기  (0) 2014.12.24
우분투 Atom Z510 하드웨어 지원 중단  (0) 2014.12.24
Posted by 구차니
Linux2014. 12. 30. 15:05

쉘 스크립트에서 아래와 같이 readlink -e를 이용하면 되는데..

VAR = `readlink -e ${PWD}/../../` 


man page 상을는 존재하는 경로에 한해서 실행하라고 해서

무조건적으로 변환하는건 아닌거 같기도 하고.. 모호하다 모호해 ㅠㅠ

-f, --canonicalize

canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist


-e, --canonicalize-existing

canonicalize by following every symlink in every component of the given name recursively, all components must exist


-m, --canonicalize-missing

canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence


[링크 : http://linux.die.net/man/1/readlink]


[링크 : http://stackoverflow.com/questions/4175264/retrieve-absolute-path-given-relative-linux-shell]

'Linux' 카테고리의 다른 글

ntp monlist  (0) 2015.01.22
top manpage  (0) 2014.12.30
lightdm 실행하지 않도록 하기  (0) 2014.12.24
우분투 Atom Z510 하드웨어 지원 중단  (0) 2014.12.24
linux X-window 축 뒤집기  (0) 2014.12.24
Posted by 구차니
Linux2014. 12. 24. 15:46

우분투 12.04.4 LTS

에서 테스트


 $ echo  "manual" | sudo tee -a /etc/init/lightdm.override 


[링크 : http://askubuntu.com/.../how-do-i-disable-x-at-boot-time-so-that-the-system-boots-in-text-mode]

[링크 : http://askubuntu.com/.../151840/how-to-disable-gdm-from-being-automatically-started]

'Linux' 카테고리의 다른 글

top manpage  (0) 2014.12.30
스크립트 상대경로를 절대경로로 변환하기  (0) 2014.12.30
우분투 Atom Z510 하드웨어 지원 중단  (0) 2014.12.24
linux X-window 축 뒤집기  (0) 2014.12.24
dd / progress  (0) 2014.12.22
Posted by 구차니
Linux2014. 12. 24. 13:49

우분투 12.04 깔고 돌리는데

umid에서 이런 경고가 나와서 깜놀 -_-

별건 아니고 더 이상 이 하드웨어에 대해서 커널 업데이트는 없음! 이라는 문구다

(별거 아닐리가 있냐!?!?!)


Your current Hardware Enablement Stack (HWE) is no longer supported since 2014-08-07.  Security updates for critical parts (kernel and graphics stack) of your system are no longer available.


For more information, please see:

http://wiki.ubuntu.com/1204_HWE_EOL


There is a graphics stack installed on this system. An upgrade to a supported (or longer supported) configuration will become available on 2014-07-16 and can be invoked by running 'update-manager' in the Dash.





'Linux' 카테고리의 다른 글

스크립트 상대경로를 절대경로로 변환하기  (0) 2014.12.30
lightdm 실행하지 않도록 하기  (0) 2014.12.24
linux X-window 축 뒤집기  (0) 2014.12.24
dd / progress  (0) 2014.12.22
udev rule  (0) 2014.12.18
Posted by 구차니
Linux/Ubuntu2014. 12. 24. 13:36

로그인 시에 환영 메시지로 패키지 업데이트 갯수라던가를 알려주다 보니

/etc/ssh/sshd_config 에서 UseDNS no를 해주어도 지연되는 문제가 발생한다.

물론.. 업데이트 잘 해주고 그러면 문제 없겠지만 안되어 있다면.. 꺼주는 수 밖에?


login as: minimonk

minimonk@192.168.1.14's password:

Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.11.0-15-generic i686)


 * Documentation:  https://help.ubuntu.com/


261 packages can be updated.

150 updates are security updates.


Last login: Wed Dec 24 12:15:49 2014


일단.. 로그인이 무언가.... 허전해 지지만
pam_motd.so를 주석 처리 함으로서 ssh를 로그인 할때 motd를 갱신하면서 apt-check를 생략하기 때문에
조금은 더 빠르게 진행이 가능해진다.

$ sudo vi /etc/pam.d/sshd

# Print the message of the day upon successful login.

#session    optional     pam_motd.so # [1]


[링크 : https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/525674]



+

위의 무식(!) 한 방법을 제외하면

로그인 쉘이라던가 여러곳에서 motd를 갱신할때 90번과 91번에 대해서 제거를 해주면 될 듯 하다.

cpu 부하는 90번만 삭제해도 된다.


단, .90 이라던가 이렇게 이름만 바꾸어도 실행은 되니(디렉토리 전체 실행으로 보임)

#으로 주석처리하는걸 추천한다.

/etc/update-motd.d$ cat 90-updates-available

#!/bin/sh


if [ -x /usr/lib/update-notifier/update-motd-updates-available ]; then

    exec /usr/lib/update-notifier/update-motd-updates-available

fi


/etc/update-motd.d$ cat 91-release-upgrade

#!/bin/sh


if [ -x /usr/lib/update-manager/release-upgrade-motd ]; then

    exec /usr/lib/update-manager/release-upgrade-motd

fi



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

ld.so ?  (0) 2015.02.11
bash: ./arm-linux-gcc: No such file or directory  (0) 2015.01.12
manpath  (0) 2014.12.07
ctrl - alt - t 로 터미널 실행  (0) 2014.09.04
우분투에서 특정 패키지의 업데이트 금지하기  (0) 2014.09.03
Posted by 구차니
Linux2014. 12. 24. 12:08

결론은.. 실패

그냥 터치패널 드라이버 쪽에서 설정으로 해결 ㅠㅠ


------


[링크 : http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint]

[링크 : http://fedoraproject.org/wiki/Input_device_configuration]

[링크 : https://bbs.archlinux.org/viewtopic.php?id=180524]

[링크 : http://linux.die.net/man/1/xinput]



 Option "FlipXY" "boolean"

              Enable/disable swapping the X and Y axes.   This  transformation

              is applied after the InvX, InvY and AngleOffset transformations.

              Default: off.

[링크 : http://manpages.ubuntu.com/manpages/precise/man4/mousedrv.4.html]



[링크 : http://askubuntu.com/questions/246564/xinput-set-prop-does-not-work-for-touchscreen]




$ xinput --list

⎡ Virtual core pointer                          id=2    [master pointer  (3)]

⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]

⎜   ↳ PS/2 Generic Mouse                        id=10   [slave  pointer  (2)]

⎣ Virtual core keyboard                         id=3    [master keyboard (2)]

    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]

    ↳ Video Bus                                 id=6    [slave  keyboard (3)]

    ↳ Power Button                              id=7    [slave  keyboard (3)]

    ↳ Sleep Button                              id=8    [slave  keyboard (3)]

    ↳ AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]


$ xinput --list 10

PS/2 Generic Mouse                              id=10   [slave  pointer  (2)]

        Reporting 3 classes:

                Class originated from: 10. Type: XIButtonClass

                Buttons supported: 5

                Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down"

                Button state:

                Class originated from: 10. Type: XIValuatorClass

                Detail for Valuator 0:

                  Label: Rel X

                  Range: -1.000000 - -1.000000

                  Resolution: 1 units/m

                  Mode: relative

                Class originated from: 10. Type: XIValuatorClass

                Detail for Valuator 1:

                  Label: Rel Y

                  Range: -1.000000 - -1.000000

                  Resolution: 1 units/m

                  Mode: relative


'Linux' 카테고리의 다른 글

lightdm 실행하지 않도록 하기  (0) 2014.12.24
우분투 Atom Z510 하드웨어 지원 중단  (0) 2014.12.24
dd / progress  (0) 2014.12.22
udev rule  (0) 2014.12.18
플래시용 파일 시스템과 EXT4  (0) 2014.12.14
Posted by 구차니
Linux2014. 12. 22. 17:56

표준 dd의 경우 USR1 시그널을 통해서 현재 진행상태를 받아올 수 있다고 한다.


$ date; sudo dd if=/dev/sdd of=dump_512M.dd bs=16M count=32  ;date

2014. 12. 23. (화) 08:27:02 KST

16+0 레코드 들어옴

15+0 레코드 나감

251658240 바이트 (252 MB) 복사됨, 17.3061 초, 14.5 MB/초

18+0 레코드 들어옴

17+0 레코드 나감

285212672 바이트 (285 MB) 복사됨, 19.4872 초, 14.6 MB/초

27+0 레코드 들어옴

26+0 레코드 나감

436207616 바이트 (436 MB) 복사됨, 29.3058 초, 14.9 MB/초

32+0 레코드 들어옴

32+0 레코드 나감

536870912 바이트 (537 MB) 복사됨, 35.0506 초, 15.3 MB/초

2014. 12. 23. (화) 08:27:38 KST


$ ps -ef | grep dd

root     27180 26796  0 08:27 pts/1    00:00:00 sudo dd if=/dev/sdd of=dump_512M.dd bs=16M count=32

root     27181 27180 16 08:27 pts/1    00:00:00 dd if=/dev/sdd of=dump_512M.dd bs=16M count=32


minimonk@devmini:~/temp$ kill -USR1 27180

minimonk@devmini:~/temp$ kill -USR1 27180

minimonk@devmini:~/temp$ kill -USR1 27180


[링크 : http://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd]

[링크 : http://linuxcommando.blogspot.kr/2008/06/show-progress-during-dd-copy.html]



dd for windows


일본에서 만든 GUI

블럭 사이즈라던가 카운트를 못써서 디스크 전체만 빼낼수 있어 아쉽다.


[링크 : http://www.si-linux.co.jp/techinfo/index.php?DD%20for%20Windows] << GUI


윈도우 포트에서는 --progress 옵션을 제공하는데 M 단위로만 출력을 한다.

D:\>dd of=\\?\Device\Harddisk5\Partition0 if=test.dd bs=1M --progress

rawwrite dd for windows version 0.6beta3.

Written by John Newbigin <jn@it.swin.edu.au>

This program is covered by terms of the GPL Version 2.


1,886M

1886+0 records in

1886+0 records out


[링크 : http://www.chrysocome.net/dd] <<  원본에 가까운 것

'Linux' 카테고리의 다른 글

우분투 Atom Z510 하드웨어 지원 중단  (0) 2014.12.24
linux X-window 축 뒤집기  (0) 2014.12.24
udev rule  (0) 2014.12.18
플래시용 파일 시스템과 EXT4  (0) 2014.12.14
TTY / PTS 약자  (0) 2014.12.14
Posted by 구차니
Linux2014. 12. 18. 15:20

USB 장치라던가 각종 장치들이 연결되었을때

자동으로 mount 하는 녀석이 바로.. udev 인거 같은데..

/etc/udev/rules.d 에 어떤방법으로 연결을 할 지에 대해서 정의되어 있다고 한다.


ubuntu 12.04던 10.04던..

/etc/udev는 딱히 설정된게 없다.


 $ tree /etc/udev/rules.d

/etc/udev/rules.d

├── 70-persistent-cd.rules

├── 70-persistent-net.rules

└── README


 $ cat 70-persistent-cd.rules

# This file maintains persistent names for CD/DVD reader and writer devices.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-cd-aliases-generator.rules
# file; however you are also free to add your own entries provided you
# add the ENV{GENERATED}=1 flag to your own rules as well.


$ cat 70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x10de:/sys/devices/pci0000:00/0000:00:0a.0 (forcedeth)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="70:71:bc:3e:97:0a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


[링크 : https://kldp.org/node/120415]

[링크 : http://www.reactivated.net/writing_udev_rules.html]

[링크 : https://wiki.archlinux.org/index.php/udev]

'Linux' 카테고리의 다른 글

linux X-window 축 뒤집기  (0) 2014.12.24
dd / progress  (0) 2014.12.22
플래시용 파일 시스템과 EXT4  (0) 2014.12.14
TTY / PTS 약자  (0) 2014.12.14
expect - shell script  (0) 2014.12.10
Posted by 구차니