블로그 이미지
GUCCI

카테고리

전체보기 (111)
여행 (1)
기기 (2)
쇼핑 (0)
게임 (0)
etc. (6)
취업이야기 (0)
업무일지 (5)
리눅스 (38)
웹프로그래밍 (2)
네트워크 (4)
JAVA (17)
Android (0)
IOS (2)
LUA (8)
C/C++ (1)
Objective C (2)
SERVER (2)
그누보드4 (1)
MSSQL (2)
Programming (1)
자바스크립트 (4)
HTML/CSS (1)
LGNAS (0)
Total
Today
Yesterday

start-stop-daemon

리눅스 / 2012. 2. 15. 16:52
start-stop-daemon은 rc.d 에서 사용하는 녀석인데..
프로그램인지, 스크립트인지는 모르겠다.


간단하게 데몬 프로그램을 실행하고 자동으로 추적해서 죽이는 녀석이다.
service xinetd start / stop / restart 
등의 녀석을 구현해주는 착한 녀석이다.

OPTIONS

-x|--exec executable
    Check for processes that are instances of this executable (according to /proc/pid/exe ). 
-p|--pidfile pid-file
    Check whether a process has created the file pid-file. 
-u|--user username|uid
    Check for processes owned by the user specified by username or uid. 
-g|--group group|gid
    Change to group or gid when starting the process. 
-n|--name process-name
    Check for processes with the name process-name (according to /proc/pid/stat). 

아무튼, -x 로 되어서 제대로 찾지를 못해 죽이지 못하길래
-n 으로 해주었더니 인자에 문제가 있었는지 못죽였다.
아무튼 -n의 경우에는 경로가 아니라 실행파일의 이름만 넣어주면 된다.

예를 들어 /sbin/udhcpc의 경우에는
-name udhcpc 하면 종료해준다.

'리눅스' 카테고리의 다른 글

swap swapon swapoff  (2) 2012.02.15
klogd syslogd  (1) 2012.02.15
portmap 데몬  (2) 2012.02.15
Linux Hotplug  (6) 2012.02.10
리눅스 부팅 과정  (2) 2012.02.10
Posted by GUCCI
, |

portmap 데몬

리눅스 / 2012. 2. 15. 16:51

portmap 데몬은 RPC Program의 Number를 인터넷 Port Number로 변환해 준다.

 

RPC 서버가 start-up 할 때,

그것은 portmap 데몬으로 등록한다.

그 서버가 portmap 데몬에게 어느 port가 listening중이며
어느 RPC program이 그것을 서비스 하는지 알려준다.

그러므로, portmap 데몬은 그 Host에 등록된 모든 port의 위치를 알고

어느 Program들이 이들 Port들에게 Available한지를 안다.

 

한 클라이언트는 각 Program에 대해 call을 시도하는

 portmap 데몬에 단지 한번 문의한다.

그 portmap 데몬은 클라이언트에게 어느 port가 그 call을 보낼수 있는지 알려준다.

그 클라이언트는 미래에 참조될 수 있는 이 정보를 저장해 둔다.

 

표준 RPC 서버들이 정상적으로 inetd 데몬에 의해 start된 이후에,

inetd 데몬이 실행되기전에, portmap 데몬이  반드시 먼저 start되어야 한다.

 

 

 

 

<< portmap daemon을 사용하는 것들 >>

rpc daemon들이 portmap을 사용합니다.

rpc가 선행되어 살아나고, inetd가 살아난다.

 

/etc/rpc에 정의된 rpc daemon들

portmapper      100000  portmap sunrpc
rstatd          100001  rstat rup perfmeter
rusersd         100002  rusers
nfs             100003  nfsprog
ypserv          100004  ypprog
mountd          100005  mount showmount
ypbind          100007
walld           100008  rwall shutdown
yppasswdd       100009  yppasswd
etherstatd      100010  etherstat
rquotad         100011  rquotaprog quota rquota
sprayd          100012  spray
3270_mapper     100013
rje_mapper      100014
selection_svc   100015  selnsvc
database_svc    100016
rexd            100017  rex
alis            100018
sched           100019
llockmgr        100020
nlockmgr        100021
x25.inr         100022
statmon         100023
status          100024
bootparam       100026
ypupdated       100028  ypupdate
keyserv         100029  keyserver
sunlink_mapper  100033
tfsd            100037
nsed            100038
nsemntd         100039
showfhd         100043  showfh
cmsd            100068  dtcalendar
ypxfrd          100069  ypxfr
pcnfsd          150001
nisd            100300  rpc.nisd
nis_cachemgr    100301  nis_cachemgr
nispasswd       100303  rpc.nispasswdd
autofs          100099  automount       #209812
ttdbserver     100083  tooltalk

'리눅스' 카테고리의 다른 글

klogd syslogd  (1) 2012.02.15
start-stop-daemon  (1) 2012.02.15
Linux Hotplug  (6) 2012.02.10
리눅스 부팅 과정  (2) 2012.02.10
/dev/null 2>&1 의 의미  (1) 2012.02.10
Posted by GUCCI
, |
vlan은 우분투에서 vlan 패키지로 vconfig라는 프로그램을 제공하게 된다.

$ vconfig
'vconfig' 프로그램은 현재 설치되어 있지 않습니다.  다음을 입력하여 이를 설치할 수 있습니다:
sudo apt-get install vlan

$ sudo apt-get install vlan
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  vlan
0개 업그레이드, 1개 새로 설치, 0개 지우기 및 2개 업그레이드 안 함.
40.3k바이트 아카이브를 받아야 합니다.
이 작업 후 180k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu/ lucid/main vlan 1.9-3ubuntu3 [40.3kB]
내려받기 40.3k바이트, 소요시간 0초 (242k바이트/초)
전에 선택하지 않은 vlan 패키지를 선택합니다.
(데이터베이스 읽는중 ...현재 185765개의 파일과 디렉토리가 설치되어 있습니다.)
vlan 패키지를 푸는 중입니다 (.../vlan_1.9-3ubuntu3_i386.deb에서) ...
man-db에 대한 트리거를 처리하는 중입니다 ...
vlan (1.9-3ubuntu3) 설정하는 중입니다 ...

$ vconfig
Expecting argc to be 3-5, inclusive.  Was: 1

Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]

* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
* The vlan_id is the identifier (0-4095) of the VLAN you are operating on.
* skb_priority is the priority in the socket buffer (sk_buff).
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.

$ sudo modprobe 8021q

$ lsmod | grep 8021q
8021q                  18564  0 
garp                    6284  1 8021q

$ sudo vconfig add eth0 10
Added VLAN with VID == 10 to IF -:eth0:-

$ sudo ifconfig eth0.10 10.0.0.1 netmask 255.255.255.0

$ ifconfig
eth0.10   Link encap:Ethernet  HWaddr 00:e0:91:0b:75:8c  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:91ff:fe0b:758c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2110 (2.1 KB) 

'리눅스 > 리눅스명령어' 카테고리의 다른 글

awk  (6) 2012.02.15
리눅스 퍼미션 permission  (1) 2012.02.15
sysctl 명령어  (2) 2012.02.15
insmod, rmmod, lsmod, modprobe  (3) 2012.02.14
test 명령어  (3) 2012.02.14
Posted by GUCCI
, |

최근에 달린 댓글

글 보관함