WO2015188457A1 - Printing message acquisition method and apparatus - Google Patents

Printing message acquisition method and apparatus Download PDF

Info

Publication number
WO2015188457A1
WO2015188457A1 PCT/CN2014/085061 CN2014085061W WO2015188457A1 WO 2015188457 A1 WO2015188457 A1 WO 2015188457A1 CN 2014085061 W CN2014085061 W CN 2014085061W WO 2015188457 A1 WO2015188457 A1 WO 2015188457A1
Authority
WO
WIPO (PCT)
Prior art keywords
print message
print
message
storage device
kernel
Prior art date
Application number
PCT/CN2014/085061
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2015188457A1 publication Critical patent/WO2015188457A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for acquiring a print message.
  • Linux (Riox) is a freely used operating system and is currently used more and more in product development.
  • Print messages for real-time output by the Linux kernel and print messages for normal processes are usually displayed only on certain terminals. For example, on a Linux machine connected to a monitor, the Linux kernel output is usually displayed on the display; on an embedded Linux device, the Linux kernel output is usually output to the serial device.
  • the print message output by the Linux kernel can only be displayed locally. This has the disadvantage that when the device is running in the field, there is a problem with the Linux kernel. The personnel must rush to the site to obtain the print information, which brings great equipment maintenance.
  • an embodiment of the present invention provides a method for acquiring a print message, including: acquiring a print message output by a device; and redirecting the print message to a set storage device. Further, when the print message is a kernel print message of the Reniks Linux system, the kernel print message is obtained from the buffer Buffer through a Syslog interface provided by the Linux system.
  • the process print message of the process is obtained by the file open table corresponding to each process.
  • redirecting the print message to the set storage device means copying the print message to the set storage device.
  • the storage device is a universal serial bus USB interface storage device.
  • the embodiment of the present invention further provides a print message acquiring apparatus, including: a print message obtaining unit, configured to obtain a print message output by the device; and a redirecting unit configured to redirect the print message to the set storage device.
  • the print message obtaining unit is further configured to: when the print message is a kernel print message of the Rex Linux system, obtain the kernel print message from the buffer Buffer through a Syslog interface provided by the Linux system. Further, the print message obtaining unit is further configured to: when the print message is a process print message of the Rex Linux system, obtain a process print message of the process by using a file open table corresponding to each process. Further, the redirecting unit redirects the print message to the set storage device, which means copying the print message to the set storage device. Further, the storage device is a universal serial bus USB interface storage device.
  • FIG. 1 is a flowchart of a method for acquiring a print message according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a device for acquiring a print message according to an embodiment of the present invention.
  • an embodiment of the present invention relates to a method for acquiring a print message, including: Step S101: Acquire a print message output by a device; In this step, the print message includes a kernel print message and/or a process print message.
  • the Linux kernel prints the real-time output of the print directly to the printk ( ) kernel function. From the internal implementation mechanism, the Linux kernel maintains a list of kernel real-time information output devices (console-drivers).
  • the Linux kernel caches kernel print messages into the internal buffer. To get the kernel's prints, you need to fetch them from the buffer and redirect them to the usb interface storage device.
  • the Linux kernel will cache the kernel's print messages into the internal buffer. Linux provides a syslog interface, which makes it easy to get the kernel to print messages.
  • the print message of the normal process of the Linux system is implemented by calling the printf ( ) function.
  • the print message of the process is output to the standard output.
  • the default standard output of the board is the serial port. Therefore, in order to obtain the print message of the process, the standard output of the process needs to be redirected.
  • the Linux kernel provides a file open table for each process in the system. The first three items 0, 1, and 2 of the file open table are standard input, standard output, and standard error output. We only focus on the output of the process. In order to get the print message of the specified process, you need to start the required process, and then redirect the standard output of the process to get the process to print the message. Step S102, redirecting the print message to a set storage device.
  • the usb scan thread is responsible for the opening and closing of the usb print redirection function.
  • the thread scans the root directory of the usb interface storage device for the specified file. If it exists, it starts usb.
  • Print redirection function if it does not exist, turn off usb print redirection.
  • the syn log thread is responsible for redirecting kernel print messages to the system temporary file;
  • the usbcmd scan thread is responsible for executing user-specified programs or script files that redirect the standard output of the user-specified program or script file to the system temporary file.
  • the usb syn thread is responsible for synchronizing the print message to the usb interface device, which periodically synchronizes the temporary files cached in the system to the usb interface storage device.
  • a file structure is required, and then the following function is called to complete the redirection operation.
  • Void register— redir— func(unsigned long funcaddr, struct file ⁇ filep) ko tty.magic TTY MAGIC;
  • subtype PTY TYPE— MASTER
  • Redirops.write TYPE_CAST(write_fn, funcddr);
  • the embodiment of the present invention further relates to a print message acquiring apparatus for implementing the above method, comprising: a print message acquiring unit 201, configured to acquire a print message output by a device; and a redirecting unit 202, configured to The print message is redirected to the set storage device.
  • the print message obtaining unit 201 is further configured to: when the print message is a kernel print message of the Rex Linux system, obtain the kernel print message from the buffer Buffer through a Syslog interface provided by the Linux system; When the print message prints a message for the process of the Rex Linux system, the process print message of the process is obtained by the file open table corresponding to each process.
  • Redirecting unit 202 to redirect the print message to the set storage device means copying the print message to the set storage device; wherein the storage device is a universal serial bus USB interface storage device.
  • Embodiments of the present invention provide a method and an apparatus for acquiring a print message, which can remotely locate a Linux kernel problem of a device without requiring a person to go to the device site, thereby improving the efficiency of the developer positioning fault, thereby improving maintenance efficiency, especially the device.
  • the technical advantages of the present invention are more apparent. While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.
  • a method and an apparatus for acquiring a print message according to an embodiment of the present invention have the following beneficial effects:
  • the Linux kernel problem of the device can be remotely located without requiring personnel to the device site to improve developer positioning.
  • the efficiency of the failure, and thus the maintenance efficiency, especially in the remote areas, the technical advantages of the present invention are more obvious.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

Disclosed are a printing message acquisition method and apparatus. The method comprises: acquiring a printing message which is output by a device; and redirecting the printing message into a set storage device. By means of the present invention, the problem in the prior art that a printing message which is output by a Linux kernel can only be displayed and viewed locally is solved, so that the Linux kernel problem of the device can be located remotely without needing staff to reach a device site, thereby improving the efficiency for a developer locating a fault, and then improving the maintenance efficiency. Particularly when the device is located in a remote region, the present invention has relatively obvious technical advantages.

Description

打印消息获取方法及装置 技术领域 本发明涉及计算机技术领域, 特别是涉及一种打印消息获取方法及装置。 背景技术 Linux (里纽克斯)作为一种***的操作***, 目前在产品开发中使用越来越 多。 Linux 内核实时输出的打印消息和普通进程的打印消息通常只在确定的终端上显 示。如在连接显示器的 Linux机器上, Linux内核输出通常会显示到显示器上; 在嵌入 式 Linux设备上, Linux内核输出通常会输出到串口设备上。 Linux内核输出的打印消 息只能在本地显示查看, 这样导致的一个弊端是当设备现场运行过程中, Linux 内核 出现问题, 人员必须要赶到现场来进行获取打印信息, 给设备维护带来很大不便。 发明内容 本发明实施例要解决的技术问题是提供一种打印消息获取方法及装置, 用以解决 现有技术中 Linux内核输出的打印消息只能在本地显示查看的问题。 为解决上述技术问题, 一方面, 本发明实施例提供一种打印消息获取方法, 包括: 获取设备输出的打印消息; 将所述打印消息重定向到设定的存储设备中。 进一步, 当所述打印消息为里纽克斯 Linux***的内核打印消息时, 通过 Linux ***提供的 Syslog接口从缓存器 Buffer中获取所述内核打印消息。 进一步, 当所述打印消息为里纽克斯 Linux***的进程打印消息时, 通过每个进 程对应的文件打开表获取该进程的进程打印消息。 进一步, 将所述打印消息重定向到设定的存储设备中是指将所述打印消息复制到 设定的存储设备中。 进一步, 所述存储设备为通用串行总线 USB接口存储设备。 另一方面, 本发明实施例还提供一种打印消息获取装置, 包括: 打印消息获取单元, 设置为获取设备输出的打印消息; 重定向单元, 设置为将所述打印消息重定向到设定的存储设备中。 进一步, 所述打印消息获取单元还设置为: 当所述打印消息为里纽克斯 Linux***的内核打印消息时, 通过 Linux***提供 的 Syslog接口从缓存器 Buffer中获取所述内核打印消息。 进一步, 所述打印消息获取单元还设置为: 当所述打印消息为里纽克斯 Linux***的进程打印消息时, 通过每个进程对应的 文件打开表获取该进程的进程打印消息。 进一步, 所述重定向单元将所述打印消息重定向到设定的存储设备中, 是指将所 述打印消息复制到设定的存储设备中。 进一步, 所述存储设备为通用串行总线 USB接口存储设备。 本发明实施例有益效果如下: 本发明提供一种获取打印消息的方法和装置, 可以远程对设备的 Linux内核问题 进行定位, 而不需人员到设备现场, 提高开发人员定位故障的效率, 进而提高维护效 率, 特别是设备在偏远地区, 本发明的技术优势更明显。 附图说明 图 1 是本发明实施例中一种打印消息获取方法的流程图; 图 2 是本发明实施例中一种打印消息获取装置的结构示意图。 具体实施方式 以下结合附图以及实施例, 对本发明进行进一歩详细说明。 应当理解, 此处所描 述的具体实施例仅仅用以解释本发明, 并不限定本发明。 如图 1所示, 本发明实施例涉及一种打印消息获取方法, 包括: 步骤 S101, 获取设备输出的打印消息; 本步骤中, 打印消息包括内核打印消息和 /或进程打印消息。 Linux内核打印信息实时输出直接调用 printk ( ) 内核函数。 从内部实现机理看, Linux内核维护一个内核实时信息输出设备列表(console—drivers),有内核打印信息输 出时, 将遍历这个设备列表, 将内核打印消息输出到所有的设备中。 Linux 内核会把 内核打印消息缓存到内部的 buffer (缓存区)中,为了获取内核的这些打印,需要从 buffer 中取出来然后重定向到 usb接口存储设备中。 Linux内核会把内核的打印消息缓存到内 部的 buffer中, Linux提供了 syslog接口, 可以非常方便地获取到内核打印消息。 The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for acquiring a print message. BACKGROUND OF THE INVENTION Linux (Riox) is a freely used operating system and is currently used more and more in product development. Print messages for real-time output by the Linux kernel and print messages for normal processes are usually displayed only on certain terminals. For example, on a Linux machine connected to a monitor, the Linux kernel output is usually displayed on the display; on an embedded Linux device, the Linux kernel output is usually output to the serial device. The print message output by the Linux kernel can only be displayed locally. This has the disadvantage that when the device is running in the field, there is a problem with the Linux kernel. The personnel must rush to the site to obtain the print information, which brings great equipment maintenance. inconvenient. SUMMARY OF THE INVENTION The technical problem to be solved by the embodiments of the present invention is to provide a method and a device for acquiring a print message, which are used to solve the problem that a print message output by a Linux kernel in the prior art can only be displayed locally. To solve the above technical problem, in one aspect, an embodiment of the present invention provides a method for acquiring a print message, including: acquiring a print message output by a device; and redirecting the print message to a set storage device. Further, when the print message is a kernel print message of the Reniks Linux system, the kernel print message is obtained from the buffer Buffer through a Syslog interface provided by the Linux system. Further, when the print message prints a message for a process of the Rex Linux system, the process print message of the process is obtained by the file open table corresponding to each process. Further, redirecting the print message to the set storage device means copying the print message to the set storage device. Further, the storage device is a universal serial bus USB interface storage device. In another aspect, the embodiment of the present invention further provides a print message acquiring apparatus, including: a print message obtaining unit, configured to obtain a print message output by the device; and a redirecting unit configured to redirect the print message to the set storage device. Further, the print message obtaining unit is further configured to: when the print message is a kernel print message of the Rex Linux system, obtain the kernel print message from the buffer Buffer through a Syslog interface provided by the Linux system. Further, the print message obtaining unit is further configured to: when the print message is a process print message of the Rex Linux system, obtain a process print message of the process by using a file open table corresponding to each process. Further, the redirecting unit redirects the print message to the set storage device, which means copying the print message to the set storage device. Further, the storage device is a universal serial bus USB interface storage device. The beneficial effects of the embodiments of the present invention are as follows: The present invention provides a method and device for acquiring a printed message, which can remotely locate a Linux kernel problem of the device without requiring personnel to go to the device site, thereby improving the efficiency of the developer positioning fault, thereby improving The technical advantages of the present invention are more apparent in terms of maintenance efficiency, particularly in remote areas. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flowchart of a method for acquiring a print message according to an embodiment of the present invention; FIG. 2 is a schematic structural diagram of a device for acquiring a print message according to an embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. As shown in FIG. 1 , an embodiment of the present invention relates to a method for acquiring a print message, including: Step S101: Acquire a print message output by a device; In this step, the print message includes a kernel print message and/or a process print message. The Linux kernel prints the real-time output of the print directly to the printk ( ) kernel function. From the internal implementation mechanism, the Linux kernel maintains a list of kernel real-time information output devices (console-drivers). When the kernel prints information, it will traverse this device list and output kernel print messages to all devices. The Linux kernel caches kernel print messages into the internal buffer. To get the kernel's prints, you need to fetch them from the buffer and redirect them to the usb interface storage device. The Linux kernel will cache the kernel's print messages into the internal buffer. Linux provides a syslog interface, which makes it easy to get the kernel to print messages.
Linux***的普通进程的打印消息是通过调用 printf ( ) 函数实现的。 缺省情况下 进程的打印消息会输出到标准输出上, 单板缺省的标准输出就是串口, 所以为了获取 进程的打印消息, 需要对进程的标准输出进行重定向。在 Linux***中, Linux内核为 ***中每个进程提供了一个文件打开表, 其中文件打开表的前三项 0、 1、 2分别是标 准输入, 标准输出, 标准错误输出。 我们只关注进程的输出。 为了获取指定进程的打 印消息, 需要启动所需要的进程, 然后对进程的标准输出进行重定向, 以获取进程打 印消息。 步骤 S102, 将所述打印消息重定向到设定的存储设备中。 在已经获取到内核打印消息和进程打印消息后, 本步骤就是执行具体的重定向操 作, 因此, 也是实现打印消息到 usb接口存储设备的关键步骤。 下面, 通过具体线程详细描述本发明技术方案。 为了实现获取打印消息, 需要启 用几个内核线程: usb scan线程负责 usb打印重定向功能的开启和关闭,该线程会扫描 usb接口存储 设备的根目录下是否存在指定文件, 如果存在, 则启动 usb打印重定向功能, 如果不 存在, 则关闭 usb打印重定向功能。 syn log线程负责把内核打印消息重定向到***临时文件中; usbcmd scan线程负责执行用户指定的程序或者脚本文件,该线程会将用户指定的 程序或者脚本文件的标准输出重定向到***临时文件中; usb syn线程负责把打印消息同步到 usb接口设备中, 该线程周期性地把缓存在系 统的临时文件同步到 usb接口存储设备中。 为了能够将打印消息重定向到 usb接口设备中, 需要一个 file结构, 然后调用如 下的函数完成重定向操作。 void register— redir— func(unsigned long funcaddr, struct file ^filep) ko tty.magic = TTY MAGIC; The print message of the normal process of the Linux system is implemented by calling the printf ( ) function. By default, the print message of the process is output to the standard output. The default standard output of the board is the serial port. Therefore, in order to obtain the print message of the process, the standard output of the process needs to be redirected. In the Linux system, the Linux kernel provides a file open table for each process in the system. The first three items 0, 1, and 2 of the file open table are standard input, standard output, and standard error output. We only focus on the output of the process. In order to get the print message of the specified process, you need to start the required process, and then redirect the standard output of the process to get the process to print the message. Step S102, redirecting the print message to a set storage device. After the kernel print message and the process print message have been obtained, this step is to perform a specific redirection operation, and therefore, it is also a key step to realize printing a message to the usb interface storage device. Hereinafter, the technical solution of the present invention will be described in detail through specific threads. In order to obtain the print message, several kernel threads need to be enabled: The usb scan thread is responsible for the opening and closing of the usb print redirection function. The thread scans the root directory of the usb interface storage device for the specified file. If it exists, it starts usb. Print redirection function, if it does not exist, turn off usb print redirection. The syn log thread is responsible for redirecting kernel print messages to the system temporary file; the usbcmd scan thread is responsible for executing user-specified programs or script files that redirect the standard output of the user-specified program or script file to the system temporary file. The usb syn thread is responsible for synchronizing the print message to the usb interface device, which periodically synchronizes the temporary files cached in the system to the usb interface storage device. In order to be able to redirect print messages to the usb interface device, a file structure is required, and then the following function is called to complete the redirection operation. Void register— redir— func(unsigned long funcaddr, struct file ^filep) ko tty.magic = TTY MAGIC;
ko—tty. driver = &ko_driver;  Ko-tty. driver = &ko_driver;
ko driver.type = TTY DRIVER— TYPE— CONSOLE;  Ko driver.type = TTY DRIVER— TYPE— CONSOLE;
ko driver. subtype = PTY TYPE— MASTER;  Ko driver. subtype = PTY TYPE— MASTER;
redirops.write = TYPE_CAST(write_fn,funcaddr);  Redirops.write = TYPE_CAST(write_fn, funcddr);
redirops.unlocked— ioctl = redir— ioctl;  Redirops.unlocked— ioctl = redir— ioctl;
ko_file.f— mode |= FMODE WRITE;  Ko_file.f— mode |= FMODE WRITE;
ko_file.f_mode |= FMODE NONOTIFY;/* Linux 3.4.11 */ Ko_file.f_mode |= FMODE NONOTIFY;/* Linux 3.4.11 */
ko_file.f_op=&redirops;  Ko_file.f_op=&redirops;
/* Linux 3.4.11 add "struct tty_file_private" /* Linux 3.4.11 add "struct tty_file_private"
* see linux/drivers/tty/tty_io.c in detail.  * see linux/drivers/tty/tty_io.c in detail.
*/ */
ko_file_private.tty = &ko_tty; Ko_file_private.tty = &ko_tty;
ko— file. private— data = &ko— file_private;  Ko— file. private— data = &ko— file_private;
if (NULL != filep)/* 不赋值在 sys— write函数中会出错, 需要判断 */  If (NULL != filep)/* does not assign a value in the sys-write function, it needs to be judged */
ko_file.f_path.dentry = filep->f_path.dentry; Ko_file.f_path.dentry = filep->f_path.dentry;
}  }
_tty_ioctl(&ko_file, TIOCCONS, 0);  _tty_ioctl(&ko_file, TIOCCONS, 0);
return; 通过以上步骤, 实现了将 Linux***中打印信息输出到 usb接口存储设备中, 实 现简单, 对设备进行维护时, 执行简捷, 很大的方便了对设备的维护, 提高开发人员 定位单板故障的效率。 如图 2所示,本发明实施例还涉及一种实现上述方法的打印消息获取装置,包括: 打印消息获取单元 201, 设置为获取设备输出的打印消息; 重定向单元 202, 设置为将所述打印消息重定向到设定的存储设备中。 其中, 打印消息获取单元 201还设置为: 当所述打印消息为里纽克斯 Linux***的内核打印消息时, 通过 Linux***提供 的 Syslog接口从缓存器 Buffer中获取所述内核打印消息; 当所述打印消息为里纽克斯 Linux***的进程打印消息时, 通过每个进程对应的 文件打开表获取该进程的进程打印消息。 重定向单元 202将所述打印消息重定向到设定的存储设备中, 是指将所述打印消 息复制到设定的存储设备中; 其中, 存储设备为通用串行总线 USB接口存储设备。 本发明实施例提供一种获取打印消息的方法和装置, 可以远程对设备的 Linux内 核问题进行定位, 而不需人员到设备现场, 提高开发人员定位故障的效率, 进而提高 维护效率, 特别是设备在偏远地区, 本发明的技术优势更明显。 尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人员将意识到 各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当不限于上述实施例。 工业实用性 如上所述, 本发明实施例提供的一种打印消息获取方法及装置, 具有以下有益效 果: 可以远程对设备的 Linux内核问题进行定位, 而不需人员到设备现场, 提高开发 人员定位故障的效率, 进而提高维护效率, 特别是设备在偏远地区, 本发明的技术优 势更明显。 Return; Through the above steps, the printing information in the Linux system is output to the usb interface storage device, which is simple to implement. When the device is maintained, the implementation is simple and convenient, which greatly facilitates the maintenance of the device and improves the fault of the developer positioning the board. effectiveness. As shown in FIG. 2, the embodiment of the present invention further relates to a print message acquiring apparatus for implementing the above method, comprising: a print message acquiring unit 201, configured to acquire a print message output by a device; and a redirecting unit 202, configured to The print message is redirected to the set storage device. The print message obtaining unit 201 is further configured to: when the print message is a kernel print message of the Rex Linux system, obtain the kernel print message from the buffer Buffer through a Syslog interface provided by the Linux system; When the print message prints a message for the process of the Rex Linux system, the process print message of the process is obtained by the file open table corresponding to each process. Redirecting unit 202 to redirect the print message to the set storage device means copying the print message to the set storage device; wherein the storage device is a universal serial bus USB interface storage device. Embodiments of the present invention provide a method and an apparatus for acquiring a print message, which can remotely locate a Linux kernel problem of a device without requiring a person to go to the device site, thereby improving the efficiency of the developer positioning fault, thereby improving maintenance efficiency, especially the device. In remote areas, the technical advantages of the present invention are more apparent. While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above. INDUSTRIAL APPLICABILITY As described above, a method and an apparatus for acquiring a print message according to an embodiment of the present invention have the following beneficial effects: The Linux kernel problem of the device can be remotely located without requiring personnel to the device site to improve developer positioning. The efficiency of the failure, and thus the maintenance efficiency, especially in the remote areas, the technical advantages of the present invention are more obvious.

Claims

权 利 要 求 书 、 一种打印消息获取方法, 包括: 获取设备输出的打印消息;  The claim method, a method for obtaining a print message, comprising: obtaining a print message output by the device;
将所述打印消息重定向到设定的存储设备中。 、 如权利要求 1 所述的打印消息获取方法, 其中, 当所述打印消息为里纽克斯 Linux ***的内核打印消息时, 通过 Linux***提供的 Syslog接口从缓存器 Buffer中获取所述内核打印消息。 、 如权利要求 1或 2所述的打印消息获取方法, 其中, 当所述打印消息为里纽克 斯 Linux***的进程打印消息时, 通过每个进程对应的文件打开表获取该进程 的进程打印消息。 、 如权利要求 3所述的打印消息获取方法, 其中, 将所述打印消息重定向到设定 的存储设备中是指将所述打印消息复制到设定的存储设备中。 、 如权利要求 1、 2或 4所述的打印消息获取方法, 其中, 所述存储设备为通用串 行总线 USB接口存储设备。 、 一种打印消息获取装置, 包括: 打印消息获取单元, 设置为获取设备输出的打印消息;  The print message is redirected to the set storage device. The method for obtaining a print message according to claim 1, wherein when the print message is a kernel print message of a Reniks Linux system, the kernel print is obtained from a buffer Buffer through a Syslog interface provided by a Linux system. Message. The method for obtaining a print message according to claim 1 or 2, wherein, when the print message is a process print message of the Rex Linux system, the process of the process is obtained by the file open table corresponding to each process. Message. The method for acquiring a print message according to claim 3, wherein redirecting the print message to the set storage device means copying the print message to the set storage device. The method for obtaining a print message according to claim 1, 2 or 4, wherein the storage device is a universal serial bus USB interface storage device. a print message acquiring device, comprising: a print message acquiring unit, configured to acquire a print message output by the device;
重定向单元, 设置为将所述打印消息重定向到设定的存储设备中。 、 如权利要求 6所述的打印消息获取装置, 其中, 所述打印消息获取单元还设置 为:  A redirecting unit, configured to redirect the print message to a set storage device. The print message acquiring apparatus according to claim 6, wherein the print message acquiring unit is further configured to:
当所述打印消息为里纽克斯 Linux***的内核打印消息时, 通过 Linux系 统提供的 Syslog接口从缓存器 Buffer中获取所述内核打印消息。 、 如权利要求 6或 7所述的打印消息获取装置, 其中, 所述打印消息获取单元还 设置为:  When the print message is a kernel print message of the Reniks Linux system, the kernel print message is obtained from the buffer Buffer through the Syslog interface provided by the Linux system. The print message acquiring apparatus according to claim 6 or 7, wherein the print message acquiring unit is further configured to:
当所述打印消息为里纽克斯 Linux***的进程打印消息时, 通过每个进程 对应的文件打开表获取该进程的进程打印消息。 、 如权利要求 8所述的打印消息获取装置, 其中, 所述重定向单元将所述打印消 息重定向到设定的存储设备中,是指将所述打印消息复制到设定的存储设备中。 0、 如权利要求 6、 7或 9所述的打印消息获取装置, 其中, 所述存储设备为通用串 行总线 USB接口存储设备。 When the print message prints a message for the process of the Rex Linux system, the process print message of the process is obtained by the file open table corresponding to each process. The print message acquiring apparatus according to claim 8, wherein the redirecting unit redirects the print message to the set storage device, which means copying the print message to the set storage device. . 0. The print message acquiring apparatus according to claim 6, 7 or 9, wherein the storage device is a universal serial bus USB interface storage device.
PCT/CN2014/085061 2014-06-11 2014-08-22 Printing message acquisition method and apparatus WO2015188457A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410257469.3 2014-06-11
CN201410257469.3A CN105278927A (en) 2014-06-11 2014-06-11 Printing message obtaining method and printing message obtaining device

Publications (1)

Publication Number Publication Date
WO2015188457A1 true WO2015188457A1 (en) 2015-12-17

Family

ID=54832780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/085061 WO2015188457A1 (en) 2014-06-11 2014-08-22 Printing message acquisition method and apparatus

Country Status (2)

Country Link
CN (1) CN105278927A (en)
WO (1) WO2015188457A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908576A (en) * 2017-12-08 2018-04-13 上海市共进通信技术有限公司 The method for realizing re-direction applications program standard output control
CN111045977B (en) * 2019-12-18 2021-07-27 深圳先进技术研究院 USB serial port implementation method of Linux system console and related product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925666A (en) * 2006-09-30 2007-03-07 华为技术有限公司 Device and method for realizing reorienting of veneer equipment serial port
CN101340314A (en) * 2008-08-11 2009-01-07 中兴通讯股份有限公司 Real-time debugging positioning method of embedded system and apparatus thereof
CN101800843A (en) * 2010-04-22 2010-08-11 四川长虹电器股份有限公司 Set top box capturing printing information method
US20110185068A1 (en) * 2010-01-22 2011-07-28 Microsoft Corporation Multi-link remote protocol
CN102609349A (en) * 2012-02-08 2012-07-25 北京百度网讯科技有限公司 Method and system for screen capture in server failure

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289368B (en) * 2011-06-17 2017-09-05 中兴通讯股份有限公司 A kind of method and system for obtaining serial printing information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925666A (en) * 2006-09-30 2007-03-07 华为技术有限公司 Device and method for realizing reorienting of veneer equipment serial port
CN101340314A (en) * 2008-08-11 2009-01-07 中兴通讯股份有限公司 Real-time debugging positioning method of embedded system and apparatus thereof
US20110185068A1 (en) * 2010-01-22 2011-07-28 Microsoft Corporation Multi-link remote protocol
CN101800843A (en) * 2010-04-22 2010-08-11 四川长虹电器股份有限公司 Set top box capturing printing information method
CN102609349A (en) * 2012-02-08 2012-07-25 北京百度网讯科技有限公司 Method and system for screen capture in server failure

Also Published As

Publication number Publication date
CN105278927A (en) 2016-01-27

Similar Documents

Publication Publication Date Title
US7216257B2 (en) Remote debugging
US9471474B2 (en) Cloud deployment infrastructure validation engine
TWI476692B (en) Device and method for notifying configuration files change in multiple operation systems
JP2007226413A (en) Memory dump method, memory dump program and computer system
JP6576071B2 (en) Information processing apparatus, server client system, information processing apparatus control method, and program
JP2015046075A (en) Information processor, control method therefor, and computer program
CN107707687A (en) A kind of method and apparatus of virtual machine IP address configuration
CN107710720B (en) Cloud computing for mobile client devices
WO2015131549A1 (en) Method and device for collecting operating system fault information, and computer
JP2016018339A (en) System and control method for system
WO2015188457A1 (en) Printing message acquisition method and apparatus
JP2016139307A (en) Information processing device, program, and recording medium
JP2006072684A (en) Storage network system, management server, host and storage device
JP2011028438A (en) Application verification system and computer program
JP2015032142A (en) Computer system and device driver installation method
JP6281122B2 (en) Information processing device
JP7381146B1 (en) Management system, adapter device, management method and program
JP5613091B2 (en) Device driver startup monitoring program, electronic equipment
JP2011150459A (en) Disaster recovery system and backup site construction method
JP2007183804A (en) Console, operation management device, simultaneous operation management system, simultaneous operation method of a plurality of devices, and program
WO2013145361A1 (en) OSGi EXECUTION DEVICE AND OSGi SYSTEM
JP2017103521A (en) Information processing device and control method thereof, and program
JP2003067192A (en) Program configuration management system
JP3577234B2 (en) Process management equipment
JP2015146063A (en) Method of handling and processing memory leak and abnormal end of management process

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14894212

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14894212

Country of ref document: EP

Kind code of ref document: A1