实时流量监控工具iftop的使用
iftop是一款实时流量监控工具,监控TCP/IP连接等,缺点就是无报表功能。必须以root身份才能运行。常用参数如下:-i:设定监测的网卡,如:#iftop-ieth1-B:以bytes为单位显示流量(默认是bits),如:#iftop-B-n:使host信息默认直接都显示IP,如:#iftop-n-N:使端口信息默认直接都显示端口号,如:#iftop-N-F:显示特定网段的进出流量,如#iftop-F10.10.1.0/24或#iftop-F10.10.1.0/255.255.255.0-h:(displaythismessage),帮助,显示参数信息-p:使用这个参数后,中间的列表显示的本地主机信...[>>…]
网络接口监测工具ifstat命令
ifstat工具是个网络接口监测工具,比较简单看网络流量,像VMSTAT那样一行行显示着浏览信息,可以设置显示某个或所有网卡流量数据。ifstat默认不监控回环接口,显示的流量单位是KB。系统默认未安装,使用aptinstallifstat安装即可用。 默认情况下,ifstat监测所有非环路网络接口的活动。其主要选项意义如下:-l监测环路网络接口(lo)。缺省ifstat监测活动的所有非环路网络接口。-a监测所有网络接口的状态信息-z隐藏无流量的接口,例如未使用的接口-i指定要监测的接口,...[>>…]
Ubuntu使用nload命令查看服务器网络流量情况
nload是一个实时输出linux网络流量状况的命令行工具,能直观地用表格显示信息实时监视网络流量和带宽使用情况。像一个控制台应用程序,用来实时监测网络流量和带宽使用情况的命令。 可以直接使用nload命令查看,或者输入nload-m只查看数据。默认状况,统计数据的左边会使用显示流量图,用#号拼出来的,根据实时流量变化显示。Incoming是进入网卡的流量,Outgoing是网卡出去的流量。各显示数据中:Curr当前流量、Avg平均流量、Min最小流量、Max最大流量、Ttl流量统计;...[>>…]
Ubuntu中使用nethogs查看网络带宽的占用情况
Ubuntu18.04中可以使用nethogs查看网络带宽的占用情况,和nload、iftop、ifstat工具不同,nethogs工具可以查看服务器上每个进程连接的带宽情况。系统默认不带此功能,使用aptinstallnethogs安装。 test@testuser1:~#aptinstallnethogs ... Settingupnethogs(0.8.5-2)... Processingtriggersforman-db(2.8.3-2)... test@testuser1:~#nethogs NetHogs常用的参数:-d数据刷新时间如nethogs-d1就是每秒刷新一次-h显示命名帮助、使用信息-psniffinpromisciousmode(notrecommended).-ttracemode,...[>>…]
docker启动使用gpu的容器could not select with capabilities: [[gpu]].
docker启动使用gpu的容器提示报错:docker:Errorresponsefromdaemon:couldnotselectdevicedriver""withcapabilities:[[gpu]]. 我这里的服务器系统是Ubuntu18.04,问题是出在未安装nvidia-container-toolkit或nvidia-container-runtime(它包含nvidia-container-toolkit)。安装nvidia-container-toolkit需要添加nvidia-docker源,操作如下: root@testMC:~/#distribution=$(./etc/os-release;echo$ID$VERSION_ID) root@testMC:~/#curl-s-Lhttps://nvidia.github.io/nvi...[>>…]
Clickhouse启动失败排查发现docker容器日志文件过大问题
clickhouse启动失败,总是在启动一会之后退出。无法使用. test@hello:systemctlstatusclickhouse-server clickhouse-server.service-ClickHouseServer(analyticDBMSforbigdata) MainPID:4895(code=exited,status=0/SUCCESS) test@hello:journalctl-uclickhouse-server clickhouse-server[986]:Cannotaddmessagetothelog:Code:243,e.displayText()=DB::Exception:Cannotreserve1.00MiB,notenoughspace,Stackt 也可以到clickhouse的默认日志目录/var/log/clickhouse-server中去查看。经过排查...[>>…]
Nginx配置中添加支持WebSocket
Nginx自从1.3版就支持WebSocket,也可以为WebSocket应用程序做反向代理和负载均衡。Websocket使用ws或wss作为统一资源标志符,类似于HTTP或HTTPS,默认Websocket的ws协议使用80端口;运行在TLS之上时,其中wss表示在TLS之上的Websocket,相当于HTTPS。wss协议默认使用443端口。wss就是ws基于SSL的安全传输。 Nginx配置域名支持WSS只需要添加Upgrade两行配置即可,如下: location/uri{ proxy_passhttp://127.0.0.1; proxy_http_version1.1; proxy_set_headerUpgrade$...[>>…]
使用systemctl设置一些服务开机自启:X.service is not a native service
在使用systemctl控制一些服务如安装的EMQ时,遇到报错: test@test:~#systemctlenableemqx Executing:/lib/systemd/systemd-sysv-installenableemqx emqx.serviceisnotanativeservice,redirectingtosystemd-sysv-install. test@test:~#systemctllist-unit-filesgrepemq emqx.servicegenerated 查询发现这个服务的状态是即不是enable也不是disenable,是generated。在其官方文档提示:Thisscriptiscalledby“systemctlenable/disable”whenthegivenunitisaSysVinit.dscript.Itneedstocallthedi...[>>…]
ubuntu在更换源之后apt update出现public key is not available: : NO_PUBKEY
ubuntu环境中在更换源之后使用aptupdate更新源出现报错:Thefollowingsignaturescouldn'tbeverifiedbecausethepublickeyisnotavailable::NO_PUBKEYXXXXXXXXXXXXXX test@test:~#apt-getupdate Err:6https://download.docker.com/linux/ubuntubionicInRelease GPGerror:Thefollowingsignaturescouldn'tbeverifiedbecausethepublickeyisnotavailable Thefollowingsignaturescouldn'tbeverifiedbecausethepublickeyisnotavailable::NO_PUBKEYXXXXXXXXXXXXXX 问题中提示publickeyisnotavailable公钥无效,缺失公钥。解决方...[>>…]
Docker安装官方Milvus2.0镜像太慢了
在docker下安装Milvus2.0的步骤并不多,官方文档地址:https://milvus.io/docs/v2.0.x/install_standalone-docker.md先下载docker-compose.yml文件,然后设置DOCKER_VOLUME_DIRECTORY的值执行docker-compose安装即可。但在执行下载镜像的时候太慢了。 root@testMC:~/#wgethttps://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/standalone/docker-compose.yml-Odocker-compose.yml root@testMC:~/#DOCKER_VOLUME_DIRECTORY=/disk root@testMC:~/#docker-composeup-...[>>…]