用兩個 ' 把指令跟| grep一起框起來
watch 'ipmitool sdr | grep Watt'
個人在學習Linux過程當中的個人筆記,提供個人及有需要的人查閱,若有錯誤歡迎提供指正,謝謝。 This Blog recorded notes about my learning Linux and provides myself and others reference. If there are any incorrect information, welcome to leave a message to correct me, Thanks.
2015年8月31日 星期一
2015年8月25日 星期二
Performance Tests
Memory bandwidth:
1. Get source code from: https://www.cs.virginia.edu/stream/FTP/Code/
2. Refer to source code stream.c, On multiprocessor test, Use"gcc -O -fopenmp stream.c -o stream_omp" to compiler it
3. set OMP_NUM_THREADS to the number of threads you want to run. Ex. "export OMP_NUM_THREADS=12"
4. Run command "./stream_omp"
(The first run result should be ignored, refer from rc25482_performance report.pdf)
Memory Random Access, Random Access
1. The source code is under: http://icl.cs.utk.edu/hpcc/software/index.html
(But I don't know how to compiler it)
Block-IO test, fio
1. Get latest fio from https://github.com/axboe/fio
2. unzip and "./configuration", "make", "make install" to compile and install it.
3. run "fio xxxx.fio"
Network Bandwidth, nuttcp
1. Get the source code from: http://www.nuttcp.net/Welcome%20Page.html
2. Use "gcc -O nuttcp.c -o nuttcp" to compile it
3. Run "./nuttcp -S" on receiver , and run "./nuttcp [recevier ip]" on SUT
Network performance/latency, netperf
1. Get source code from: http://www.netperf.org/netperf/
2. unzip and "./configuration", "make", "make install" to compile and install it.
3. Run "netserver" on receiver (Server)
4. Run "netperf XXX" on SUT
Test TCP Stream Throughput:
#netperf -t TCP_STREAM -l 60 -H 192.1.1.100 -c -- -s 128k -S 128K
Test UDP Stream Throught:
#netperf -t UDP_STREAM -l 60 -H 192.1.1.100 -c -- -s 128k -S 128K
Test TCP Request/Response in 1 byte
#netperf -t TCP_RR -l 300 -H 192.1.1.100 -c
Test TCP Request/Response in 32/1024 byte
#netperf -t TCP_RR -l 300 -H 192.1.1.100 -c -- -r 32/1024
Test TCP Connect/Request/Response in 1 byte:
#netperf -t TCP_CRR -l 300 -H 192.1.1.100 -c
Test TCP Connect/Request/Response in 32/1024 byte
#netperf -t TCP_CRR -l 300 -H 192.1.1.100 -c -- -r 32/1024
1. Get source code from: https://www.cs.virginia.edu/stream/FTP/Code/
2. Refer to source code stream.c, On multiprocessor test, Use"gcc -O -fopenmp stream.c -o stream_omp" to compiler it
3. set OMP_NUM_THREADS to the number of threads you want to run. Ex. "export OMP_NUM_THREADS=12"
4. Run command "./stream_omp"
(The first run result should be ignored, refer from rc25482_performance report.pdf)
Memory Random Access, Random Access
1. The source code is under: http://icl.cs.utk.edu/hpcc/software/index.html
(But I don't know how to compiler it)
Block-IO test, fio
1. Get latest fio from https://github.com/axboe/fio
2. unzip and "./configuration", "make", "make install" to compile and install it.
3. run "fio xxxx.fio"
Network Bandwidth, nuttcp
1. Get the source code from: http://www.nuttcp.net/Welcome%20Page.html
2. Use "gcc -O nuttcp.c -o nuttcp" to compile it
3. Run "./nuttcp -S" on receiver , and run "./nuttcp [recevier ip]" on SUT
Network performance/latency, netperf
1. Get source code from: http://www.netperf.org/netperf/
2. unzip and "./configuration", "make", "make install" to compile and install it.
3. Run "netserver" on receiver (Server)
4. Run "netperf XXX" on SUT
Test TCP Stream Throughput:
#netperf -t TCP_STREAM -l 60 -H 192.1.1.100 -c -- -s 128k -S 128K
Test UDP Stream Throught:
#netperf -t UDP_STREAM -l 60 -H 192.1.1.100 -c -- -s 128k -S 128K
Test TCP Request/Response in 1 byte
#netperf -t TCP_RR -l 300 -H 192.1.1.100 -c
Test TCP Request/Response in 32/1024 byte
#netperf -t TCP_RR -l 300 -H 192.1.1.100 -c -- -r 32/1024
Test TCP Connect/Request/Response in 1 byte:
#netperf -t TCP_CRR -l 300 -H 192.1.1.100 -c
Test TCP Connect/Request/Response in 32/1024 byte
#netperf -t TCP_CRR -l 300 -H 192.1.1.100 -c -- -r 32/1024
2015年7月24日 星期五
2015年1月26日 星期一
docker networking
http://www.dasblinkenlichten.com/docker-networking-101/
- By default, all container networks are hidden from the real network. Here’s a masquerade (hide NAT) rule for all container traffic. This allows all of the containers to talk to the outside world (AKA the real network) but doesn’t allow the outside rule to talk back to the containers.
- docker run -it –rm –p 8080:80 busybox If we run that command, we can see that iptables creates an associated NAT rule that forwards traffic destined for 8080 on the host (10.20.30.100 in this case) to port 80 on the container… if the busybox container on docker1 wants to talk to the busybox container on docker2, it could only do so through an exposed port on the hosts network interface.
- 在host中把icc=false,container之間就不會互聯,要在run時用--link參數
2014年11月9日 星期日
play docker on windows
1. Install boot2docker
Download the installer
https://github.com/boot2docker/windows-installer/releases
This will install boot2docker, VirtualBox and git for windows
2. Start the boot2docker
Execute "Git Bash"
$ boot2docker start
$ boot2docker ip
Using the ip address to login boot2docker vm
3. Using putty to login boot2docker vm
IP: (get from previous step)
port: 22
username: docker
password: tcuser
4. create a my-data container to share folder & a samba container
$ docker run -v /data --name my-data busybox true
$ docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba my-data
(you can access share file in /(boot2docker's ip)/data in host windows)
5. Run a ubuntu container
$ docker run -it --volumes-from=my-data ubuntu
$
(you will in the container, using ctrl+p ctrl+q to detach)
6. check all container status
$ docker ps -a
(container id will be list)
7. Attach previous ubuntu container
$ docker attach [Container ID]
(just key-in the few heading numbers of container ID is OK)
8. Start playing around in container (in container)
$ apt-get update
$ apt-get install xxxxx
$ exit
(Will back to boot2docker vm)
9. Commit the container to a image
$ docker commit [Contain ID] your_name/image_name:tag
10. List all docker images
$ docker images
(previous commit image will be list)
11. Run a new container on new created image
$ docker run -it --volumes-from=my-data your_name/image_name:tag
$ exit
12. Delete container
$ docker rm [Container ID]
13. Delete image
$ docker rmi [image_name]
14. Back to "Git Bash", save the status of boot2docker
$ boot2docker save
(running status of boot2docker vm is saved)
15. resume boot2docker vm
$ boot2docker up
Download the installer
https://github.com/boot2docker/windows-installer/releases
This will install boot2docker, VirtualBox and git for windows
2. Start the boot2docker
Execute "Git Bash"
$ boot2docker start
$ boot2docker ip
Using the ip address to login boot2docker vm
3. Using putty to login boot2docker vm
IP: (get from previous step)
port: 22
username: docker
password: tcuser
4. create a my-data container to share folder & a samba container
$ docker run -v /data --name my-data busybox true
$ docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba my-data
(you can access share file in /(boot2docker's ip)/data in host windows)
5. Run a ubuntu container
$ docker run -it --volumes-from=my-data ubuntu
$
(you will in the container, using ctrl+p ctrl+q to detach)
6. check all container status
$ docker ps -a
(container id will be list)
7. Attach previous ubuntu container
$ docker attach [Container ID]
(just key-in the few heading numbers of container ID is OK)
8. Start playing around in container (in container)
$ apt-get update
$ apt-get install xxxxx
$ exit
(Will back to boot2docker vm)
9. Commit the container to a image
$ docker commit [Contain ID] your_name/image_name:tag
10. List all docker images
$ docker images
(previous commit image will be list)
11. Run a new container on new created image
$ docker run -it --volumes-from=my-data your_name/image_name:tag
$ exit
12. Delete container
$ docker rm [Container ID]
13. Delete image
$ docker rmi [image_name]
14. Back to "Git Bash", save the status of boot2docker
$ boot2docker save
(running status of boot2docker vm is saved)
15. resume boot2docker vm
$ boot2docker up
build freeipmi rpm on centos
1. install packages
#yum install rpm-build make gcc libgcrypt-devel texinfo
2. build rpms
#rpmbuild -ta freeipmi-X.Y.Z.tar.gz
Build ipmitool 1.8.18 rpm
# bunzip2 -c ipmitool-1.8.18.tar.bz2 | gzip -c > ipmitool-1.8.18.tar.gz
# rpmbuild -ta ipmitool-1.8.18.tar.gz
The ipmitool 1.8.18 rpm file is put on ~/rpmbuild/RPMS
#yum install rpm-build make gcc libgcrypt-devel texinfo
2. build rpms
#rpmbuild -ta freeipmi-X.Y.Z.tar.gz
Build ipmitool 1.8.18 rpm
# bunzip2 -c ipmitool-1.8.18.tar.bz2 | gzip -c > ipmitool-1.8.18.tar.gz
# rpmbuild -ta ipmitool-1.8.18.tar.gz
The ipmitool 1.8.18 rpm file is put on ~/rpmbuild/RPMS
2014年9月12日 星期五
pushd & popd
d就是directory,pushd 之後馬上切換到 路徑,在pushd 之後馬上在切換到,popd會切到,在popd一次會切到最一開始的路徑。
通常應該是寫bash script比較會用到
在這看到的應用(build docker images的script)
https://github.com/CentOS/CentOS-Dockerfiles
Wiki:
http://en.wikipedia.org/wiki/Pushd_and_popd
通常應該是寫bash script比較會用到
在這看到的應用(build docker images的script)
https://github.com/CentOS/CentOS-Dockerfiles
Wiki:
http://en.wikipedia.org/wiki/Pushd_and_popd
訂閱:
文章 (Atom)