博文

目前显示的是标签为“Linux”的博文

Linux admin Tool (Redis)

按功能划分的命令名称。  监控总体带宽使用――nload、bmon、slurm、bwm-ng、cbm、speedometer和netload  监控总体带宽使用(批量式输出)――vnstat、ifstat、dstat和collectl  每个套接字连接的带宽使用――iftop、iptraf、tcptrack、pktstat、netwatch和trafshow  每个进程的带宽使用――nethogs      每个进程的带宽使用――nethogs 1、nload nload是一个命令行工具,让用户可以分开来监控入站流量和出站流量。它还可以绘制图表以显示入站流量和出站流量,视图比例可以调整。用起来很简单,不支持许多选项。所以,如果你只需要快速查看总带宽使用情况,无需每个进程的详细情况,那么nload用起来很方便。 安装nload:Fedora和Ubuntu在默认软件库里面就有nload。CentOS用户则需要从Epel软件库获得nload。 #fedora or centos  $yum install nload -y 2、iftop iftop可测量通过每一个套接字连接传输的数据;它采用的工作方式有别于nload。iftop使用pcap库来捕获进出网络适配器的数据包,然后汇总数据包大小和数量,搞清楚总的带宽使用情况。 虽然iftop报告每个连接所使用的带宽,但它无法报告参与某个套按字连接的进程名称/编号(ID)。不过由于基于pcap库,iftop能够过滤流量,并报告由过滤器指定的所选定主机连接的带宽使用情况。$ sudo iftop -n n选项可以防止iftop将IP地址解析成主机名,解析本身就会带来额外的网络流量。 安装iftop:Ubuntu/Debian/Fedora用户可以从默认软件库获得它。CentOS用户可以从Epel获得它。 # fedora or centos  $ yum install iftop -y # ubuntu or debian $ sudo apt-get install iftop 3、iptraf iptraf是一款交互式、色彩鲜艳的IP局域网监控工具。它可以显示每个连接以及主机之间传输的数据量。s...

MongoDB & Linux

图片
1. environment set path = D:\opt\MongoDB\Server\3.4\bin D:\opt\MongoDB\Server\3.4\bin; http://mongodb.github.io/mongo-csharp-driver/2.8/getting_started/quick_tour/ http://mongodb.github.io/mongo-csharp-driver/2.8/getting_started/installation/ http://mongodb.github.io/mongo-csharp-driver/2.8/getting_started/quick_tour/ https://github.com/mongodb/mongo-csharp-driver 2. start up mongo service mongod --dbpath D:\data\db ./bin/mongod --dbpath=/home/m20 --logpath=/home/mlog/m20.log --fork --configsvr --port 27020 ./bin/mongos --logpath=/home/m30.log --configdb=192.168.1.202:27020 --fork mongod --port 27017 --dbpath D:\MongoDB\data\db Add the following lines in "mongo.config" file port=27017 dbpath=C:\mongodb\data\db\ logpath=C:\mongodb\log\mongo.log Start server : mongod.exe --config="C:\mongodb\mongo.config" Connect to remote MongoDB server via command line with authentication. mongo --username abcd --password abc123 --host server_ip_or_dns --port 27...