'Linux'에 해당되는 글 789건

  1. 2014.12.24 ssh 로그인시 apt-check 프로세스 cpu 점유
  2. 2014.12.24 linux X-window 축 뒤집기
  3. 2014.12.22 dd / progress
  4. 2014.12.18 udev rule
  5. 2014.12.14 플래시용 파일 시스템과 EXT4
  6. 2014.12.14 TTY / PTS 약자
  7. 2014.12.10 expect - shell script
  8. 2014.12.09 tty / pts redirect
  9. 2014.12.07 rootfs / 부트 속도 향상하기
  10. 2014.12.07 manpath
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 구차니
Linux2014. 12. 14. 21:52
일반적으로. 요즘 시스템은 EXT4를 많이 채용하지만
이녀석이 비록 SSD 대응하도록 만들어져 있긴 하지만 wear leveling 보다는 trim 지원 정도라고 해야하려나?
아무튼 wear leveling이 없다 보니 sd 메모리와 같은 MTD 장비에는 적합하지 않고
그로 인해 ext4를 쓰다 보면 파일 테이블에 손상을 입고 부팅이 불가능해질 가능성이 높다.

정식으로 MTD를 지원하는 파일 시스템은
JFFS / JFSS2 / YAFS / UBIFS 정도이고
EXT4는 MTD를 정식 지원하진 않는다.

임베디드 시스템에서의 커널변수 및 관련 자료
[링크 : http://free-electrons.com/blog/managing-flash-storage-with-linux/ ]

[링크 : http://en.wikipedia.org/wiki/Flash_file_system]
2010/11/21 - [개소리 왈왈/핸드폰(안드로이드)] - 갤럭시S 프로요, 그리고 부두
2012/04/04 - [Linux/Ubuntu] - 우분투 SSD 설정하기 

'Linux' 카테고리의 다른 글

dd / progress  (0) 2014.12.22
udev rule  (0) 2014.12.18
TTY / PTS 약자  (0) 2014.12.14
expect - shell script  (0) 2014.12.10
tty / pts redirect  (0) 2014.12.09
Posted by 구차니
Linux2014. 12. 14. 21:16
리눅스 장치명으로 콘솔은
/dev/tty(시리얼) 나 /dev/pts(ssh)로 대개 잡히는데
약자를 찾아보니..

Teletypewriter
Pseudo terminal slave

일려나?

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

'Linux' 카테고리의 다른 글

udev rule  (0) 2014.12.18
플래시용 파일 시스템과 EXT4  (0) 2014.12.14
expect - shell script  (0) 2014.12.10
tty / pts redirect  (0) 2014.12.09
rootfs / 부트 속도 향상하기  (0) 2014.12.07
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 구차니
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 구차니
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 구차니