grafana+prometheus+hiveserver2(jmx_exporter+metrics)

监控图

一、hiveserver2开启metrics,并启动jmx_exporter

1、修改hive-site.xml文件开启metrics

<property><name>hive.server2.metrics.enabled</name><value>true</value>
</property>
<property><name>hive.service.metrics.codahale.reporter.classes</name><value>org.apache.hadoop.hive.common.metrics.metrics2.JmxMetricsReporter</value>
</property>

2、启动时带上jmx_exporter
①下载jmx_exporter安装包放在服务器上
下载路径:
prometheus常用exporter下载地址大全

/usr/local/jmx_expoter/jmx_prometheus_javaagent-0.9.0.jar
/usr/local/jmx_expoter/hiveserver2.yaml

/usr/local/jmx_expoter/hiveserver2.yaml文件内容

rules:- pattern: '.*'

②修改hive安装目录bin/hive里的内容

##把这段内容
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=hive-log4j2.properties"
##修改为,增加上 指定jar和yaml文件和指定jmx端口随意9909
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS java -javaagent:/usr/local/jmx_expoter/jmx_prometheus_javaagent-0.9.0.jar=9909:/usr/local/jmx_expoter/hiveserver2.yaml -Dlog4j.configurationFile=hive-log4j2.properties"

3、查看都有哪些metrics
访问http://hiveIP:9909/metrics
在这里插入图片描述
在这里插入图片描述

二、配置prometheus

prometheus下载地址
1、prometheus.yaml增加一下配置

scrape_configs:- job_name: "hiveserver2"static_configs:- targets: ["hiveIp:9909","hiveIp:9909"]

2、启动

nohup ./prometheus --config.file=prometheus.yaml --web.listen-address=:9090 --storage.tsdb.retention=7d > ./prometheus.log 2>&1 &

三、配置grafana

1、配置prometheus数据源
如果数据源不是这个名字,下边的json记得改名字
2、dashboards import json
其他指标可以自行添加panels(嵌板)

{"__inputs": [{"name": "VAR_JOB","type": "constant","label": "job","value": "hiveserver2","description": ""}],"__requires": [{"type": "grafana","id": "grafana","name": "Grafana","version": "5.4.2"},{"type": "panel","id": "graph","name": "Graph","version": "5.0.0"},{"type": "datasource","id": "prometheus","name": "Prometheus","version": "5.0.0"},{"type": "panel","id": "singlestat","name": "Singlestat","version": "5.0.0"}],"annotations": {"list": [{"builtIn": 1,"datasource": "-- Grafana --","enable": true,"hide": true,"iconColor": "rgba(0, 211, 255, 1)","name": "Annotations & Alerts","type": "dashboard"}]},"description": "Complete dashboard using metrics from prometheus JMX exporter, with drill down per job > instance","editable": true,"gnetId": 8563,"graphTooltip": 0,"id": null,"iteration": 1545278553000,"links": [],"panels": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 0},"id": 52,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_open_connections_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "当前打开的连接数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "count","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineStyle": {"fill": "solid"},"lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 0},"id": 2,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","exemplar": false,"expr": "metrics_hs2_active_sessions_Value{instance=\"$instance\",job=\"$job\"}","format": "time_series","instant": false,"legendFormat": "__auto","range": true,"refId": "A"}],"title": "当前活跃的session个数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 0},"id": 46,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_hive_tez_tasks_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "提交的Hive on Tez作业总数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 9},"id": 44,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_hs2_open_sessions_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "当前打开的session数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"decimals": 0,"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 9},"id": 50,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_active_calls_api_runTasks_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "当前runtask请求数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 9},"id": 48,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_cumulative_connection_count_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "累计连接数","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 18},"id": 14,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_committed_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已预留堆外内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 4,"x": 7,"y": 18},"id": 5,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "metrics_memory_total_init_Value{instance=\"$instance\",job=\"$job\"}","legendFormat": "__auto","range": true,"refId": "A"}],"title": "JVM初始化总内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 4,"x": 11,"y": 18},"id": 38,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM最大可用堆内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 4,"x": 15,"y": 18},"id": 8,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_total_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM最大可用总内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 3,"x": 19,"y": 18},"id": 12,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_init_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM初始化堆内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 10,"w": 2,"x": 22,"y": 18},"id": 60,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "jvm_threads_peak{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": " 峰值线程数","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 28},"id": 18,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM最大可用堆外内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 28},"id": 40,"options": {"legend": {"calcs": ["lastNotNull"],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_used_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已使用堆内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "percentunit"},"overrides": []},"gridPos": {"h": 10,"w": 9,"x": 15,"y": 28},"id": 54,"options": {"legend": {"calcs": ["lastNotNull"],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_used_Value{instance=\"$instance\",job=\"$job\"}/metrics_memory_heap_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM堆内存使用率","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 38},"id": 42,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_used_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已使用堆外内存量","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 38},"id": 10,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_committed_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已预留堆内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 38},"id": 6,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_total_committed_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已预留总内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 47},"id": 16,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_init_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM初始化堆外内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 47},"id": 22,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"decimals": 0,"mappings": [],"min": 0,"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 10,"w": 9,"x": 15,"y": 47},"id": 24,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_blocked_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM blocked线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 57},"id": 26,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_deadlock_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM deadlock线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 57},"id": 20,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_daemon_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM daemon线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineStyle": {"fill": "solid"},"lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 57},"id": 30,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_runnable_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM runnable线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 66},"id": 32,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_terminated_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM terminated线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 66},"id": 28,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_new_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM new状态线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 9,"x": 15,"y": 66},"id": 34,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_waiting_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM waiting线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 76},"id": 36,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_timed_waiting_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM timed_waiting线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 76},"id": 58,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "irate(jvm_gc_collection_seconds_sum{gc=\"G1 Old Generation\", ip=\"$instance\", job=\"$job\"}[5m])","legendFormat": "1分钟内FGC时长","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "irate(jvm_gc_collection_seconds_sum{gc=\"G1 Old Generation\", ip=\"$instance\", job=\"$job\"}[5m])","hide": false,"legendFormat": " 分钟内FGC时长","range": true,"refId": "B"}],"title": "1 & 5 分钟内FGC时长","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": [{"__systemRef": "hideSeriesFrom","matcher": {"id": "byNames","options": {"mode": "exclude","names": ["5分钟内FGC次数"],"prefix": "All except:","readOnly": true}},"properties": [{"id": "custom.hideFrom","value": {"legend": false,"tooltip": false,"viz": true}}]}]},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 76},"id": 56,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","exemplar": false,"expr": "irate(jvm_gc_collection_seconds_count{gc=\"G1 Old Generation\", job=\"$job\", ip=\"$instance\"}[5m])","hide": false,"instant": false,"legendFormat": "1分钟内FGC次数","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "irate(jvm_gc_collection_seconds_count{gc=\"G1 Old Generation\", job=\"$job\", ip=\"$instance\"}[5m])","hide": false,"legendFormat": "5分钟内FGC次数","range": true,"refId": "B"}],"title": "1 & 5 分钟内FGC次数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 86},"id": 62,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "jvm_classes_loaded{ip=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "获取当前jvm已加载类数量","type": "timeseries"}],"refresh": "10s","schemaVersion": 16,"style": "dark","tags": ["JVM"],"templating": {"list": [{"current": {"text": "prometheus","value": "prometheus"},"hide": 0,"label": null,"name": "datasource","options": [],"query": "prometheus","refresh": 1,"regex": "","skipUrlSync": false,"type": "datasource"},{"current": {"value": "${VAR_JOB}","text": "${VAR_JOB}"},"hide": 0,"label": "job","name": "job","options": [{"value": "${VAR_JOB}","text": "${VAR_JOB}"}],"query": "${VAR_JOB}","skipUrlSync": false,"type": "constant"},{"allValue": ".*","current": {},"datasource": "$datasource","definition": "","hide": 0,"includeAll": false,"label": "instance","multi": false,"name": "instance","options": [],"query": "label_values(jvm_info{job=\"$job\"},instance)","refresh": 1,"regex": "","skipUrlSync": false,"sort": 1,"tagValuesQuery": "","tags": [],"tagsQuery": "","type": "query","useTags": false},{"allValue": null,"current": {},"datasource": "$datasource","definition": "","hide": 2,"includeAll": true,"label": null,"multi": true,"name": "mempool","options": [],"query": "label_values(jvm_memory_pool_bytes_max{job=\"$job\", instance=\"$instance\"}, pool)","refresh": 1,"regex": "","skipUrlSync": false,"sort": 1,"tagValuesQuery": "","tags": [],"tagsQuery": "","type": "query","useTags": false},{"allValue": null,"current": {},"datasource": "$datasource","definition": "","hide": 2,"includeAll": true,"label": null,"multi": true,"name": "memarea","options": [],"query": "label_values(jvm_memory_bytes_used{job=\"$job\", instance=\"$instance\"}, area)","refresh": 1,"regex": "","skipUrlSync": false,"sort": 0,"tagValuesQuery": "","tags": [],"tagsQuery": "","type": "query","useTags": false}]},"time": {"from": "now-15m","to": "now"},"timepicker": {"refresh_intervals": ["5s","10s","30s","1m","5m"],"time_options": ["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "","title": "hiveserver2-metrics","uid": "hiveserver2-jvm-dashboard","version": 3
}

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

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

相关文章

ChatGPT高效提问—prompt常见用法(续篇三)

ChatGPT高效提问—prompt常见用法&#xff08;续篇三&#xff09; 1.1 多选项 ​ 多选项技术为模型提供了一个清晰的问题或任务&#xff0c;并附带一组预先定义的潜在答案。这种方法在生成仅限于特定选项集的文本方面表现出色&#xff0c;适用于问答、文本补全和其他任务。利…

MySQL 日志管理

4.6&#xff09;日志管理 MySQL 支持丰富的日志类型&#xff0c;如下&#xff1a; 事务日志&#xff1a;transaction log 事务日志的写入类型为 "追加"&#xff0c;因此其操作为 "顺序IO"&#xff1b; 通常也被称为&#xff1a;预写式日志 write ahead…

《MySQL 简易速速上手小册》第1章:MySQL 基础和安装(2024 最新版)

文章目录 1.1 MySQL 概览&#xff1a;版本、特性和生态系统1.1.1 基础知识1.1.2 重点案例1.1.3 拓展案例 1.2 安装和配置 MySQL1.2.1 基础知识1.2.2 安装步骤1.2.3 重点案例1.2.4 拓展案例 1.3 基础命令和操作1.3.1 基础知识1.3.2 重点案例1.3.3 拓展案例 1.1 MySQL 概览&#…

【Web】vulhub Fastjson反序列化漏洞复现学习笔记

目录 1.2.24 RCE CVE-2017-18349 复现流程 原理分析 1.2.47 RCE CNVD-2019-22238 复现流程 原理分析 漏洞探测 1.2.24 RCE CVE-2017-18349 复现流程 vulhub启动靶场 用marshalsec启动LDAP/RMI服务 java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRef…

Redis篇之redis是单线程

一、redis是单线程 Redis是单线程的&#xff0c;但是为什么还那么快&#xff1f;主要原因有下面3点原因&#xff1a; 1. Redis是纯内存操作&#xff0c;执行速度非常快。 2. 采用单线程&#xff0c;避免不必要的上下文切换可竞争条件&#xff0c;多线程还要考虑线程安全问题。 …

联合体的深入了解

1.联合体类型的声明 像结构体一样&#xff0c;联合体也是由一个或者多个成员构成&#xff0c;这些成员可以不同的类型。 但是编译器只为最大的成员分配足够的内存空间。联合体的特点是所有成员共用同一块内存空间。所以联合体也叫&#xff1a;共用体。 给联合体其中一个成员赋值…

SpringBoot + Tess4J 实现本地与远程图片的文字识别

1 前言 1.1 概要 在本文中&#xff0c;我们将探讨如何在Spring Boot应用程序里集成Tess4J来实现OCR&#xff08;光学字符识别&#xff09;&#xff0c;以识别出本地和远程图片中的文字。 我们将从添加依赖说起&#xff0c;然后创建服务类以实现OCR&#xff0c;最后展示如何处…

Linux操作系统基础(一):操作系统概述

文章目录 操作系统概述 一、计算机分类 二、计算机组成 三、操作系统概述 四、操作系统分类 操作系统概述 一、计算机分类 计算机一般分为个人计算机&#xff08;笔记、台式机&#xff09;与 企业级服务器&#xff08;1U、2U、机柜、塔式、刀片&#xff09;两种形式。 二…

探索NLP中的N-grams:理解,应用与优化

简介 n-gram[1] 是文本文档中 n 个连续项目的集合&#xff0c;其中可能包括单词、数字、符号和标点符号。 N-gram 模型在许多与单词序列相关的文本分析应用中非常有用&#xff0c;例如情感分析、文本分类和文本生成。 N-gram 建模是用于将文本从非结构化格式转换为结构化格式的…

跨境电商新风潮:充分发挥海外云手机的威力

在互联网行业迅速发展的大环境下&#xff0c;跨境电商、海外社交媒体营销以及游戏产业等重要领域都越来越需要借助海外云手机的协助。 特别是在蓬勃发展的跨境电商领域&#xff0c;像亚马逊、速卖通、eBay等平台&#xff0c;结合社交电商营销和短视频内容成为最有效的流量来源。…

cmd卸载软件

如果使用的是Win 10&#xff0c;并且需要在磁盘内释放一些空间&#xff0c;可以直接在命令提示符里卸载不再使用的应用程序&#xff0c;和小编一起来看看详细的步骤吧。 步骤如下&#xff1a; 以管理员身份运行命令提示符来卸载程序。在Windows搜索框中&#xff0c;键入“ cm…

【Unity】重力场中的路径预测方法

前言 笔者前些天参加完了一场72小时的GameJam游戏开发比赛。这次比赛的主题是“探索”&#xff0c;笔者做了一个名为《探索者号》的探索宇宙的游戏&#xff08;游戏名一开始叫做《星际拾荒者》&#xff0c;但这不重要&#xff09;。 在开发过程中&#xff0c;笔者遇到了一些问…

006集——where语句进行属性筛选——arcgis

在arcgis中&#xff0c; dBASE 文件除了 WHERE 语句以外&#xff0c;不支持 其它 SQL 命令。选择窗口如下&#xff1a; 首先&#xff0c;我们了解下什么是where语句。 WHERE语句是SQL语言中使用频率很高的一种语句。它的作用是从数据库表中选择一些特定的记录行来进行操作。WHE…

[VulnHub靶机渗透] dpwwn: 1

&#x1f36c; 博主介绍&#x1f468;‍&#x1f393; 博主介绍&#xff1a;大家好&#xff0c;我是 hacker-routing &#xff0c;很高兴认识大家~ ✨主攻领域&#xff1a;【渗透领域】【应急响应】 【python】 【VulnHub靶场复现】【面试分析】 &#x1f389;点赞➕评论➕收藏…

Python 线性回归可视化 并将回归函数放置到图像上

import matplotlib.pyplot as plt import scipy import seaborn as sns# 加载内置的数据集 df sns.load_dataset(tips)#create regplot p sns.regplot(xtotal_bill, ytip, datadf)#calculate slope and intercept of regression equation slope, intercept, r, p, sterr sci…

Android:国际化弹出框

3.13 风格与主题、国际化 1、应用国际化 应用国际化&#xff0c;通过修改系统语言&#xff0c;应用显示语言跟着改变。 选择Locale,点击>>符号。 创建多个国家&#xff0c;地区strings.xml文件&#xff0c;有一个默认strings.xml文件&#xff0c;各个stirngs.xml中<…

C语言指针函数学习2

之前写过一篇指针函数的博文&#xff1b;复习再学习一下&#xff1b; 指针函数&#xff0c;是一个函数&#xff0c;它的返回值是指针类型&#xff1b; 之前写了一个指针函数&#xff0c;返回一个 int * 类型的指针&#xff1b;下面做一个程序&#xff0c;返回一个结构体指针&a…

【golang】23、gorilla websocket 源码:examples、数据结构、流程

文章目录 一、examples1.1 echo1.1.1 server.go1.1.2 client.go 1.2 command1.2.1 功能和启动方式1.2.2 home.html1.2.3 main.go 1.3 filewatch1.3.1 html1.3.2 serveHome 渲染模板1.3.3 serveWs1.3.4 writer() 1.4 buffer pool1.4.1 server1.4.2 client 1.5 chat1.5.1 server1…

【Java】ArrayList和LinkedList的区别是什么

目录 1. 数据结构 2. 性能特点 3. 源码分析 4. 代码演示 5. 细节和使用场景 ArrayList 和 LinkedList 分别代表了两类不同的数据结构&#xff1a;动态数组和链表。它们都实现了 Java 的 List 接口&#xff0c;但是有着各自独特的特点和性能表现。 1. 数据结构 ArrayList…

Leetcode刷题笔记题解(C++):64. 最小路径和

思路一&#xff1a;dfs深度优先搜索&#xff0c;然后取最小路径值&#xff0c;但是时间消耗较大&#xff0c;时间复杂度可能不满足&#xff0c;代码如下&#xff1a; class Solution { public:int res 1000000;int rows,cols;int minPathSum(vector<vector<int>>…