KR20040046619A - Apply embody method snmp and other applications in linux - Google Patents

Apply embody method snmp and other applications in linux Download PDF

Info

Publication number
KR20040046619A
KR20040046619A KR1020020074600A KR20020074600A KR20040046619A KR 20040046619 A KR20040046619 A KR 20040046619A KR 1020020074600 A KR1020020074600 A KR 1020020074600A KR 20020074600 A KR20020074600 A KR 20020074600A KR 20040046619 A KR20040046619 A KR 20040046619A
Authority
KR
South Korea
Prior art keywords
module
linux
snmp
community
flash memory
Prior art date
Application number
KR1020020074600A
Other languages
Korean (ko)
Other versions
KR100487570B1 (en
Inventor
강철호
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR10-2002-0074600A priority Critical patent/KR100487570B1/en
Publication of KR20040046619A publication Critical patent/KR20040046619A/en
Application granted granted Critical
Publication of KR100487570B1 publication Critical patent/KR100487570B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE: A method for applying an SNMP(Simple Network Management Protocol) and other application program on the Linux is provided to apply a current value and a new value in a module on the Linux basis without rebooting, and apply a result applied to one module to other module equally. CONSTITUTION: A factor in a configuration file to apply an application function to the Linux based module is allotted/recorded to a flash memory(101). As allotting a space for a structure to store a flash memory value while initializing a system, the factor and a community are read/stored(103). As each module is executed, the stored factor value is stored in the structure or an array in each module(105,107,109).

Description

리눅스 상에서 에스엔엠피와 다른 응용 프로그램과의 적용 구현 방법{Apply embody method snmp and other applications in linux}Apply embody method snmp and other applications in linux}

본 발명은 리눅스 상에서 snmp(simple network management protocol)와 다른 응용프로 그램(에이전트, 서버, 콘솔 등)과의 통신이 자유롭지 못하는 문제를 해결하기 위하여 각 모듈간의 적용(apply) 구현방법에 관한 것이다.The present invention relates to an application implementation method between modules in order to solve the problem that communication between snmp (simple network management protocol) and other applications (agent, server, console, etc.) is not free on Linux.

리눅스(linux)는 워크스테이션이나 개인용 컴퓨터에서 주로 사용되는 유닉스와 유사한 오퍼레이팅시스템으로서, 각종 주변기기에 따라 혹은 사용하는 시스템의 특성에 맞게 소스를 변경할 수 있으므로 다양한 변종이 출현되고 있다.Linux is a Unix-like operating system commonly used in workstations and personal computers, and various variants have emerged because the source can be changed according to various peripherals or the characteristics of the system used.

리눅스 상에서 각 모듈간(여기선 프로토콜을 지칭함)의 통신이 자유롭지 못하므로, 시스템 실행상 필수적인 적용(apply) 기능을 구현하여야 하는 해결 과제로 남아있다. 이러한, apply는 snmp가 특정 자기 변수를 바꿀 때, 다른 응용 프로토콜에게 알려서 그 프로토콜(protocol)이 상기 변수 값을 바뀌게 하는 것이다.Since communication between modules (here referred to as protocols) is not free on Linux, it remains a challenge to implement the necessary apply functions for system execution. This, apply, is when snmp changes a particular magnetic variable, tells other application protocols that protocol will change the value of that variable.

리눅스 상에서 적용 기능 구현을 위해 다른 모듈간의 통신 말고 내부 모듈자체에서 해결해야할 문제점이 있다. 그것은 모듈내부에서도 기존의 값과 새로 적용하고자 하는 값 사이에 통신이 가능 해야한다는 점이다.There is a problem to be solved in the internal module itself instead of communication between other modules in order to implement the application function on Linux. That is, even inside the module, communication between the existing value and the new value to be applied should be possible.

리눅스상에서 각 모듈은 구성파일(configuration file) 참조를 많이 한다. 예컨대 snmp는 중요 구성(configuration)을 구성파일(snmpd.conf file)을 참조한다. 이 경우 각 모듈은 리눅스 특성상 그 구성 파일에서 값을 읽어서 참조를 할 수는 있으나 새로 쓸 수는 없다.On Linux, each module makes a lot of configuration file references. Snmp, for example, refers to the configuration file (snmpd.conf file) for important configurations. In this case, each module can read the value from its configuration file and refer to it, but cannot write a new one.

만약, 새로운 값으로 바꾸고자 한다면 소스 코드(source code) 상에서 구성 파일을 수정해서 컴파일하고 다시 시스템에 이미지 다운을 받는 번거러운 과정을 거쳐야한다.If you want to change to a new value, you have to go through the cumbersome process of modifying the configuration file on the source code, compiling it, and downloading the image back to the system.

이러한 문제를 안고 있는 종래 기술에 대해 설명하면 다음과 같다.The prior art having such a problem will be described below.

도 1을 참조하여 종래 리눅스 상에서 snmp의 에이전트 커뮤니트 인증 과정을 설명하면 다음과 같다. 설명의 연관성을 위해서 시스템 운용과 관리에 관계된 http와 콘솔과의 적용을 주 대상으로 설명하기로 한다.Referring to FIG. 1, the process of authenticating snmp's agent community on Linux is as follows. For the relevance of explanation, the main purpose is to apply http and console related to system operation and management.

리눅스 상에서 snmp 에이전트(10)의 커뮤니티(community)는 구성 파일(snmpd.conf)에 정의되어 있다. 여기서, snmp에서 커뮤니티는 외부 관리자(manager)가 실행되고 있는 에이전트(agent)에 접근하기 위해 인증을 거쳐야 하는데, 이때 사용되는 인자이다.The community of snmp agent 10 on Linux is defined in the configuration file snmpd.conf. Here, in snmp, the community must be authenticated to access the agent running the external manager, which is the argument used.

이러한 구성 파일(snmpd.conf)은 소스 코드(souce code)의 snmp 디렉토리 상에서 작성해 컴파일(compile)하면 리눅스의 폴더/파일(/etc/snmpd.conf)(10)로 이동한다.This configuration file (snmpd.conf) is created on the snmp directory of source code (compiled) and compiled to move to a folder / file (/etc/snmpd.conf) of Linux (10).

시스템이 초기화하면서 snmp 에이전트(snmpd)(10)가 실행되며, snmp 에이전트(10)는 상기에서 만들어진 폴더(etc) 밑의 구성파일(snmpd.conf)을 참조하여 커뮤니티를 읽어서 내부 구조체(Community structure)에 저장한다. 여기서, 상기 저장된 커뮤니티는 시스템이 동작하는 한 처음 값 그대로 갖고 있게 된다.As the system initializes, the snmp agent (snmpd) 10 is executed, and the snmp agent 10 reads the community by referring to the configuration file (snmpd.conf) under the folder (etc) created above. Store in Here, the stored community has the first value as long as the system operates.

그리고, 외부에서 들어오는 패킷은 상기 구조체의 커뮤니티와의 일치 여부에 따라 인증이 결정된다.In addition, the authentication of the packet from the outside is determined according to whether or not the community of the structure.

그리고, 보안상의 이유로 커뮤니티를 바꾸고자 한다면 소스 코드에서 구성 파일(snmpd.conf file) 안의 커뮤니티 관련 값을 바꾸고, 이를 컴파일해서 생성된 이미지를 시스템에 다운받아 다시 초기화시켜야 한다.And, if you want to change the community for security reasons, you need to change the community-related values in the configuration file (snmpd.conf file) in the source code, compile it, download the generated image to the system and reinitialize it.

이렇게 변경된 커뮤니티를 다른 응용 프로그램 즉, 서버(http server: httpd)나 콘솔(console; setupd)에서 알고자 한다면 상기 리눅스의 폴더/파일(etc/snmpd.conf)를 읽어들이는 것 이외는 달리 참조할 방법은 없다. 이는 snmp의 커뮤니티가 내부적으로 snmpd.conf 라는 configuration file 안에 정의되어 있고 기존 리눅스상에서 snmp 와 다른 모듈간 통신이 어렵다는 점에서 문제점을 가지고 있기 때문이다.If you want to know the changed community from other applications, such as the server (http server: httpd) or console (setup: setupd), you can refer to it other than reading the Linux folder / file (etc / snmpd.conf). There is no way. This is because snmp's community is defined internally in a configuration file called snmpd.conf and has difficulty in communicating between snmp and other modules on existing Linux.

다음은 리눅스 상에서 커뮤니티-(snmp의 에이전트 커뮤니티) 인증 과정을 설명한다.The following describes the community- (snmp's agent community) authentication process on Linux.

Main ( )Main ()

{{

read_config ----(1)read_config ---- (1)

create_community -----(2) create_community ----- (2)

agent_read ----(3) agent_read ---- (3)

snmp_auth_parse -----(4)snmp_auth_parse ----- (4)

}}

(1)함수는 서버가 초기화시 참조파일 snmpd.conf의 인자들을 읽어들이는 과정이다. 세부 과정으로서 (2)함수는 snmp 에이전트가 커뮤니티를 읽어서 커뮤니티 구조체(structure 1)에 저장한다.(1) The function is the process by which the server reads the arguments from the reference file snmpd.conf during initialization. As a detailed procedure (2), the snmp agent reads the community and stores it in the community structure (structure 1).

(3)함수는 외부 snmp 패킷이 들어오면 이를 받아서 순차적으로 분석(parsing)하고 처리하는 함수이며, 세부 과정으로서 (4)함수는 상기 들어온 패킷의 커뮤니티와 저장한 구조체(structure1)의 커뮤니티를 비교해 패킷의 수락 여부를 결정한다.(3) is a function that receives and receives an external snmp packet sequentially and parses it and processes it. As a detailed process, (4) the function compares the community of the incoming packet with the community of the stored structure (structure1). Decide whether to accept.

그러나, 종래에는 다음과 같은 문제가 있다.However, the following problems exist conventionally.

첫 번째는 보안상 등의 이유로 커뮤니티를 바꾸고자 할 경우 바뀐 커뮤니티를 적용하기 위해서는 소스 코드를 컴파일하고 이미지를 다운 받아 시스템을 리부트(reboot) 해야 하는 번거러움이 있다.First of all, if you want to change the community for security reasons, you need to compile the source code, download the image, and reboot the system to apply the changed community.

두 번째는 snmp에서와 마찬가지로 서버(httpd)와 콘설(setupd) 등 다른 모듈에서 커뮤니티와 관련해서는 오직 리드(read)밖에 되지 않는다. 즉 커뮤니티를 리드할 수 있을 뿐 다른 모듈에서 새로운 커뮤니티를 기록해서 적용시킬 수 없는 문제가 있다.Second, as with snmp, only reads are made with respect to the community in other modules, such as server (httpd) and setup. That is, there is a problem that you can lead a community and not record and apply a new community in another module.

본 발명은 상기한 문제를 해결하기 위해 안출된 것으로서, 리눅스 기반에서 특정의 한 모듈 내에서의 적용 대상이 되는 기존 값과 새로운 값을 시스템 리부트(reboot) 없이 적용할 수 있도록 하는 한편, 특정의 한 모듈에서 적용한 결과를 다른 모듈에서도 똑같이 적용하도록 할 수 있도록 한 리눅스 상에서 snmp와 다른 응용 프로그램과의 적용 기능 구현 방법을 제공함에 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problem, and it is possible to apply an existing value and a new value to be applied in a specific module on a Linux-based system without rebooting the system. The goal is to provide a way to implement snmp with other applications on Linux so that the results of one module can be applied to the other.

일 특징은 시스템 리부트없이도 snmp 내부에서 새로운 커뮤니티가 적용되도록 하며, 다른 특징은 다른 모듈에서도 바뀐 커뮤니티가 동시에 적용되도록 함과 아울러, 다른 모듈에서 바뀐 커뮤니티가 snmp에서도 동시에 적용될 수 있도록 한 리눅스 상에서 snmp와 다른 응용 프로그램과의 적용 기능 구현 방법을 제공함에 그 목적이 있다.One feature allows a new community to be applied inside snmp without a system reboot, and another feature allows concurrent changes in other modules to be applied at the same time. The purpose is to provide a method of implementing application functions with other applications.

도 1은 종래 리눅스 상에서 snmp의 에이전트 커뮤니트 인증 과정을 설명한 도면.1 is a diagram illustrating an agent community authentication process of snmp on a conventional Linux.

도 2는 본 발명 실시 예에 따른 리눅스 상에서 snmp와 다른 응용 프로그램과의 적용 기능 구현 방법을 설명하기 위한 도면.2 is a view for explaining a method of implementing the application function of snmp and other applications on Linux according to an embodiment of the present invention.

도 3은 본 발명 실시 예에 따른 커뮤니티 변경 과정을 나타낸 도면.3 is a view showing a community change process according to an embodiment of the present invention.

도 4는 본 발명 실시 예에 따른 콘솔에서 바꾼 커뮤니티 값을 킬 함수를 이용하여 다른 응용 프로그램에 적용한 예를 나타낸 도면.4 is a diagram illustrating an example of applying a community value changed in a console to another application using a kill function, according to an embodiment of the present invention.

상기한 목적 달성을 위한 본 발명에 따른 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법은,Application implementation method of snmp and other applications on Linux according to the present invention for achieving the above object,

리눅스 기반의 특정 모듈에서 적용 기능을 적용하고자 하는 구성 파일안의 인자를 플레쉬 메모리 상에 할당 및 기록하는 단계;Allocating and writing, in flash memory, parameters in a configuration file to which an application function is to be applied in a particular Linux-based module;

시스템이 초기화하면서 플레쉬 메모리 값을 저장할 구조체를 위해 공간을 할당하여 상기 인자와 커뮤니티를 읽어서 저장하는 단계;Allocating space for a structure to store a flash memory value while the system initializes, reading and storing the argument and the community;

각 모듈이 실행되면서 상기 저장한 인자 값을 각 모듈 내부의 해당 구조체나 배열에 저장하는 단계를 포함하는 것을 특징으로 한다.As each module is executed, storing the stored argument values in a corresponding structure or array in each module.

바람직하게, 상기 모듈 중, 특정 모듈에서 커뮤니티를 바꾸고자 할 때, 모듈 내부의 특정 변수 값을 바꾸는 단계; 상기 변경된 값을 전체 시스템 구조체 내의 해당 특정 변수에 적용하고 상기 전체 시스템 구조체내의 해당 특정 변수에 적용된 값을 플레쉬 메모리에 기록하는 단계를 더 포함하는 것을 특징으로 한다.Preferably, in the module, when you want to change the community in a particular module, changing the value of a specific variable in the module; And applying the changed value to the specific variable in the entire system structure and writing the value applied to the specific variable in the entire system structure to the flash memory.

바람직하게, 상기 변경된 특정변수 값을 다른 모듈에 적용하기 위해서, 특정 모듈에서 킬 함수를 이용하여 다른 모듈들에 신호를 보내는 단계; 상기 다른 모듈들이 상기 특정 모듈에서 보내온 신호를 플레쉬 메모리에 다시 읽어들이도록 하는 단계를 포함하는 것을 특징으로 한다.Preferably, in order to apply the changed specific variable value to another module, sending a signal to other modules using a kill function in a specific module; And causing the other modules to read the signal from the specific module back into the flash memory.

바람직하게, 상기 모듈은 리눅스 기반의 snmp 에이전트이며, snmp 에이전트에서 적용하고자 하는 관련 인자 및 구성 파일 안의 인자를 플레쉬 메모리 상에 할당하여 구현하는 것을 특징으로 한다.Preferably, the module is a Linux-based snmp agent, characterized in that implemented by assigning the relevant parameters to be applied in the snmp agent and the parameters in the configuration file on the flash memory.

바람직하게, 상기 모듈은 리눅스 기반의 http 서버이며, http 서버에서 적용하고자 하는 관련 인자 및 구성 파일 안의 인자를 플레쉬 메모리 상에 할당하여 구현하는 것을 특징으로 한다.Preferably, the module is a Linux-based http server, characterized in that implemented by assigning the arguments in the configuration file and the relevant parameters to be applied in the http server.

바람직하게, 상기 모듈은 리눅스 기반의 콘솔이며, 콘솔에서 적용하고자 하는 관련 인자 및 구성 파일 안의 인자를 플레쉬 메모리 상에 할당하여 구현하는 것을 특징으로 한다.Preferably, the module is a Linux-based console, it characterized in that the implementation by assigning the relevant parameters to be applied in the console and the arguments in the configuration file on the flash memory.

바람직하게, 상기 모듈은 snmp 에이전트, http 서버, 콘솔이며, 특정 모듈이 다른 모듈들과의 통신을 위해 킬 함수를 이용하는 것을 특징으로 한다.Preferably, the module is a snmp agent, http server, console, characterized in that the specific module uses a kill function for communication with other modules.

상기와 같은 본 발명에 따른 리눅스 상에서 snmp와 다른 응용 프로그램과의 어플라이 기능 구현 방법에 대하여 첨부된 도면을 참조하여 설명하면 다음과 같다. 설명의 편의를 위해 이제 위의 문제 해결을 위해 snmp에서 커뮤니티(community)의 적용하는 방법을 설명하기로 한다.Referring to the accompanying drawings, a method for implementing an application function between snmp and another application program on Linux according to the present invention as described above is as follows. For convenience of explanation, the following describes how to apply community in snmp to solve the above problem.

먼저, 시스템 리부트없이 snmp 내부에서 새로운 커뮤니티가 적용되도록 하는 방법을 설명하면 다음과 같다.First, the following describes how to apply a new community inside snmp without system reboot.

먼저, 도 2를 참조하면, snmp 에이전트의 커뮤니티 참조를 구성파일(snmpd.conf)에서 하지 않고 플레쉬 메모리(flash memory 또는 다른 메모리) 상에서 직접 읽어온다. 그러기 위해선 플레쉬 메모리 상에 커뮤니티가 저장되어 있어야 함을 의미한다.First, referring to FIG. 2, the community reference of the snmp agent is read directly from the flash memory (flash memory or other memory) instead of from the configuration file snmpd.conf. This means that the community must be stored in flash memory.

이를 위해서, 플레쉬 메모리(101) 상에 커뮤니티 저장 공간을 할당하여, 전체 시스템 구조체(sysconf structure) 값을 기록한다.For this purpose, the community storage space is allocated on the flash memory 101 to record the total sysconf structure value.

이제 시스템이 초기화하면서 플레쉬 메모리(101) 값을 저장할 전체 시스템 구조체(sysconf structure)를 위해 공간을 할당하고 상기 플레쉬 메모리 값을 읽어상기 구조체에 저장한다(S101). 이 과정에서 커뮤니티도 읽어서 저장한다.Now, the system initializes and allocates space for the entire system structure (sysconf structure) to store the flash memory 101 value, and reads the flash memory value and stores it in the structure (S101). In the process, the community is also read and saved.

이후, 각 모듈 즉, snmp 에이전트(snmpd)(105), 서버(httpd)(107), 콘솔(setupd)(109) 등이 실행되면서 상기 저장한 전체 시스템 구조체(sysconf) 값을 각 모듈 내부의 해당 구조체나 배열에 저장한다(S103).Thereafter, each module, that is, the snmp agent (snmpd) 105, the server (httpd) 107, the console (setupd) 109, and the like, is executed to store the entire system structure (sysconf) value stored in the corresponding module. Stored in a structure or an array (S103).

그리고, 상기 상태에서 커뮤니티를 바꾸고자 한다면 그 과정은 다음과 같다.And, if you want to change the community in the above state is as follows.

도 3을 참조하면, 한 모듈에서 커뮤니티를 바꾸고자 할 때(예컨대, 콘솔에서 read 커뮤니티를 public 에서 read로 바꾼다고 하자), 콘솔(109) 내부의 커뮤니티 어레이(array)에서 read 커뮤니티를 read로 바꾸고(Read community = read), 이 값을 다시 전체 시스템 구조체(sysconf structure)(103)의 커뮤니티 부분의 리드 커뮤니티(Read commuinty = read)에 적용하고(S111), 마지막으로 상기 적용된 구조체 값을 플레쉬 메모리(101)에 쓰면 된다(S113). 이렇게 해서 새로운 값을 적용하기 위해 기존처럼 시스템을 리부트할 필요가 없게 된다.Referring to FIG. 3, when a community wants to change a community in one module (eg, change the read community from public to read in the console), the read community is changed to read in a community array inside the console 109 ( Read community = read), and this value is again applied to the read community (Read commuinty = read) of the community part of the whole sysconf structure 103 (S111), and finally the applied structure value is stored in the flash memory 101. ) To write (S113). This eliminates the need to reboot the system as before to apply the new values.

한편, 도 4를 참조하면, 다른 모듈(snmp, http)에서 상기 바뀐 커뮤니티 값을 적용할 수 있도록, 상기 콘솔(109)에서 바꾼 커뮤니티 값을 다른 모듈에서 적용하도록 서로간의 통신이 필요하다.Meanwhile, referring to FIG. 4, it is necessary to communicate with each other to apply the community value changed in the console 109 in another module so that the changed community value may be applied in other modules snmp and http.

이를 위해 본 발명은 킬(kill) 함수를 사용한다. 콘솔(109)에서 킬 함수를 써서 다른 모듈(즉, 실행되는 프로세서 식별자(pid))에 신호(예, USR1)를 보내고(S121), 수신측(httpd, snmpd)은 상기 신호를 받으면 플레쉬 메모리(101)를 다시 읽어 들이도록 하면 된다(S123). 이는 킬 함수의 용도 중 kill(pid , signal)일 경우 지정한 프로세서(pid)에 지정한 신호(signal) 을 보낸다는 성질을 이용한것이다.To this end, the present invention uses a kill function. The console 109 sends a signal (e.g., USR1) to another module (ie, a processor identifier (pid) to be executed) using a kill function (S121), and the receiving side (httpd, snmpd) receives the flash memory ( 101 may be read again (S123). This is because kill (pid, signal) of the purpose of the kill function sends the specified signal to the specified processor (pid).

위 과정을 가능하게 하기 위해서는 우선 해당 모듈(console)에서는 어플라이시 타 모듈에(http, snmp)에 킬 함수를 통해 신호를 보내야 하고, 반대로 타모듈(http, snmp)은 해당 모듈로부터 신호를 받으면 플레쉬 메모리를 읽는 함수를 실행해야 한다.In order to enable the above process, the corresponding module (console) must first send a signal to the application module (http, snmp) through a kill function. You need to execute a function that reads flash memory.

이하, 구체적으로 설명하기로 한다.It will be described in detail below.

첫 번째 snmp 에이전트(snmpd)가 snmpd.conf를 참조하지 않고 플레쉬 메모리를 읽어오는 과정을 설명한다.The first snmp agent (snmpd) describes the process of reading the flash memory without referring to snmpd.conf.

Main ()Main ()

{{

read_config ---------(1)read_config --------- (1)

FlashParmRead () ----(2)FlashParmRead () ---- (2)

Read_community -----(3)Read_community ----- (3)

Agent_readAgent_read

Snmp_auth_parse --(4)Snmp_auth_parse-(4)

}}

상기 (1)함수는 이전에 snmpd.conf에서 community를 읽어오던 부분이므로 해당부분을 블록(block) 처리한다.The above function (1) is a part that reads the community from snmpd.conf before, so the block is processed.

그리고, (2)함수는 플레쉬 메모리에서 sysconf로 시스템 파라미터를 읽어오고 (3)함수에서 sysconf의 내용 중 커뮤니티 값을 snmp 에이전트의 커뮤니티structure 2에 저장한다. (4)함수에서 실제 들어온 패킷의 커뮤니티와 커뮤니티 structure 2에 저장된 값과 비교해서 처리한다.Then, (2) reads system parameters from flash memory into sysconf, and (3) stores the community values of the sysconf contents in community structure 2 of the snmp agent. (4) Process by comparing the community of packets actually coming from the function and the values stored in community structure 2.

두 번째로 다른 모듈과의 통신을 통해 다른 모듈에 새로운 값(community)을 적용하는 과정을 설명한다. 우선 snmp 에서 커뮤니티를 바꾸고 이를 다른 모듈(http, console)에 적용하는 과정을 예로 든다.Secondly, the process of applying a new value to another module through communication with another module will be described. First of all, change the community in snmp and apply it to other modules (http, console).

Snmp관리자를통해 커뮤니티 값을 바꾸고 어플라이를 하면 snmp 에이전트에서는 이를 다음과 같이 처리 한다.If you change the community value through the Snmp Manager and apply the application, the snmp agent handles it as follows.

Apply_process_func ()Apply_process_func ()

{{

proc_sysconf ---------(5)proc_sysconf --------- (5)

Write_sysconf_to_flash ----(6)Write_sysconf_to_flash ---- (6)

If( (fp=fopen(/tmp/2/setup.pid,r ) ) == NULL) { ------ (7)If ((fp = fopen (/tmp/2/setup.pid,r)) == NULL) {------ (7)

fprintf(stderr, "Can't open file /tmp/2/setup.pid");fprintf (stderr, "Can't open file /tmp/2/setup.pid");

} else {} else {

fscanf(fp, "%d", &setup_pid); -------------------(8)fscanf (fp, "% d", &setup_pid); -------------------(8)

fclose(fp);fclose (fp);

kill(setup_pid, SIGUSR1); -------------------(9)kill (setup_pid, SIGUSR1); ------------------- (9)

}}

}}

if((fp = fopen("/tmp/2/ghttpd.pid", "r")) == NULL) { ------(10)if ((fp = fopen ("/ tmp / 2 / ghttpd.pid", "r")) == NULL) {------ (10)

fprintf(stderr, "Can't open file /tmp/2/ghttpd.pid");fprintf (stderr, "Can't open file /tmp/2/ghttpd.pid");

} else {} else {

fscanf(fp, "%d", &ghttpd_pid); -----------------(11)fscanf (fp, "% d", &ghttpd_pid); ----------------- (11)

fclose(fp);fclose (fp);

kill(ghttpd_pid, SIGUSR1); -----------(12)kill (ghttpd_pid, SIGUSR1); ----------- (12)

}}

}}

상기 알고리즘에서, (5)함수는 새로 적용된 값이 들어있는 snmp agent의 커뮤니티 structure 2 의 내용을 sysconf에 적용한다. (6)함수는 sysconf의 community 값을 플레쉬 메모리에 저장한다.In the above algorithm, function (5) applies the contents of community structure 2 of the snmp agent containing the newly applied values to sysconf. (6) The function stores the community value of sysconf in flash memory.

여기서, (6)함수는 다음과 같다.Here, the function (6) is as follows.

void Write_sysconf_to_flash(void)void Write_sysconf_to_flash (void)

{{

flash_control(flash_jmp_sectorerase, 0x1ff, 0, 0, NO_DIP_MODE); ---(가)flash_control (flash_jmp_sectorerase, 0x1ff, 0, 0, NO_DIP_MODE); ---(end)

FlashParamWrite((unsigned short *)&sysconf, sizeof(sysconf));----(나)FlashParamWrite ((unsigned short *) & sysconf, sizeof (sysconf)); ---- (me)

}}

(가)함수는 사용할 플레쉬 메모리를 할당하는 단계이고 (나)는 할당된 영역에 sysconf 구조체 값을 쓰는 단계이다. 이 부분은 apply 적용을 할때 프레시를 할당하는 과정이고 시스템 초기화 때도 (가)함수로 플레시를 할당하고 (나)함수로 리부트(reboot) 전에 저장했던 sysconf 구조체 값을 플레시 메모리에 기록한다.The function (a) is to allocate flash memory to use, and (b) to write the sysconf structure value to the allocated area. This is the process of allocating fresh when applying apply, and also assigning flash as a function during system initialization and writing the value of the sysconf structure saved in the memory before rebooting with (B).

그리고, 상기 (7)(8)함수에서 콘솔의 현재 프로세서 식별자(pid)를 읽어서 (9)함수에서 해당 프로세서 식별자(pid)에 SIGUSR1 신호를 보낸다.Then, the current processor identifier (pid) of the console is read in the functions (7) and (8), and the SIGUSR1 signal is transmitted to the corresponding processor identifier (pid) in the function (9).

(10)(11)함수는 http 의 현재 pid ( process id ) 를 읽어서 (12 ) 그 pid 에 SIGUSR1 신호를 보낸다.The function (10) (11) reads the current pid (process id) of http and sends a SIGUSR1 signal to that pid.

상기에서 서버와 콘솔의 프로세서 식별자(pid)는 현재 실행되는 프로세스 식별자로서 /tmp/2/ 디랙토리에 저장을 했다는 사실을 알 수 있다. 이에 대한 부가적인 사항은 다음과 같다.In the above, the processor identifiers (pid) of the server and the console are stored in the / tmp / 2 / directory as the currently executing process identifiers. Additional points on this are as follows.

상기에서 snmp에서 타 모듈로 적용을 했는데 이제 타 모듈에서 community를 바꾸었을 때 snmp agent에서는 이를 어떻게 처리 하는지 설명한다.In the above, the snmp was applied to another module. Now, when the community is changed in another module, the snmp agent describes how to handle it.

다음은 Snmp agent 이다.Next is Snmp agent.

Main()Main ()

{{

signal ( SIGUSR1 ,Read_sysconf_from_flash ) -----(13)signal (SIGUSR1, Read_sysconf_from_flash) ----- (13)

fp = fopen("/tmp/2/snmpd.pid", "w"); ---------(14)fp = fopen ("/ tmp / 2 / snmpd.pid", "w"); --------- (14)

fprintf(fp, "%d", getpid()); ------------------(15)fprintf (fp, "% d", getpid ()); ------------------ (15)

fclose(fp);fclose (fp);

}}

Read_sysconf_from_flash ()Read_sysconf_from_flash ()

{{

FlashParamRead () ------------------------(16)FlashParamRead () ------------------------ (16)

for( cp = kang_communities; cp; prev = cp, cp = cp->next ) {for (cp = kang_communities; cp; prev = cp, cp = cp-> next) {

free(cp); ------------------(17)free (cp); ------------------ (17)

}}

read_community() -------------------(18)read_community () ------------------- (18)

}}

상기 알고리즘에서 (13)함수는 외부로부터 SIGURE1의 신호를 받으면 플레쉬 메모리로부터 구조체를 읽으라는 함수(Read_sysconf_from_flash)를 실행함을 snmp agent 초기화시 정의해 놓은 곳이다. 이 함수는 즉 apply 적용함수이다.In the above algorithm, the function (13) is defined when the snmp agent is initialized to execute a function (Read_sysconf_from_flash) that reads a structure from flash memory when SIGURE1 is received from the outside. This function is the apply apply function.

(14)(15)함수는 "/tmp/2/ 밑에 현재 실행중인 snmp 프로세서 식별자(process id)를 써놓는다. 나중에 다른 모듈이 apply 적용할때 이 값을 읽어서 snmp agent에 SIGUSR1 신호를 보내게 된다.(14) (15) writes the currently running snmp processor identifier (process id) under "/ tmp / 2 /. This will read this value when another module applies it and send a SIGUSR1 signal to the snmp agent. .

그리고, 마지막으로 플레쉬 메모리로부터 구조체를 읽는 함수(Read_sysconf_from_flash)의 동작에 대하여 살펴본다. 외부로부터 SIGURE1 의 신호가 오면 Read_sysconf_from_flash 함수가 호출되고 이 함수는 플레쉬 메모리로부터 새로운 값을 읽어서 sysconf 구조체에 저장한다(함수 16).Finally, the operation of the function (Read_sysconf_from_flash) that reads a structure from flash memory is described. When SIGURE1 is signaled from the outside, the Read_sysconf_from_flash function is called, which reads the new value from flash memory and stores it in the sysconf structure (function 16).

그리고 구조체(sysconf)에서 snmp 에이전트로 읽기 전에 snmp 에이전트에 정의되어 있는 기존 값(community structure 2 )을 지운다(함수 17). 이제 마지막으로 상기 저장된 구조체(sysconf)의 값을 snmp 에이전트의 community structure 2에 저장한다. 이렇게 해서 다른 모듈에서 바뀐 community 값이 snmp agent 에도 적용이 된다.Then, before reading the snmp agent from the sysconf, the existing value defined in the snmp agent (community structure 2) is deleted (function 17). Now finally, the value of the stored structure (sysconf) is stored in community structure 2 of the snmp agent. In this way, the community values changed in other modules are applied to the snmp agent.

본 발명에서는 주로 설명을 snmp를 들어 설명하였으나 본 발명의 적용은 http 서버나 콘설(console, menu)에서도 똑같이 적용이 된다. 즉, http 서버나 콘솔 내부 모듈 자체에서 새로이 적용한 값을 다른 모듈에 적용할 수도 있다.In the present invention, the description is mainly given by snmp, but the application of the present invention is equally applicable to an http server or a console (console, menu). In other words, the newly applied values in the http server or in the console module itself can be applied to other modules.

이와 같이, 킬 함수를 사용하여 기존 Linux 상에서 실행되는 각 모듈( 혹은 응용프로그램) 간에 통신의 어려움을 해결할 수 있다. 이는 리눅스를 운영체제로 사용하는 모든 시스템이 공통으로 해결해야하는 과제이기도 하다. 그리고 각 모듈간 통신이 쉬워짐에 따라 한 모듈에서 적용한 값을 동시에 다른 모듈에도 적용할수 있는 apply 기능이 가능해진다.In this way, kill functions can be used to solve the difficulty of communicating between modules (or applications) running on Linux. This is a common problem for all systems using Linux as an operating system. And as communication between each module becomes easy, apply function that can apply the value applied in one module to other module at the same time becomes possible.

또한 리눅스 상에서 여러 응용프로그램들은 구성 파일을 참조하는 경우, 파일 안에 정의된 인자는 고정되어 있어, 변경시 불편하던 문제를, 인자의 특성에 따라 고정되어도 상관없는 인자는 구성 파일을 참조하고 플렉쉬블(flexiable)한 인자는 플레쉬 메모리에 정의해 참조함으로서 리부트를 해야 하는 불편함을 해결할 수 있다.Also, in Linux when various applications refer to a configuration file, the arguments defined in the file are fixed, which makes it inconvenient to change them. The flexiable argument can be defined in flash memory to refer to the inconvenience of having to reboot.

상술한 바와 같이 본 발명은 기존 리눅스 상에서 실행되는 각 모듈 혹은응용프로그램 간에 통신의 어려움을 킬 함수를 사용하여 해결함으로서, 보다 신속하고 정확한 처리를 할 수 있다. 이는 리눅스를 운용체제로 사용하는 모든 시스템 간의 통신이 쉬워짐에 따라 한 모듈에서 적용한 값을 동시에 다른 모듈에도 적용할 수 있는 apply 기능이 가능한 효과가 있다.As described above, the present invention solves the difficulty of communication between each module or application program executed on the existing Linux using a kill function, thereby enabling faster and more accurate processing. This makes it easy to communicate between all systems using Linux as an operating system, so the apply function can apply the values applied in one module to other modules at the same time.

또 다른 효과로는 리눅스 상에서 여러 응용프로그램들은 구성 파일을 참조하는 경우, 구성 파일의 특성에 따라 고정되어도 무방한 파일은 구성 파일을 참조하고, 플렉시블한 인자는 플레쉬 메모리에 정의해 참조함으로서 근본적으로 리부트해야 하는 불편함을 해결하는 효과가 있다.Another effect is that if several applications refer to a configuration file on Linux, the file can be fixed according to the characteristics of the configuration file, and the flexible argument is defined in flash memory. This will solve the inconvenience of having to boot.

Claims (7)

리눅스 기반의 특정 모듈에서 적용 기능을 적용하고자 하는 구성 파일안의 인자를 플레쉬 메모리 상에 할당 및 기록하는 단계;Allocating and writing, in flash memory, parameters in a configuration file to which an application function is to be applied in a particular Linux-based module; 시스템이 초기화하면서 플레쉬 메모리 값을 저장할 구조체를 위해 공간을 할당하여 상기 인자와 커뮤니티를 읽어서 저장하는 단계;Allocating space for a structure to store a flash memory value while the system initializes, reading and storing the argument and the community; 각 모듈이 실행되면서 상기 저장한 인자 값을 각 모듈 내부의 해당 구조체나 배열에 저장하는 단계를 포함하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.And executing the respective snmp and other application programs in Linux, wherein the stored parameter values are stored in a corresponding structure or array in each module as each module is executed. 제 1항에 있어서,The method of claim 1, 상기 모듈 중, 특정 모듈에서 커뮤니티를 바꾸고자 할 때, 모듈 내부의 특정 변수 값을 바꾸는 단계;Changing a value of a specific variable within a module when changing a community in a specific module among the modules; 상기 변경된 값을 전체 시스템 구조체 내의 해당 특정 변수에 적용하고 상기 전체 시스템 구조체내의 해당 특정 변수에 적용된 값을 플레쉬 메모리에 기록하는 단계를 더 포함하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.Applying the changed value to the particular variable in the overall system structure and writing the value applied to the particular variable in the overall system structure to flash memory, wherein snmp and other applications are applied on Linux. How to implement. 제 2항에 있어서,The method of claim 2, 상기 변경된 특정 변수 값을 다른 모듈에 적용하기 위해서,In order to apply the changed specific variable value to another module, 특정 모듈에서 킬 함수를 이용하여 다른 모듈들에 신호를 보내는 단계;Signaling to other modules using a kill function in a particular module; 상기 다른 모듈들이 상기 특정 모듈에서 보내온 신호를 플레쉬 메모리에 다시 읽어들이도록 하는 단계를 포함하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.And causing the other modules to read the signal sent from the specific module back into the flash memory. 제 1항에 있어서,The method of claim 1, 상기 모듈은 리눅스 기반의 snmp 에이전트이며, snmp 에이전트에서 적용하고자 하는 관련 인자 및 구성 파일 안의 인자를 플레쉬 메모리 상에 할당하여 구현하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.The module is a Linux-based snmp agent, and the implementation of the application of snmp and other applications on Linux, characterized in that by implementing the relevant parameters to be applied in the snmp agent and the parameters in the configuration file on the flash memory. 제 1항에 있어서,The method of claim 1, 상기 모듈은 리눅스 기반의 http 서버이며, http 서버에서 적용하고자 하는 관련 인자 및 구성 파일 안의 인자를 플레쉬 메모리 상에 할당하여 구현하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.The module is a Linux-based http server, and the implementation of snmp and other applications on Linux, characterized in that by implementing the relevant parameters to be applied in the http server and the parameters in the configuration file in the flash memory. 제 1항에 있어서,The method of claim 1, 상기 모듈은 리눅스 기반의 콘솔이며, 콘솔에서 적용하고자 하는 관련 인자 및 구성 파일 안의 인자를 플레쉬 메모리 상에 할당하여 구현하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.The module is a Linux-based console, and the implementation of snmp and other applications on Linux, which is implemented by allocating the relevant parameters to be applied in the console and the parameters in the configuration file on the flash memory. 제 3항에 있어서,The method of claim 3, wherein 상기 모듈은 snmp 에이전트, http 서버, 콘솔이며, 특정 모듈이 다른 모듈들과의 통신을 위해 킬 함수를 이용하는 것을 특징으로 하는 리눅스 상에서 snmp와 다른 응용프로그램과의 적용 구현 방법.The module is a snmp agent, an http server, a console, and a method for implementing snmp and other applications on Linux, wherein a specific module uses a kill function for communicating with other modules.
KR10-2002-0074600A 2002-11-28 2002-11-28 Apply embody method snmp and other applications in linux KR100487570B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2002-0074600A KR100487570B1 (en) 2002-11-28 2002-11-28 Apply embody method snmp and other applications in linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2002-0074600A KR100487570B1 (en) 2002-11-28 2002-11-28 Apply embody method snmp and other applications in linux

Publications (2)

Publication Number Publication Date
KR20040046619A true KR20040046619A (en) 2004-06-05
KR100487570B1 KR100487570B1 (en) 2005-05-03

Family

ID=37342144

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2002-0074600A KR100487570B1 (en) 2002-11-28 2002-11-28 Apply embody method snmp and other applications in linux

Country Status (1)

Country Link
KR (1) KR100487570B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100694230B1 (en) * 2006-01-13 2007-03-14 삼성전자주식회사 Remote engineering system and method by simple network management protocal standard management information base

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06333061A (en) * 1993-05-24 1994-12-02 Olympus Optical Co Ltd Built-in system for one-chip microcomputer
KR19990002308A (en) * 1997-06-19 1999-01-15 김영환 Boot ROM Devices in Set-Top Boxes
KR19990058819A (en) * 1997-12-30 1999-07-26 윤종용 Router and memory management method of full-duplex architecture using flash memory
KR100339051B1 (en) * 1999-09-06 2002-05-31 이호동 Auto-recovery system of LINUX using a flash card
KR20010038169A (en) * 1999-10-22 2001-05-15 송재인 An alteration method of booting program
KR20020040047A (en) * 2000-11-23 2002-05-30 구자홍 Flash rom write method for embedded system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100694230B1 (en) * 2006-01-13 2007-03-14 삼성전자주식회사 Remote engineering system and method by simple network management protocal standard management information base

Also Published As

Publication number Publication date
KR100487570B1 (en) 2005-05-03

Similar Documents

Publication Publication Date Title
US10277708B2 (en) On-demand network code execution with cross-account aliases
US10203990B2 (en) On-demand network code execution with cross-account aliases
US10621127B2 (en) Communication channel for reconfigurable devices
US5721876A (en) Sockets application program mechanism for proprietary based application programs running in an emulation environment
US6393474B1 (en) Dynamic policy management apparatus and method using active network devices
US7065761B2 (en) Nonvolatile logical partition system data management
US8713582B2 (en) Providing policy-based operating system services in an operating system on a computing system
US6460136B1 (en) Method and apparatus for loading an operating system kernel from a shared disk memory
US20050149716A1 (en) Preboot execution bootloading
WO2012177359A2 (en) Native cloud computing via network segmentation
US6865732B1 (en) Providing an embedded application specific web server
US7657945B2 (en) Systems and arrangements to adjust resource accessibility based upon usage modes
US7930693B2 (en) Method and system for accessing and launching a java based applet as a locally installed application
Hursey Design considerations for building and running containerized MPI applications
CN110750365A (en) Remote procedure calling method, system, terminal and storage medium
KR100487570B1 (en) Apply embody method snmp and other applications in linux
KR20190044098A (en) Method and device for use in accessing a container
US6598105B1 (en) Interrupt arbiter for a computing system
US20050132084A1 (en) Method and apparatus for providing server local SMBIOS table through out-of-band communication
CN110401605B (en) Method, device, server and terminal for distributing bandwidth in local area network
CN113254022A (en) Distributed compilation system and method
US10382585B2 (en) Concurrent code application in a stateful computing environment
KR100962614B1 (en) Radiocommunication module that runs a main software program, the low-level layers of which are open to a client software program which is also run by the module
US20230325203A1 (en) Provisioning dpu management operating systems using host and dpu boot coordination
Fischer et al. Embedding SCI into PVM

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20100330

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee