[Linux command] Linux checks the log of a certain time period (sed -n)

preface When searching for logs on linux, if I want to find logs for a certain period of time, such as looking for logs from 8 a.m. to 2 p.m. this morning. It's not convenient to filter it directly with grep. You can use sed to find it according to time sed -n '/ start time date /, / end time date / p' all.log Find log For example, the time f ...

Posted by chandler on Mon, 22 Nov 2021 20:32:34 +0100

Java code modularization - method

Java code modularization - method 1. Concept of method The purpose of Java method: modularity, reusability and simple application 2. Structure 3. Grammar public satatic int add(int a,int b,int c){ int sum = a+b+c; return sum; } public: access control characterStatic: static / /!!!int /double/void: enlarged return typeadd: na ...

Posted by chomedey on Mon, 22 Nov 2021 14:44:19 +0100

Linux three swordsman grep|sed|awk

linux three swordsman 1. Three swordsman application scenarios characteristiccommandscenegrepfilterThe grep command filters the fastestsedReplace, modify file content, take lineIf replacement / modification is required;Take out the content in a range (from 11:00 to 12:00)awkColumn fetching and statistical calculationTake columnComparison, com ...

Posted by goldlikesnow on Mon, 22 Nov 2021 01:06:09 +0100

Flume Agent Component Matching

1. Agent Components Components in Agent include Source, Channel, Sink. 1.1 Source The Source component can handle various types and formats of log data. Common source s in Flume: avroexecnetcatspooling directorytaildir Common CategoriesdescribeavroListen for Avro ports and receive Event s from external Avro client streamsexecExec source r ...

Posted by sohdubom on Sun, 21 Nov 2021 19:51:24 +0100

Linux three swordsmen awk

Linux three swordsmen awk awk description awk - pattern scanning and processing language; awk is gawk, which is more like a language and is very powerful in file processing; awk can customize variables, functions, loops, conditional statements, etc; awk judges and processes data line by line; awk usage awk command syntax Precedin ...

Posted by brem13 on Sat, 20 Nov 2021 22:25:31 +0100

Linux kernel learning 4 -- print process descriptor task_ Fields in struct

Let's practice printing process descriptor task_ Fields in struct The method used here is to insert the kernel module, and the method used is to traverse the process linked list 1, Task_ A preliminary interpretation of struct First, download your own source code. You can refer to my previous blog https://blog.csdn.net/weixin_45730790/article ...

Posted by shaunie123 on Sat, 20 Nov 2021 17:02:59 +0100

Detailed parameter adjustment of camera under V4L2

1, Common parameters of camera (camera) The path of V4L2 related header files under Linux is / kernel source code directory / include/linux/videodev2.h, and V4L2 related API documents. White balance (automatic white balance AWB), color temperature, exposure (automatic exposure AE, exposure compensation EV), brightness, contrast, saturation ...

Posted by satan165 on Sat, 20 Nov 2021 14:26:54 +0100

Linux implements file operation in virtual file system / proc

1, Experimental purpose 1. Understand the content of virtual file system in Linux 2. Learn how to write kernel modules 3. Implementation of file operation algorithm in virtual file system / proc 2, Experimental environment Centos7.9,vim 3, Experimental content Write a kernel module, add a directory hello in the / proc file system, and add a fi ...

Posted by pramodv on Sat, 20 Nov 2021 12:11:32 +0100

Docker learning notes -- kuangshen Docker video learning notes

Docker ! 1. Appearance of docker One product: development – launch two sets of environments! Application environment, application configuration! Development – O & M. Question: I can run on my computer! Service unavailable due to version update! For operation and maintenance, the test is very big? The environment configuratio ...

Posted by jandrews3 on Sat, 20 Nov 2021 12:01:01 +0100

Threads listening for signals in the JVM and Unix domain socket communication threads

[experiment] package com.infuq.tmp; public class Main { public static void main(String args[]) { for (;;) { try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } } } } In the above code, let the JVM not exit. Let's do so ...

Posted by randomfool on Sat, 20 Nov 2021 11:23:05 +0100