BCC源码内容概览(5)

news2024/11/20 21:26:32

接前一篇文章:BCC源码内容概览(4)

本文参考官网中的Contents部分的介绍。

BCC源码根目录的文件,其中一些是同时包含C和Python的单个文件,另一些是.c和.py的成对文件,还有一些是目录。

工具(Tools)

eBPF工具概览图如下:

tools目录下的文件:

  • tools/argdist

将函数参数值显示为直方图或频率计数。 

bcc/tools/argdist_example.txt文件内容如下:

Demonstrations of argdist.


argdist probes functions you specify and collects parameter values into a
histogram or a frequency count. This can be used to understand the distribution
of values a certain parameter takes, filter and print interesting parameters
without attaching a debugger, and obtain general execution statistics on
various functions.

For example, suppose you want to find what allocation sizes are common in
your application:

# ./argdist -p 2420 -c -C 'p:c:malloc(size_t size):size_t:size'
[01:42:29]
p:c:malloc(size_t size):size_t:size
        COUNT      EVENT
[01:42:30]
p:c:malloc(size_t size):size_t:size
        COUNT      EVENT
[01:42:31]
p:c:malloc(size_t size):size_t:size
        COUNT      EVENT
        1          size = 16
[01:42:32]
p:c:malloc(size_t size):size_t:size
        COUNT      EVENT
        2          size = 16
[01:42:33]
p:c:malloc(size_t size):size_t:size
        COUNT      EVENT
        3          size = 16
[01:42:34]
p:c:malloc(size_t size):size_t:size
        COUNT      EVENT
        4          size = 16
^C

It seems that the application is allocating blocks of size 16. The COUNT
column contains the number of occurrences of a particular event, and the
EVENT column describes the event. In this case, the "size" parameter was 
probed and its value was 16, repeatedly.

Now, suppose you wanted a histogram of buffer sizes passed to the write()
function across the system:

# ./argdist -c -H 'p:c:write(int fd, void *buf, size_t len):size_t:len'
[01:45:22]
p:c:write(int fd, void *buf, size_t len):size_t:len
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 2        |*************                           |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 2        |*************                           |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 6        |****************************************|
[01:45:23]
p:c:write(int fd, void *buf, size_t len):size_t:len
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 11       |***************                         |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 4        |*****                                   |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 28       |****************************************|
        64 -> 127        : 12       |*****************                       |
[01:45:24]
p:c:write(int fd, void *buf, size_t len):size_t:len
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 21       |****************                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 6        |****                                    |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 52       |****************************************|
        64 -> 127        : 26       |********************                    |
^C

It seems that most writes fall into three buckets: very small writes of 2-3
bytes, medium writes of 32-63 bytes, and larger writes of 64-127 bytes.

But these are writes across the board -- what if you wanted to focus on writes
to STDOUT?

# ./argdist -c -H 'p:c:write(int fd, void *buf, size_t len):size_t:len:fd==1'
[01:47:17]
p:c:write(int fd, void *buf, size_t len):size_t:len:fd==1
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 1        |****************************************|
        16 -> 31         : 0        |                                        |
        32 -> 63         : 1        |****************************************|
[01:47:18]
p:c:write(int fd, void *buf, size_t len):size_t:len:fd==1
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 2        |*************                           |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 3        |********************                    |
        64 -> 127        : 6        |****************************************|
[01:47:19]
p:c:write(int fd, void *buf, size_t len):size_t:len:fd==1
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 3        |*********                               |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 5        |***************                         |
        64 -> 127        : 13       |****************************************|
^C

The "fd==1" part is a filter that is applied to every invocation of write().
Only if the filter condition is true, the value is recorded.

You can also use argdist to trace kernel functions. For example, suppose you
wanted a histogram of kernel allocation (kmalloc) sizes across the system,
printed twice with 3 second intervals:

# ./argdist -i 3 -n 2 -H 'p::__kmalloc(size_t size):size_t:size'
[01:50:00]
p::__kmalloc(size_t size):size_t:size
     size                : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 6        |****************************************|
[01:50:03]
p::__kmalloc(size_t size):size_t:size
     size                : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 22       |****************************************|
        16 -> 31         : 0        |                                        |
        32 -> 63         : 0        |                                        |
        64 -> 127        : 5        |*********                               |
       128 -> 255        : 2        |***                                     |

Occasionally, numeric information isn't enough and you want to capture strings.
What are the strings printed by puts() across the system?

# ./argdist -i 10 -n 1 -C 'p:c:puts(char *str):char*:str'
[01:53:54]
p:c:puts(char *str):char*:str
        COUNT      EVENT
        2          str = Press ENTER to start.

It looks like the message "Press ENTER to start." was printed twice during the
10 seconds we were tracing.

What about reads? You could trace gets() across the system and print the 
strings input by the user (note how "r" is used instead of "p" to attach a
probe to the function's return):

# ./argdist -i 10 -n 1 -C 'r:c:gets():char*:(char*)$retval:$retval!=0'
[02:12:23]
r:c:gets():char*:$retval:$retval!=0
        COUNT      EVENT
        1          (char*)$retval = hi there
        3          (char*)$retval = sasha
        8          (char*)$retval = hello

Similarly, we could get a histogram of the error codes returned by read():

# ./argdist -i 10 -c 1 -H 'r:c:read()'
[02:15:36]
r:c:read()
     retval              : count     distribution
         0 -> 1          : 29       |****************************************|
         2 -> 3          : 11       |***************                         |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 3        |****                                    |
        16 -> 31         : 2        |**                                      |
        32 -> 63         : 22       |******************************          |
        64 -> 127        : 5        |******                                  |
       128 -> 255        : 0        |                                        |
       256 -> 511        : 1        |*                                       |
       512 -> 1023       : 1        |*                                       |
      1024 -> 2047       : 0        |                                        |
      2048 -> 4095       : 2        |**                                      |

In return probes, you can also trace the latency of the function (unless it is
recursive) and the parameters it had on entry. For example, we can identify
which processes are performing slow synchronous filesystem reads -- say,
longer than 0.1ms (100,000ns):

# ./argdist -C 'r::__vfs_read():u32:$PID:$latency > 100000'
[01:08:48]
r::__vfs_read():u32:$PID:$latency > 100000
        COUNT      EVENT
        1          $PID = 10457
        21         $PID = 2780
[01:08:49]
r::__vfs_read():u32:$PID:$latency > 100000
        COUNT      EVENT
        1          $PID = 10457
        21         $PID = 2780
^C

It looks like process 2780 performed 21 slow reads.

You can print the name of the process. This is helpful for short lived processes
and for easier identification of processes response. For example, we can identify
the process using the epoll I/O multiplexing system call

# ./argdist -C 't:syscalls:sys_exit_epoll_wait():char*:$COMM'
[19:57:56]
t:syscalls:sys_exit_epoll_wait():char*:$COMM
	COUNT      EVENT
	4          $COMM = b'node'
[19:57:57]
t:syscalls:sys_exit_epoll_wait():char*:$COMM
	COUNT      EVENT
	2          $COMM = b'open5gs-sgwud'
	3          $COMM = b'open5gs-sgwcd'
	3          $COMM = b'open5gs-nrfd'
	3          $COMM = b'open5gs-udmd'
	4          $COMM = b'open5gs-scpd'

Occasionally, entry parameter values are also interesting. For example, you
might be curious how long it takes malloc() to allocate memory -- nanoseconds
per byte allocated. Let's go:

# ./argdist -H 'r:c:malloc(size_t size):u64:$latency/$entry(size);ns per byte' -n 1 -i 10
[01:11:13]
     ns per byte         : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 4        |*****************                       |
         4 -> 7          : 3        |*************                           |
         8 -> 15         : 2        |********                                |
        16 -> 31         : 1        |****                                    |
        32 -> 63         : 0        |                                        |
        64 -> 127        : 7        |*******************************         |
       128 -> 255        : 1        |****                                    |
       256 -> 511        : 0        |                                        |
       512 -> 1023       : 1        |****                                    |
      1024 -> 2047       : 1        |****                                    |
      2048 -> 4095       : 9        |****************************************|
      4096 -> 8191       : 1        |****                                    | 

It looks like a tri-modal distribution. Some allocations are extremely cheap,
and take 2-15 nanoseconds per byte. Other allocations are slower, and take
64-127 nanoseconds per byte. And some allocations are slower still, and take
multiple microseconds per byte.

You could also group results by more than one field. For example, __kmalloc
takes an additional flags parameter that describes how to allocate memory:

# ./argdist -c -C 'p::__kmalloc(size_t size, gfp_t flags):gfp_t,size_t:flags,size'
[03:42:29]
p::__kmalloc(size_t size, gfp_t flags):gfp_t,size_t:flags,size
        COUNT      EVENT
        1          flags = 16, size = 152
        2          flags = 131280, size = 8
        7          flags = 131280, size = 16
[03:42:30]
p::__kmalloc(size_t size, gfp_t flags):gfp_t,size_t:flags,size
        COUNT      EVENT
        1          flags = 16, size = 152
        6          flags = 131280, size = 8
        19         flags = 131280, size = 16
[03:42:31]
p::__kmalloc(size_t size, gfp_t flags):gfp_t,size_t:flags,size
        COUNT      EVENT
        2          flags = 16, size = 152
        10         flags = 131280, size = 8
        31         flags = 131280, size = 16
[03:42:32]
p::__kmalloc(size_t size, gfp_t flags):gfp_t,size_t:flags,size
        COUNT      EVENT
        2          flags = 16, size = 152
        14         flags = 131280, size = 8
        43         flags = 131280, size = 16
^C

The flags value must be expanded by hand, but it's still helpful to eliminate
certain kinds of allocations or visually group them together.

argdist also has basic support for kernel tracepoints. It is sometimes more
convenient to use tracepoints because they are documented and don't vary a lot
between kernel versions. For example, let's trace the net:net_dev_start_xmit
tracepoint and print out the protocol field from the tracepoint structure:

# argdist -C 't:net:net_dev_start_xmit():u16:args->protocol'
[13:01:49]
t:net:net_dev_start_xmit():u16:args->protocol
        COUNT      EVENT
        8          args->protocol = 2048
^C

Note that to discover the format of the net:net_dev_start_xmit tracepoint, you
use the tplist tool (tplist -v net:net_dev_start_xmit).


Occasionally, it is useful to filter certain expressions by string. This is not
trivially supported by BPF, but argdist provides a STRCMP helper you can use in
filter expressions. For example, to get a histogram of latencies opening a
specific file, run this:

# argdist -c -H 'r:c:open(char *file):u64:$latency/1000:STRCMP("test.txt",$entry(file))'
[02:16:38]
[02:16:39]
[02:16:40]
     $latency/1000       : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 0        |                                        |
        16 -> 31         : 2        |****************************************|
[02:16:41]
     $latency/1000       : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 1        |**********                              |
        16 -> 31         : 4        |****************************************|
[02:16:42]
     $latency/1000       : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 1        |********                                |
        16 -> 31         : 5        |****************************************|
[02:16:43]
     $latency/1000       : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 1        |********                                |
        16 -> 31         : 5        |****************************************|


Here's a final example that finds how many write() system calls are performed
by each process on the system:

# argdist -c -C 'p:c:write():int:$PID;write per process' -n 2
[06:47:18]
write by process
        COUNT      EVENT
        3          $PID = 8889
        7          $PID = 7615
        7          $PID = 2480
[06:47:19]
write by process
        COUNT      EVENT
        9          $PID = 8889
        23         $PID = 7615
        23         $PID = 2480


USAGE message:

# argdist -h
usage: argdist [-h] [-p PID] [-z STRING_SIZE] [-i INTERVAL] [-n COUNT] [-v]
               [-c] [-T TOP] [-H specifier] [-C[specifier] [-I header]

Trace a function and display a summary of its parameter values.

optional arguments:
  -h, --help            show this help message and exit
  -p PID, --pid PID     id of the process to trace (optional)
  -t TID, --tid TID     id of the thread to trace (optional)
  -z STRING_SIZE, --string-size STRING_SIZE
                        maximum string size to read from char* arguments
  -i INTERVAL, --interval INTERVAL
                        output interval, in seconds (default 1 second)
  -d DURATION, --duration DURATION
			total duration of trace, in seconds
  -n COUNT, --number COUNT
                        number of outputs
  -v, --verbose         print resulting BPF program code before executing
  -c, --cumulative      do not clear histograms and freq counts at each interval
  -T TOP, --top TOP     number of top results to show (not applicable to
                        histograms)
  -H specifier, --histogram specifier
                        probe specifier to capture histogram of (see examples
                        below)
  -C specifier, --count specifier
                        probe specifier to capture count of (see examples
                        below)
  -I header, --include header
                        additional header files to include in the BPF program
                        as either full path, or relative to current working directory,
                        or relative to default kernel header search path

Probe specifier syntax:
        {p,r,t,u}:{[library],category}:function(signature)[:type[,type...]:expr[,expr...][:filter]][#label]
Where:
        p,r,t,u    -- probe at function entry, function exit, kernel tracepoint,
                      or USDT probe
                      in exit probes: can use $retval, $entry(param), $latency
        library    -- the library that contains the function
                      (leave empty for kernel functions)
        category   -- the category of the kernel tracepoint (e.g. net, sched)
        signature  -- the function's parameters, as in the C header
        type       -- the type of the expression to collect (supports multiple)
        expr       -- the expression to collect (supports multiple)
        filter     -- the filter that is applied to collected values
        label      -- the label for this probe in the resulting output

EXAMPLES:

argdist -H 'p::__kmalloc(u64 size):u64:size'
        Print a histogram of allocation sizes passed to kmalloc

argdist -p 1005 -C 'p:c:malloc(size_t size):size_t:size:size==16'
        Print a frequency count of how many times process 1005 called malloc
        with an allocation size of 16 bytes

argdist -C 'r:c:gets():char*:$retval#snooped strings'
        Snoop on all strings returned by gets()

argdist -H 'r::__kmalloc(size_t size):u64:$latency/$entry(size)#ns per byte'
        Print a histogram of nanoseconds per byte from kmalloc allocations

argdist -C 'p::__kmalloc(size_t size, gfp_t flags):size_t:size:flags&GFP_ATOMIC'
        Print frequency count of kmalloc allocation sizes that have GFP_ATOMIC

argdist -p 1005 -C 'p:c:write(int fd):int:fd' -T 5
        Print frequency counts of how many times writes were issued to a
        particular file descriptor number, in process 1005, but only show
        the top 5 busiest fds

argdist -p 1005 -H 'r:c:read()'
        Print a histogram of error codes returned by read() in process 1005

argdist -C 'r::__vfs_read():u32:$PID:$latency > 100000'
        Print frequency of reads by process where the latency was >0.1ms

argdist -C 'r::__vfs_read():u32:$COMM:$latency > 100000'
        Print frequency of reads by process name where the latency was >0.1ms

argdist -H 'r::__vfs_read(void *file, void *buf, size_t count):size_t:$entry(count):$latency > 1000000' 
        Print a histogram of read sizes that were longer than 1ms

argdist -H \
        'p:c:write(int fd, const void *buf, size_t count):size_t:count:fd==1'
        Print a histogram of buffer sizes passed to write() across all
        processes, where the file descriptor was 1 (STDOUT)

argdist -C 'p:c:fork()#fork calls'
        Count fork() calls in libc across all processes
        Can also use funccount.py, which is easier and more flexible 

argdist -H 't:block:block_rq_complete():u32:args->nr_sector'
        Print histogram of number of sectors in completing block I/O requests

argdist -C 't:irq:irq_handler_entry():int:args->irq'
        Aggregate interrupts by interrupt request (IRQ)

argdist -C 'u:pthread:pthread_start():u64:arg2' -p 1337
        Print frequency of function addresses used as a pthread start function,
        relying on the USDT pthread_start probe in process 1337

argdist -H 'p:c:sleep(u32 seconds):u32:seconds' \
        -H 'p:c:nanosleep(struct timespec *req):long:req->tv_nsec'
        Print histograms of sleep() and nanosleep() parameter values

argdist -p 2780 -z 120 \
        -C 'p:c:write(int fd, char* buf, size_t len):char*:buf:fd==1'
        Spy on writes to STDOUT performed by process 2780, up to a string size
        of 120 characters 

argdist -I 'kernel/sched/sched.h' \
        -C 'p::__account_cfs_rq_runtime(struct cfs_rq *cfs_rq):s64:cfs_rq->runtime_remaining'
        Trace on the cfs scheduling runqueue remaining runtime. The struct cfs_rq is defined
        in kernel/sched/sched.h which is in kernel source tree and not in kernel-devel
        package.  So this command needs to run at the kernel source tree root directory
        so that the added header file can be found by the compiler.

argdist -C 'p::do_sys_open(int dfd, const char __user *filename, int flags,
            umode_t mode):char*:filename:STRCMP("sample.txt", filename)'
        Trace open of the file "sample.txt". It should be noted that 'filename'
        passed to the do_sys_open is a char * user pointer. Hence parameter
        'filename' should be tagged with __user for kprobes (const char __user
        *filename).  This information distinguishes if the 'filename' should be
        copied from userspace to the bpf stack or from kernel space to the bpf
        stack.

在笔者电脑上实际运行结果如下:

~/eBPF/BCC/bcc/tools$ sudo ./argdist.py -c -H 'p:c:write(int fd, void *buf, size_t len):size_t:len:fd==1'
[10:23:54]
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 1        |****************************************|
[10:23:55]
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 2        |********************                    |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 1        |**********                              |
        64 -> 127        : 4        |****************************************|
[10:23:56]
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 3        |**********                              |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 2        |*******                                 |
        64 -> 127        : 11       |****************************************|
[10:23:57]
     len                 : count     distribution
         0 -> 1          : 0        |                                        |
         2 -> 3          : 0        |                                        |
         4 -> 7          : 0        |                                        |
         8 -> 15         : 4        |********                                |
        16 -> 31         : 0        |                                        |
        32 -> 63         : 3        |******                                  |
        64 -> 127        : 19       |****************************************|
       128 -> 255        : 0        |                                        |
       256 -> 511        : 1        |**                                      |
       512 -> 1023       : 0        |                                        |
      1024 -> 2047       : 0        |                                        |
      2048 -> 4095       : 0        |                                        |
      4096 -> 8191       : 8        |****************                        |

 

  • tools/bashreadline

打印系统范围内输入的bash命令。 

bcc/tools/bashreadline.txt文件内容如下:

Demonstrations of bashreadline, the Linux eBPF/bcc version.


This prints bash commands from all running bash shells on the system. For
example:

# ./bashreadline
TIME      PID    COMMAND
05:28:25  21176  ls -l
05:28:28  21176  date
05:28:35  21176  echo hello world
05:28:43  21176  foo this command failed
05:28:45  21176  df -h
05:29:04  3059   echo another shell
05:29:13  21176  echo first shell again

When running the script on Arch Linux, you may need to specify the location
of libreadline.so library:

# ./bashreadline -s /lib/libreadline.so
TIME      PID    COMMAND
11:17:34  28796  whoami
11:17:41  28796  ps -ef
11:17:51  28796  echo "Hello eBPF!"


The entered command may fail. This is just showing what command lines were
entered interactively for bash to process.

It works by tracing the return of the readline() function using uprobes
(specifically a uretprobe).

但是在笔者电脑上实际运行,结果如下:

~/eBPF/BCC/bcc/tools$ sudo ./bashreadline.py 
[sudo] penghao 的密码:Traceback (most recent call last):
  File "/home/penghao/eBPF/BCC/bcc/tools/./bashreadline.py", line 66, in <module>
    b.attach_uretprobe(name=name, sym="readline", fn_name="printret")
  File "/usr/lib/python3.11/site-packages/bcc/__init__.py", line 1412, in attach_uretprobe
    (path, addr) = BPF._check_path_symbol(name, sym, addr, pid)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/bcc/__init__.py", line 978, in _check_path_symbol
    raise Exception("could not determine address of symbol %s in %s"
Exception: could not determine address of symbol readline in /bin/bash

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1038997.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

从0到1搞定前端性能测试(非常详细)

提到性能测试大家往往会想到多用户使用系统时对服务器后端的性能测试&#xff0c;前端页面的性能往往容易被忽视&#xff0c;但是如果存在性能问题&#xff0c;就算后端服务器性能再好&#xff0c;用户的体验也是极差的。并且随着现在富前端和大前端的流行&#xff0c;前端系统…

基于SpringBoot的在线商城系统设计与实现

目录 前言 一、技术栈 二、系统功能介绍 用户信息管理 商品分类管理 商品信息管理 轮播图管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 现代经济快节奏发展以及不断完善升级的信息化技术&#xff0c;让传统数据信息的管理升级为软件存储&#xff…

数据增强代码实践,补一点多进程,多线程的知识点

目前最先进的神经网络模型&#xff0c;其本质上也是在利用一系列线性和非线性的函数去拟合目标输出。既然是拟合&#xff0c;当然越多的样本就能获得越准确的结果&#xff0c;这也是为什么现在训练神经网络所使用的数据规模越来越大。 在实际使用中&#xff0c;我们往往可能只…

苹果销量倍增,但iPhone15销量或大跌,中国用户不接受咖喱味

由于印度制造的iPhone15出现质量问题&#xff0c;导致欧洲消费者不接受&#xff0c;由此传出消息指苹果将印度制造的iPhone15完全供应印度市场和中国市场&#xff0c;这已导致中国消费者对它的抗拒&#xff0c;不过这似乎并未影响iPhone15的整体销量。 日前两大电商平台公布的数…

一百八十七、大数据离线数仓完整流程——步骤六、在ClickHouse的ADS层建表并用Kettle同步Hive中DWS层的结果数据

一、目的 经过6个月的奋斗&#xff0c;项目的离线数仓部分终于可以上线了&#xff0c;因此整理一下离线数仓的整个流程&#xff0c;既是大家提供一个案例经验&#xff0c;也是对自己近半年的工作进行一个总结。 二、数仓实施步骤 &#xff08;六&#xff09;步骤六、在Click…

前端关于对象中套用对象传参的小问题

在js的对象是引用类型的&#xff0c;他如果里面还套用对象的话那么通过axios传参给后端就会出现一个问题&#xff0c;就是【object&#xff0c;object】这种包装形式 那么如何来解决这个问题呢&#xff1f; 其实这就是要对数据传输中json格式要有一定的了解才可以解决这个问题…

windows 安装 MySQL 绿色版

windows 安装 MySQL 绿色版 下载 官网&#xff1a; MySQL下载页面&#xff1a; MySQL直接下载链接&#xff1a;https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip 安装 将下载的mysql.zip文件解压缩到指定目录 搜索 cmd 并以管理员身份运行 切换到…

详解MySQL索引+面试题

前言: 📕作者简介:热爱编程的小七,致力于C、Java、Python等多编程语言,热爱编程和长板的运动少年! 📘相关专栏Java基础语法,JavaEE初阶,数据库,数据结构和算法系列等,大家有兴趣的可以看一看。 😇😇😇有兴趣的话关注博主一起学习,一起进步吧! 一、索引概述…

iMovie for Mac v10.3.9(视频剪辑)

iMovie是一款视频剪辑软件&#xff0c;广泛应用于Mac和iOS设备。以下是关于iMovie软件的一些推荐信息&#xff1a; 简单易用。iMovie的设计简洁&#xff0c;操作简单&#xff0c;即使是没有剪辑经验的新手也可以轻松上手。软件内置了丰富的视觉效果、滤镜、绿幕抠图、分屏和画…

算法基础之差分和前缀和

差分 差分介绍 结论&#xff1a;差分是前缀和的逆运算 举例 一维差分 //一维前缀和 a[i]部分就是一维差分数组 s[i] s[i-1]a[i]; //一维差分 a[i] s[i]-s[i-1];二维差分 //二维前缀和 a[i][j]部分就是一维差分数组 s[i][j] s[i-1][j]s[i][j-1]-s[i-1][j-1]a[i][j]; //二…

优思学院|如何解读Minitab中测量系统分析(MSA GRR)的结果?

在现代制造和质量控制过程中&#xff0c;精确的测量是至关重要的。为了确保我们的测量工具可靠&#xff0c;我们需要评估其重复性与再现性。这就是测量系统分析&#xff08;Measurement System Analysis&#xff0c;简称MSA&#xff09;的关键目标之一。以下将介绍如何使用Mini…

SPEOS—光学产品设计及仿真工具

SPEOS是ANSYS公司功能强大的光学仿真软件&#xff0c;用于光学设计、环境与视觉模拟、成像仿真等&#xff0c;强大的解决方案提供了可视化光学系统和直观的人机交互平台&#xff0c;其仿真技术已广泛用于汽车、电子电器、精密仪器、照明设备等领域。SPEOS软件内嵌ISO和CIE国际标…

漏洞挖掘篇(基础)

文章目录 方法概述 漏洞挖掘方法分类 静态分析技术动态分析技术 符号执行 符号执行的基本原理符号执行的应用漏洞挖掘-检测是否数组越界 污点分析 基本思想污点分析核心要素优缺点 词法分析 基本概念漏洞挖掘实战 实践一&#xff1a;基于词法分析和逆向分析的可执行代码静态检…

有关MySQL性能的分析,你知道哪些?

前言: 📕作者简介:热爱编程的小七,致力于C、Java、Python等多编程语言,热爱编程和长板的运动少年! 📘相关专栏Java基础语法,JavaEE初阶,数据库,数据结构和算法系列等,大家有兴趣的可以看一看。 😇😇😇有兴趣的话关注博主一起学习,一起进步吧! 一、SQL性能…

PyTorch深度学习实战——交通标志识别

PyTorch深度学习实战——交通标记识别 0. 前言1. 交通标志识别1.1 数据集介绍1.2 数据增强和批归一化 3. 交通标志检测相关链接 0. 前言 在道路交通场景中&#xff0c;交通标志识别作为驾驶辅助系统与无人驾驶车辆中不可缺少的技术&#xff0c;为车辆行驶中提供了安全保障。在…

【操作系统】24王道考研笔记——第五章 IO管理

第五章 IO管理 一、IO设备 1.1 基本概念与分类 1.2 IO控制器 电子部件 IO控制器组成 值得注意的小细节&#xff1a;①一个I/O控制器可能会对应多个设备&#xff1b; ②数据寄存器、控制寄存器、状态寄存器可能有多个&#xff08;如&#xff1a;每个控制/状态寄存器对应一个…

RK3566 linux添加rgb13h

一、DTS根节点增加节点 在根节点/{}下增加flash_rgb13h节点&#xff0c;节点内容如下&#xff1a; flash_rgb13h: flash-rgb13h {status "okay";compatible "led,rgb13h";label "gpio-flash";pinctrl-names "default";pinctrl-0 …

如何在JoySSL上申请免费的SSL证书

1&#xff0c;前往 JoySSL 的官方网站注册页面&#xff0c;创建一个账号并登录您的 JoySSL 账户。 扫码注册账号申请免费证书https://www.joyssl.com/certificate/select/free.html?nid52&#xff0c;找到并选择你需要的 SSL 证书相关的功能或选项。 3&#xff0c;提供您的域…

三周过PMP经验分享,用最少的时间拿3A!

今天分享一个大神的PMP备考经验&#xff0c;大佬就是大佬&#xff0c;三周过PMP还拿了3A&#xff0c;正在备考PMP的小伙伴&#xff0c;咱们共勉&#xff01; 第一周、阅读教材 之前是第六版教材&#xff0c;花了很长时间阅读和梳理框架。现在是第七版教材&#xff0c;内容少了…

快速发布服务到生产环境(手动操作)

背景介绍 虽然现在大部分项目都是用Jenkins搭建环境&#xff0c;自动化部署。但仍然存在一些小客户&#xff0c;只会单独上线一些关键服务&#xff0c;此时就需要手动去服务器里面部署了。此处用一个外业服务做例子&#xff0c;下面开始介绍。 进入服务器 一般需要申请服务器权…