mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
M365

cpu负荷测试工具和使用方法

通过cpuburn工具可以对CPU内核进行压力测试。 支持系统: Linux (32-bit)、Linux (64-bit)、Windows 工具官网地址:  https://patrickmn.com/projects/cpuburn/ 使用案例: 以CentOS 6.5 64bit为例使用cpuburn工具,进行CPU的压力测试,并查看CU中的CPU监控图。 1.下载解压工具 *Linux 64 bit OS下载方式 wget https://cdn.pmylund.com/files/tools/cpuburn/linux/cpuburn-1.0-amd64.tar.gz * Linux 32 bit OS 下载地址 https://cdn.pmylund.com/files/tools/cpuburn/linux/cpuburn-1.0-i386.tar.gz *Windows OS下载地址 https://cdn.pmylund.com/files/tools/cpuburn/windows/cpuburn-1.0.zip -----------------------------测试方法----------------------- windows 拷贝执行文件到测试电脑执行即可   linux #执行以下命令 sudo su - mkdir -p -m 777  /usr/hakutest; cd /usr/hakutest/ wget https://cdn.pmylund.com/files/tools/cpuburn/linux/cpuburn-1.0-amd64.tar.gz ls tar xvzf cpuburn-1.0-amd64.tar.gz ls cd /usr/hakutest/cpuburn/ # 执行 ./cpuburn Burn all available cores ./cpuburn -n 2 Burn two cores ./cpuburn -n 2 -u 5 Burn two cores, sending an update every five seconds 内存 1.LINUX环境下测试 sudo su - mkdir -p -m 777  /usr/hakutest; cd /usr/hakutest/ wget http://pyropus.ca/software/memtester/old-versions/memtester-4.2.2.tar.gz ls tar xvzf memtester-4.2.2.tar.gz ls cd /usr/hakutest/memtester-4.2.2 / # 执行安装 make && make install # 会生成一个memtester文件的,然后运行: # memtester [-p PHYSADDR] <MEMORY> [ITERATIONS] # MEMORY 申请测试内存的数量,单位默认是megabytes(兆),也可以是B K M G # ITERATIONS 测试的次数,默认是无限 ./memtester 2048 10 https://blog.csdn.net/cangencong/article/details/74328944 用法 ./shell.sh 4 (4为4内核) 查看cpu内核数量 > lscpu 执行后会出现一堆kill命令,方便kill掉进程 #!/bin/bash   endless_loop()   {   echo -ne "i=0;  while true  do  i=i+100;  i=100done" | /bin/bash &   }   if [ $# != 1 ]; then   echo "USAGE: $0 <cpus>"   exit 1;   fi      for i in `seq $1`   do   endless_loop   pid_array[$i]=$!;   done      for i in "${pid_array[@]}"; do   echo 'kill' $i ';';   done   shell消耗内存 以前有过[shell消耗cpu][1]的文章,再记录一个shell消耗内存代码。 #!/bin/bash   mkdir /tmp/memory   mount -t tmpfs -o size=1024M tmpfs /tmp/memory   dd if=/dev/zero of=/tmp/memory/block   sleep 3600   rm /tmp/memory/block   umount /tmp/memory   rmdir /tmp/memory   用tmpfs文件系统占用内存一个小时

2020-11-18 0comments 131hotness 0likes mikebai Read all
M365

connect vm to log analytics workspace

https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/oms-windows PowerShell deployment The Set-AzVMExtension command can be used to deploy the Log Analytics agent virtual machine extension to an existing virtual machine. Before running the command, the public and private configurations need to be stored in a PowerShell hash table. PowerShell $PublicSettings = @{"workspaceId" = "myWorkspaceId"} $Prot

2020-11-18 0comments 117hotness 0likes mikebai Read all
M365

powershell Collect Event and Performance Data in Log Analytics

Today we continue with the Log Analytics post series. In the previous posts of this series, I showed you how to create a workspace for log analytics and how to deploy the log analytics. In this post, I will show you how to collect logs and metrics from VMs in your Log Analytics Workspace using Azure PowerShell. Prerequisites The Az.OperationalInsights module version 1.0.0 or later 

2020-11-17 0comments 97hotness 0likes mikebai Read all
M365

Log Analytics でSyslogのデータを収集してみた

■今回事前準備する環境 ・監視対象のマシン(今回はcentos7.5) ・OMS ワークスペース ■設定手順 (1)Log Analytics の[詳細設定]をクリックし、[Data]⇒[Syslog]をクリックします。 (2)その後、[次のファシリティからSyslogを収集]にチェックを入れて有効にし、[監視するファシリティの名前を入力]の検索欄で、監視するファシリティの名前を入力し、+ をクリックし設定していきます。 設定完了後、左上の[Save]をクリックし保存します。 本設定を行うことで、しばらくすると自動的にrsyslogの構成ファイル(

2020-11-16 0comments 119hotness 0likes mikebai Read all
dev

中继路由器 ip设置

主路由 LAN IP 192.168.2.1 DHCP设置网段为 192.168.2.10 -  192.168.2.99 中继路由LAN口设置IP为 192.168.2.200 网关为主路由IP 192.168.2.1 在中继路由里 DHCP设置网段为 192.168.2.200 -  192.168.2.222 (避免和主路由网段冲突即可) 同时将网关和主DNS服务器设置为主路由IP 192.168.2.1

2020-11-10 0comments 166hotness 0likes mikebai Read all
dev

理解桥接bridge和dhcp的原理

无论现在的各种容器,还是我们之前常用的虚拟机,为了与局域网内其他IP通讯通常需要用到『桥接』。 我犹记得以前为了实现虚拟机和宿主机之间的通讯,曾经配置过vmware的桥接模式,那么桥接是什么原理呢? 这个可以参考文章:《libvirt kvm 虚拟机上网 – Bridge桥接》,最主要的是理解下面这一段: NAT (默认上网) 虚拟机利用host机器的ip进行上网.对外显示一个ip Bridge 将虚拟机桥接到host机器的网卡上,guest和host机器都通过bridge上网.对外不同的ip, 理解NAT 要看bridge,最好先看懂NAT:NAT是虚拟机借助宿主机的IP上网,外人看来并不知道虚拟机的存在,这是如何work的呢? 我们知道家用路由器一般都是NAT模式,内网用户默认都是192.168.1.x网段,而路由器充当默认网关的角色,所有内网发出的包都将经过路由器,路由器在公网有唯一的IP,所有的包经过路由器修改其源IP都改为了公网IP了,并且会随机映射一个对外端口。当应答回到路由器时,路由器会根据此前的映射关系,将目标IP和PORT改为原先发送请求的内网用户的IP和PORT,这样对于内网用户来说是感知不到路由器的存在的,大家共用路由器的对外IP访问外网。当然,因为大家都在内网同一个网段(路由器基于DHCP分配),所以内网用户互相通讯也没有问题。 当NAT用在虚拟机领域的时候,原理是类似的。只不过一台PC上的若干虚拟机相当于若干内网用户,而宿主机PC充当路由器的角色,虚拟机会在PC上虚拟化一个网络环境:也就是每个虚拟机通过一个无形的网线连接到了无形的路由器上,仅此而已。每个虚拟机实例会通过PC上的虚拟路由器获取DHCP分配的局域网IP,但是这只是本机虚拟出来的局域网,并不是物理局域网。那么,现在虚拟机想访问外网,只需要配置默认网关为PC上虚拟路由器,那么数据包经过虚拟路由器的时候,会将源IP修改为PC的物理网卡的物理局域网IP,发送给物理路由器,之后的事情和之前描述的一样。

2020-11-05 0comments 127hotness 0likes mikebai Read all
dev

PVE安装Openwrt

https://www.10bests.com/install-openwrt-lede-on-pve/ 安装包 https://drive.google.com/drive/folders/1o6tJA7aE_TkBRcQmEBlD1twObe0DKBSe

2020-10-31 0comments 145hotness 0likes mikebai Read all
dev

Proxmox VE 安装教程

Proxmox VE(以下简称PVE)的安装方式有2种,第一种是直接下载PVE的ISO直接安装,第二种是先装Debian再添加proxmox的安装源来安装,本教程将详细介绍第一种安装PVE的过程。 Proxmox VE(Proxmox Virtual Environment)是一款套开源的虚拟化管理软件,用户可通过网页的方式来管理服务器上使用 kvm 以及 lxc 技术运行的虚拟机。同时提供了一些先进功能的支持,如集群、HA等。 PVE虽然是开源,却是由一个商业公司在运营、更新以及维护。 轻量、功能丰富和不挑硬件是PVE相比ESXi最大的优势,只后面配置虚拟机的过程中需要使用一些命令行,但是坑比EXSi少很多,总体过程轻松愉快,家用环境强烈推荐PVE。 一、系统需求 PVE硬件方面要求最低64位CPU,内存1GB以上,附加分配给客户机所需的内存,CPU虚拟化技术不是必须的,但是最好有。J3455主板加个千兆网卡跑软路由和黑群晖是够用的,内网能跑满千兆。 CPU: 64bit (Intel EMT64 or AMD64) Intel VT/AMD-V capable CPU/Mainboard for KVM full virtualization support

2020-10-30 0comments 125hotness 0likes mikebai Read all
dev

Linux Console Font Size

If you use the Linux console, the best way I found is: in /etc/default/console-setup put, for example

2020-10-29 0comments 110hotness 0likes mikebai Read all
M365

powerapps 画板大小设置

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/set-aspect-ratio-portrait-landscape https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-responsive-layout https://powerapps.microsoft.com/en-us/blog/craft-app-height-and-width-expressions-to-create-responsive-canvas-apps/ If you’ve built canvas apps using PowerApps, you’ve noticed that one of the first decisions you need to make is whether you want a layout that is tailored for a phone or for a tablet. This choice will determine the size and shape of the canvas you will work with while building your app. If your app is used on a device of a different size (or on the web), your entire layout is scaled larger (or smaller) to fit the screen where it is running. If an app designed for a phone is run in a large web browser window, for example, it appears almost comically oversized for its space. It can’t take advantage of all those additional pixels, by showing more controls or more content. With this new update, experienced app makers can now transform apps into a responsive experience through some work with expressions. You must write formulas that adapt the size and position of controls based on the size of the screen at runtime which is now able to be referenced in the app. You’ll be able to adapt the layout of each of your screens to the actual space in which they are running. As a result, screens show more information with more appropriate font sizes, all making for a better app experience. Turn off Scale to Fit As responsiveness is not yet the default for canvas apps, you will need to disable the current default fixed size behavior. Navigate to App settings > Screen size and orientation, then  turn the Scale…

2020-09-26 0comments 116hotness 0likes mikebai Read all
1…678910…62

Recent Posts

  • c# winform适配高dpi
  • com.microsoft.sqlserver.jdbc.SQLServerException “trustServerCertificate”属性设置为“false”,但驱动程序无法使用安全套接字层 (SSL) 加密与 SQL Server建立安全连接
  • java -cp 用法介绍
  • HTML 容器元素
  • MVC的cshtml的介绍

Recent Comments

No comments to show.

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang