EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

[轉]使用Docker搭建Web漏洞测试环境

http://www.freebuf.com/sectool/123907.html


http://www.freebuf.com/sectool/104524.html




在这个例子中,我直接在一个临时的容器上运行“remnux/metasploit”,退出的时候会消失(“rm”功能类似)。“-it”让你能够通过shell与容器进行交互。

为了保存容器的相关数据,我使用“-v”参数来将容器目录映射到我主机的目录上。我将使用”~/.msf4”目录来存放Metasploit Framework的配置文件。主机上的“/tmp/msf”目录将会存储其他数据,比如你可能从目标系统获取的数据。

参数“-p”对容器内部的端口进行映射。上面的例子用443端口来接收反弹shell的https连接。

angular2 ionic2 angularfire2 json <-> object

authstat json <-> object

import { Storage } from '@ionic/storage';
import { FirebaseAuthState } from 'angularfire2';


// authstate  object -> json

this._auth.signInWithEmailAndPassword(this.loginForm.value.email, this.loginForm.value.password)
.then((authData: FirebaseAuthState ) => {
  this.storage.set('alluserinfo', JSON.stringify(authData));
});



//json -> authstate  object

this.storage.get('alluserinfo').then((t_value) => {
      let value: FirebaseAuthState;
      value = JSON.parse(t_value);
});

Angular2 View Not Changing After Data Is Updated

[轉]Understanding Zones and Change Detection in Ionic 2 & Angular 2

http://www.joshmorony.com/understanding-zones-and-change-detection-in-ionic-2-angular-2/


Angular2 View Not Changing After Data Is Updated


Finish Use

setTimeout(() => {
     this.msgerror = error.message;
}, 10);

查現在連線load balance (haproxy)連到那台db

mysql -h xxx.xxx.xxx.xxx -u root -pxxxooo -e "set GLBAL server_id=xxxooo "

mysql -h xxx.xxx.xxx.xxx -u root -pxxxooo -e "show variables like 'server_id'"

[轉]比较全面的MySQL优化参考(上下篇)

http://imysql.com/2015/05/24/mysql-optimization-reference-1.shtml

http://imysql.com/2015/05/29/mysql-optimization-reference-2.shtml


[轉]找出MySQL服务器发生SWAP的原因?

http://www.ywnds.com/?p=7488
http://imysql.com/2016/11/30/mysql-faq-find-who-cause-mysql-swap.shtml


free -gt 查看内存、SWAP消耗情况


尤其是参加过 知数堂培训MySQL DBA优化班课程 的同学应该都知道,我们在课上多次强调:遇到这种情况,第一条件反射很直接就是:发生内存泄露(memory leak)了。

一般来说,如果发现内存统计结果中,cached和used 相差特别大的话,基本可确定系统发生内存泄露。相应的处理手法有:
治标的办法:择机重启进程,彻底释放内存归还给OS;
治本的办法:找到代码中导致泄露的代码,修复之(我们这次面对的是mysql代码,还是去官方提交bug吧,哈哈);
治本的办法:升级程序版本,通常新版本会解决旧版本存在的问题,推荐此方案。




物理内存还有不少空闲,但把swap都耗尽了。同样滴,这种案例在我们知数堂的MySQL DBA培训课程里也被多次谈及,绝大多数情况是因为没有关闭NUMA引起的。在运行数据库进程的服务器上,强烈建议关闭NUMA,在之前的分享 比较全面的MySQL优化参考(上篇) 中也有提及。



[轉]Docker:搭建私有仓库(Registry 2.4.1)

http://www.ywnds.com/?p=7411



Docker Hub是一个很好的用于管理公共镜像的地方,我们可以在上面找到想要的镜像(Docker Hub的下载量已经达到数亿次)




Registry作为Docker的核心组件之一负责镜像内容的存储与分发,客户端的docker pull以及push命令都将直接与registry进行交互

[轉]docker volumes 容器数据管理

http://www.ywnds.com/?p=7015



多人都对Volume有一个误解,他们认为Volume是为了持久化。如此想法是因为他们觉得容器不能持久化,所以Volume应该是为了满足这个需求而设计的。其实容器会一直存在,除非你删除它们。这可能来自于容器不是持久的想法,这样确实是不对的。容器是持久的,直到你删除他们



Volume并不是为了持久化。而Volume可以使用以下两种方式创建:

1)在Dockerfile中指定VOLUME /data。

2)执行docker run -v /data命令来指定。

无论哪种方式都是做了同样的事情。它们告诉Docker在主机上创建一个目录(默认情况下是在/var/lib/docker下),然后将其挂载到指定的路径(例子中是:/data)

[轉]MySQL实时性能监控工具doDBA tools

http://www.ywnds.com/?p=7499

mariadb galera cluster

https://mariadb.com/kb/en/mariadb/galera-cluster-status-variables/

http://www.ywnds.com/?p=6084

http://benjr.tw/95536

http://www.99cloud.net/html/2016/jiuzhouyuanchuang_0316/131.html

SHOW GLOBAL STATUS LIKE ’wsrep_%’;
  
(1)SHOW GLOBAL STATUS LIKE ’wsrep_cluster_state_uuid’; 集群中每个节点的值必须一致。

(2)SHOW GLOBAL STATUS LIKE ’wsrep_cluster_size’; 显示集群的规模,此例应该显示”2”。

(3)SHOW GLOBAL STATUS LIKE ’wsrep_cluster_status’; 显示”Primary”为正常。

(4)SHOW GLOBAL STATUS LIKE ’wsrep_ready’; 显示”ON”为正常。

(5) SHOW GLOBAL STATUS LIKE ’wsrep_connected’; 显示”ON”为正常。

(6) SHOW GLOBAL STATUS LIKE ’wsrep_local_state_comment’; 显示” Joined”为正常。

rancher MariaDB galera cluster 破壞


sysbench mariaDB

http://www.actionsky.com/docs/archives/171

http://www.slideshare.net/yejr/my-sql-20131020?ref=http://imysql.com/2013/11/19/mysql-benchmark-testing.shtml
==========
apt-get install sysbench


  • 建table、records

sysbench --debug=on --test=oltp --db-driver=mysql --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=root --mysql-password=oooxxx --mysql-host=10.255.255.215 prepare


  • 測試

sysbench --num-threads=16 --max-requests=100000 --debug=on --test=oltp --db-driver=mysql --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=root --mysql-password=oooxxx --mysql-host=10.255.255.215 run


  • 清掉table、records
sysbench --debug=on --test=oltp --db-driver=mysql --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=root --mysql-password=oooxxx --mysql-host=10.255.255.215 cleanup


https://blog.gslin.org/archives/2015/09/13/5971/%E7%94%A8-sysbench-%E6%B8%AC%E8%A9%A6-mysql-%E6%95%88%E8%83%BD/

http://blog.xuite.net/misgarlic/weblogic/56170203-MySQL+benchmark+tool+-+sysbench

http://hugnew.com/?p=737

==========
http://who0168.blog.51cto.com/253401/556300/



[root@localhost bin]# ./sysbench
测试用例:
sysbench [general-options]... --test=<test-name> [test-options]... command

通用选项:
--num-threads=N 创建测试线程的数目。默认为1.
--max-requests=N 请求的最大数目。默认为10000,0代表不限制。
--max-time=N 最大执行时间,单位是s。默认是0,不限制。
--forced-shutdown=STRING 超过max-time强制中断。默认是off。]
--thread-stack-size=SIZE 每个线程的堆栈大小。默认是32K。
--init-rng=[on|off] 在测试开始时是否初始化随机数发生器。默认是off。
--test=STRING 指定测试项目名称。
--debug=[on|off] 是否显示更多的调试信息。默认是off。
--validate=[on|off] 在可能情况下执行验证检查。默认是off。

测试项目:
fileio - File I/O test
cpu - CPU performance test
memory - Memory functions speed test
threads - Threads subsystem performance test
mutex - Mutex performance test(互斥性能测试)
oltp - OLTP test

指令: prepare(测试前准备工作) run(正式测试) cleanup(测试后删掉测试数据) help version

See 'sysbench --test=<name> help' for a list of options for each test. 查看每个测试项目的更多选项列表。

[root@localhost bin]# ./sysbench --test=fileio help
--file-num=N 创建测试文件的数量。默认是128
--file-block-size=N 测试时文件块的大小。默认是16384(16K)
--file-total-size=SIZE 测试文件的总大小。默认是2G
--file-test-mode=STRING 文件测试模式{seqwr(顺序写), seqrewr(顺序读写), seqrd(顺序读), rndrd(随机读), rndwr(随机写), rndrw(随机读写)}
--file-io-mode=STRING 文件操作模式{sync(同步),async(异步),fastmmap(快速map映射),slowmmap(慢map映射)}。默认是sync
--file-extra-flags=STRING 使用额外的标志来打开文件{sync,dsync,direct} 。默认为空
--file-fsync-freq=N 执行fsync()的频率。(0 – 不使用fsync())。默认是100
--file-fsync-all=[on|off] 每执行完一次写操作就执行一次fsync。默认是off
--file-fsync-end=[on|off] 在测试结束时才执行fsync。默认是on
--file-fsync-mode=STRING 使用哪种方法进行同步{fsync, fdatasync}。默认是fsync
--file-merged-requests=N 如果可以,合并最多的IO请求数(0 – 表示不合并)。默认是0
--file-rw-ratio=N 测试时的读写比例。默认是1.5

[root@localhost bin]# ./sysbench --test=cpu help
--cpu-max-prime=N 最大质数发生器数量。默认是10000

[root@localhost bin]# ./sysbench --test=memory help
--memory-block-size=SIZE 测试时内存块大小。默认是1K
--memory-total-size=SIZE 传输数据的总大小。默认是100G
--memory-scope=STRING 内存访问范围{global,local}。默认是global
--memory-hugetlb=[on|off] 从HugeTLB池内存分配。默认是off
--memory-oper=STRING 内存操作类型。{read, write, none} 默认是write
--memory-access-mode=STRING存储器存取方式{seq,rnd} 默认是seq

[root@localhost bin]# ./sysbench --test=threads help
--thread-yields=N 每个请求产生多少个线程。默认是1000
--thread-locks=N 每个线程的锁的数量。默认是8

[root@localhost bin]# ./sysbench --test=mutex help
--mutex-num=N 数组互斥的总大小。默认是4096
--mutex-locks=N 每个线程互斥锁的数量。默认是50000
--mutex-loops=N 内部互斥锁的空循环数量。默认是10000

[root@localhost bin]# ./sysbench --test=oltp help
oltp options:
--oltp-test-mode=STRING 执行模式{simple,complex(advanced transactional),nontrx(non-transactional),sp}。默认是complex
--oltp-reconnect-mode=STRING 重新连接模式{session(不使用重新连接。每个线程断开只在测试结束),transaction(在每次事务结束后重新连接),query(在每个SQL语句执行完重新连接),random(对于每个事务随机选择以上重新连接模式)}。默认是session
--oltp-sp-name=STRING 存储过程的名称。默认为空
--oltp-read-only=[on|off] 只读模式。Update,delete,insert语句不可执行。默认是off
--oltp-skip-trx=[on|off] 省略begin/commit语句。默认是off
--oltp-range-size=N 查询范围。默认是100
--oltp-point-selects=N number of point selects [10]
--oltp-simple-ranges=N number of simple ranges [1]
--oltp-sum-ranges=N number of sum ranges [1]
--oltp-order-ranges=N number of ordered ranges [1]
--oltp-distinct-ranges=N number of distinct ranges [1]
--oltp-index-updates=N number of index update [1]
--oltp-non-index-updates=N number of non-index updates [1]
--oltp-nontrx-mode=STRING 查询类型对于非事务执行模式{select, update_key, update_nokey, insert, delete} [select]
--oltp-auto-inc=[on|off] AUTO_INCREMENT是否开启。默认是on
--oltp-connect-delay=N 在多少微秒后连接数据库。默认是10000
--oltp-user-delay-min=N 每个请求最短等待时间。单位是ms。默认是0
--oltp-user-delay-max=N 每个请求最长等待时间。单位是ms。默认是0
--oltp-table-name=STRING 测试时使用到的表名。默认是sbtest
--oltp-table-size=N 测试表的记录数。默认是10000
--oltp-dist-type=STRING 分布的随机数{uniform(均匀分布),Gaussian(高斯分布),special(空间分布)}。默认是special
--oltp-dist-iter=N 产生数的迭代次数。默认是12
--oltp-dist-pct=N 值的百分比被视为'special' (for special distribution)。默认是1
--oltp-dist-res=N ‘special’的百分比值。默认是75

General database options:
--db-driver=STRING 指定数据库驱动程序('help' to get list of available drivers)
--db-ps-mode=STRING编制报表使用模式{auto, disable} [auto]

Compiled-in database drivers:
mysql - MySQL driver

mysql options:
--mysql-host=[LIST,...] MySQL server host [localhost]
--mysql-port=N MySQL server port [3306]
--mysql-socket=STRING MySQL socket
--mysql-user=STRING MySQL user [sbtest]
--mysql-password=STRING MySQL password []
--mysql-db=STRING MySQL database name [sbtest]
--mysql-table-engine=STRING storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [innodb]
--mysql-engine-trx=STRING whether storage engine used is transactional or not {yes,no,auto} [auto]
--mysql-ssl=[on|off] use SSL connections, if available in the client library [off]
--myisam-max-rows=N max-rows parameter for MyISAM tables [1000000]
--mysql-create-options=STRING additional options passed to CREATE TABLE []



  • 测试cpu

./sysbench --test=cpu --cpu-max-prime=20000 run

  • 测试线程

./sysbench --num-threads=64 --test=threads --thread-yields=100 --thread-locks=2 run

  • 测试mutex

./sysbench --num-threads=1500 --max-requests=2000 --test=mutex --mutex-num=10240 --mutex-locks=100000 --mutex-loops=15000 run

  • 测试fileio
./sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw prepare

./sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw run

./sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw cleanup


  • 测试OLTP
./sysbench --test=oltp --mysql-table-engine=innodb --mysql-port=3307 --mysql-db=test --oltp-table-size=10000000 --mysql-socket=/tmp/mysql-5.5.8.sock prepare


./sysbench --num-threads=100 --max-requests=100000 --test=oltp --oltp-table-size=1000000 --mysql-port=3307 --mysql-db=test --mysql-socket=/tmp/mysql-5.5.8.sock run


./sysbench --test=oltp --mysql-table-engine=innodb --mysql-port=3307 --mysql-db=test --oltp-table-size=10000000 --mysql-socket=/tmp/mysql-5.5.8.sock cleanup

[轉]docker 與本機端資料戶傳的方法

// 從外面送一個 my_sound.mp3 檔案進去 docker 環境裡面的 /my_sound.mp3



// 使用 ebuildy/echoprint 這個 docker image 裡面的 echoprint-codegen 程式去跑它

docker run -v my_sound.mp3:/my_sound.mp3 ebuildy/echoprint echoprint-codegen /my_sound.mp3



// 把資料從 container 當中拿出來    ebca1bdd8bfc -> container id

docker cp ebca1bdd8bfc:/opt/echoprint.tar .



// 把資料test.c從本機端丟進 docker container 中

docker cp test.c ebca1bdd8bfc:/





// 列出正在run的 docker image 環境

docker ps



// 列出我有電腦上載下來的 docker images

docker images

[轉]Creating an Asynchronous Login Screen in Ionic 2

https://www.youtube.com/watch?v=5WK9R1y-eKg

================
http://eriyu-blog.logdown.com/posts/773548-study-of-ng2-polyfill

主要是提供ES7提出的Observables特性,

Observables提供了非同步資料fetch時的另一種做法。

我們跟伺服器端抓取完資料,要做後續的動作時,

最早的寫法是用callback,

後來改良的寫法是使用Promise減少callback hell的發生。

Promise已經很好用了,但是它還是有些缺點。

它無法做到發送request後,可以中止或是重送的功能。

它在宣告使用Promise時,就已經被執行了。

而Observables解決了Promise的這些問題,

它可以中止及重送request。

Observables在創建時不會被執行,而是實際呼叫時才被執行。

另外Observables又提供了值組的操作,像是merge、sum、map等功能。

還有Observables就如同它字面的意思,他實作觀察者模式,當資料變更時會發出通知給它的訂閱者。

官方的Angular2教學文件在非同步資料抓取,是直上ES7的規格,提供Observables的寫法,但你也可以依據你的專案需求改成Promise。

一般的專案,也許可以用Promise就能滿足了,但是如果你的專案功能是需要比較互動、即時性的時候,用上Observables就不用費太多功夫做資料的watch。

[轉]observables-in-ionic2

https://www.joshmorony.com/building-mobile-apps-with-ionic-2/observables-in-ionic2.html


this.http.get(url).subscribe(

    (data) => {
        console.log(data);
    },

    (err) => {
        console.log(err);
    },

    () => {
        console.log("completed");
    }
);

In the code above the first event handler handles the onNext response, which basically means "when we detect the next bit of data emitted from the stream, do this". The second handler handles the onError response, which as you might have guessed will be triggered when an error occurs. The final handler handles the onCompleted event, which will trigger once the Observable has returned all of its data.



etc.... just see webpage

ranche + kubernetes

https://read01.com/PL50mL.html

GALERA CLUSTER


  • GALERA CLUSTER FOR RANCHER


http://www.dockerinfo.net/1771.html

https://octoperf.com/blog/2016/11/17/rancher-galera-cluster/




  • Running a Galera Cluster in Kubernetes


https://www.percona.com/live/data-performance-conference-2016/sessions/running-galera-cluster-kubernetes

http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services




  • Architecture of deployment on Azure


http://withblue.ink/2016/03/09/galera-cluster-mariadb-coreos-and-docker-part-1.html



ionic2 angularfire example better than google example..............

https://github.com/rodrigoreal/ionic2-angularfire-login




==========
https://github.com/angular/angularfire2/issues/560
https://blog.khophi.co/angularfire2-authentication/

https://github.com/angular/angularfire2/issues/568

https://github.com/angular/angularfire2/issues/566

AngularFire ionic2 auth

Very Important !!

use subscribe

constructor(public af: AngularFire) {
    af.auth.subscribe((authstate) => {
        console.log(authstate);
        authstate == null ? logout() : login(authstate.auth.displayName);
    });
  }

And  Think change to Callback mode .............


==========
First :
   everyone use af.auth.getauth() , then check,  have value is login, null is not login.

But it's mistack. Reload page, Change page  AngularFire miss...... af.auth be free.
Only login page can get af.auth

Second:
  af.auth.subscribe ( ....... )   When auth check finish, run subscribe ( ..... )
This is real get auth. But Think login different First way........

ionic run android gives Property … does not exist on type ‘{ [key: string]: AbstractControl; }’

ionic run android gives Property … does not exist on type ‘{ [key: string]: AbstractControl; }’


https://forum.ionicframework.com/t/property-does-not-exist-on-type-key-string-abstractcontrol/65783

http://stackoverflow.com/questions/39881367/property-does-not-exist-on-type-key-string-abstractcontrol/39886710

I Test Finish:

1、In ts files, still use   loginForm: FormGroup;

2、loginForm.controls.password.valid   -> loginForm.get('password').valid

mysql heidisql

http://www.heidisql.com/

FreeNAS replication dataset set a read-only

https://forums.freenas.org/index.php?threads/replication-dataset-set-a-read-only.46889/

https://forums.freenas.org/index.php?threads/replication-target-datasets-mounted-ro-in-freenas-9-3-stable-201602020212-and-newer.41246/

https://forums.freenas.org/index.php?threads/zfs-replication-and-making-the-destination-read-write.10551/


https://bugs.freenas.org/issues/15011


zfs list -o name,mountpoint,mounted,readonly volrep/common


zfs set readonly=off tank/root

redis

http://www.runoob.com/redis/redis-tutorial.html

mariadb ubuntu 16.4


官方
https://mariadb.com/kb/en/mariadb/installing-mariadb-deb-files/


  • New Key
  • Add MariaDB to your sources.list 

sudo apt-get install software-properties-common 
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main'


sudo apt-get update
sudo apt-get install mariadb-server


.begin install maybe have question about other mariadb toolkit install
If Y -> have one question for root password
If N -> use  mysql_secure_installtion  for secure


Finish install mariadb.

modify my.cnf    /etc/mysql  ( find / -name my.cnf )

[mysqld]
1、port  maybe change  3306 -> 6033
2、listen maybe 127.0.0.1 -> 0.0.0.0


login mysql

1、root login anywhere %, full rights

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'put password' with grant option;


2、create other account  login anywhere %, full rights

GRANT ALL PRIVILEGES ON *.* TO 'otheraccount'@'%' IDENTIFIED BY 'put password' with grant option;



3、remove  Revoke  (權限)

REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'root'@'%';

4、Remove/Delete the user

DROP USER 'root'@'%';


5、show user and grant 顯示
SELECT User,Host FROM mysql.user;

SHOW GRANTS FOR 'root'@'localhost';
SHOW GRANTS FOR 'root'@'%';

http://idroot.net/linux/install-mariadb-ubuntu-16-04/



T2 instance CPU Credit Usage & Balance

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html


CPUCreditUsage

(Only valid for T2 instances) The number of CPU credits consumed during the specified period.

consumed 消耗


CPUCreditBalance

(Only valid for T2 instances) The number of CPU credits that an instance has accumulated.

accumulated 累積

電影票 打折 180

101文具天堂
https://goo.gl/vv6yEC


墊腳石



http://webptt.com/m.aspx?n=bbs/TaichungBun/M.1436676457.A.4B1.html

2F:推 jrico: 如果你有習慣在親親看,就千萬不要買優待票,辦張會員卡,一張 07/12 13:34
3F:→ jrico: 會員卡,一張票雖190但有含(爆米花汽水或去換哈拉麵包餐盒) 07/12 13:35
4F:→ jrico: 買三送一(一張票有兩點,及六點,一到四可以免費看一場) 07/12 13:36
5F:→ jrico: 所以平均下來一張票才143(又有東西可以吃) 07/12 13:36

[轉]流媒体直播——资料整理、你想要了解的都在这。

https://www.hongweipeng.com/index.php/archives/835/


http://www.cnblogs.com/lingyunhu/p/rtc28.html

https://jitsi.org/Projects/JitsiVideobridge

https://www.youtube.com/watch?v=OT6kwzsQeVc&feature=youtu.be

https://my.oschina.net/langhuihui/blog/598338
https://my.oschina.net/langhuihui/blog/602265
https://my.oschina.net/langhuihui/blog/612144

ionic2 add new components

http://ionicframework.com/docs/v2/components/#overview

1、src\app\app.module.ts  import

  • import 
  • declarations
  • entryComponents
2、src\app\app.components.ts  import 
  • import
  • this.pages
3、If  .ts .html .scss files in src\pages\

  • .ts 
  • @component   templateUrl
  • export class
  • .html
  • ion-navbar     remeber  button  & menu

usually change this step and file, then you can test Components.

rtmp to html5 websocket webrtc


http://flashphoner.com/broadcasting-of-a-streaming-video-from-a-professional-video-capturing-device-live-encoder-via-the-rtmp-protocol/

這套大概是目前可以把rtmp轉成websocket和webrtc


https://wcs5-eu.flashphoner.com/dashboard.xhtml
這是他的deom,Streamer就是把攝像頭和聲音轉成html5 (websocket、webRTC)能接收的


有下載 web call server 5.0 但要序號,問官方,說沒試用

============
另一個可能
Monaserver  
http://www.monaserver.ovh/

freenas proxmox esxi vm

https://www.facebook.com/groups/nas.tw/permalink/10154653693713245/


走iscsi
沒 ups  -> no cache


os disk 使用 HDD pool
database disk 使用 HDD pool + NVMe Cache (zil and cache)
file disk 使用 HDD pool + cache

snmp OBSERVIUM Miunin

http://www.observium.org/
http://www.observium.org/docs/add_device/


Miunin
http://munin-monitoring.org/

http://joe-dev.blogspot.tw/2012/08/munin.html
http://waste.mandragor.org/munin_tutorial/munin.html#getting_started

[轉]Video live streaming in html5

https://github.com/sbidolach/video-live-streaming

[轉]關於VMware版本選擇

http://vmware.mosquito.tw/phpbb3/viewtopic.php?f=13&t=25


以性價比來說
essentials plus絕對是最划算的
它以套裝的方式將vCenter搭售進來
在預算有限的情形下,它的確是不錯選擇
但它限制了ESXi的擴充性
再加上沒有好用的Storage vMotion功能
總是讓人覺得有所缺憾
轉而往上看進階一點的版本


Standard版來看
Server vMotion、Storage vMotion、ESXi HA都有支援
看起來已經很適合一般企業使用
但仔細看看,它少了DRS的功能(Distributed Resource Scheduler)
或許一開始不會覺得DRS並不太需要
可是當您要管理的虛擬機超過50多台
就會發現資源管理變的很麻煩
需要每一台去調配,無法用share的方式去管理
vMware也無法自動依每台ESXi host使用率去自動協助vMotion來達到Loading balance
就會開始後悔怎麼沒有買到Enterprise的等級


Enterprise版看來已接近完美
有vMotion,Storage vMotion, ESXi HA
又有DRS功能讓你可以方便的管理整體resource
又能讓VMware自動啟動vMotion去平衡每台ESXi的資源使用
但你又會發現竟然要買到Enterprise Plus版本,才能擁有VDS(分散式虛擬交換器Virtual Distributed Switch)
沒有VDS,每一台ESXi都要去設定自己的VSS(Virtual Standard Switch)
只要有需求更改一個VSS上的設定,就要到每一台ESXi上的VSS去更改
而且居然只有VDS才支援LACP的NIC Teaming方式


在價格比方便,standard : Enterprise : Enterprise Plus 大概正好是 1 : 2 : 3
真是太讓人生氣了....
明明Standard版本已經很符合功能了
但想要再多那一點好用的部份,卻要用3倍的成本才能取得
如果預算沒有問題
真的還是建議直接採購Enterprise plus版本

[轉]io-comparison-proxmox-kvm-raw-qcow2

http://sclabs.blogspot.tw/2016/07/io-comparison-proxmox-kvm-raw-qcow2_23.html

convert lvm to raw

http://pve.proxmox.com/wiki/Storage_Migration

==========
qemu-img convert -O qcow2 /dev/VMStor1/vm-100-disk-1 /mnt/VMStor2/images/100/vm-100-disk-1.qcow2

convert raw to lvm

qemu-img convert -p -f vmdk "IE11 - Win7-disk1.vmdk" -O raw /dev/mapper/pve-vm--101--disk-1

==========

qemu-img convert -p -f vmdk "IE11 - Win7-disk1.vmdk" -O raw "IE11 - Win7-disk1.raw"

dd if="IE11 - Win7-disk1.raw" bs=1M|pv| dd of=/dev/mapper/pve-vm--101--disk--1





https://forum.proxmox.com/threads/dd-raw-drives-to-lvm-is-slow-is-there-a-better-way.29785/

vCenter 授權

vCenter Server 的授權版本不支援VMware vSphere 5 Enterprise Plus

vSphere 分為六種授權 Essentials、Essentials Plus、Standard、Advanced、Enterprise、Enterprise Plus

Essentials、Essentials Plus 適合使用於中小型企業

Standard、Advanced、Enterprise、Enterprise Plus 適合使用於中大型企業

Essentials、Essentials Plus: 授權費用中 包含 vCenter Server 軟體費用,此版本的 vCenter Server 最多只能管理 3 台 ESX 伺服器,也就是 3 台實體伺服器。


Standard、Advanced、Enterprise、Enterprise Plus: 授權費用中 不包含 vCenter Server 軟體費用,並須另購授權。



vCenter: 為 ESX / VM 管理平台,若 ESX 主機環境中沒有 vCenter 則一些進階功能例如 VMotion、HA...等都無法進行實作
vCenter for Essentials: 與 vCenter Foundation 此版本的 vCenter 僅搭配 Essentials 及 Essentials Plus Kit。
vCenter Foundation: 限制只能管理 3 台 ESX 伺服器,也就是 3 台實體伺服器。
vCenter Standard: 沒有限制管理 ESX 伺服器台數,也就是不限制實體伺服器數量。

vCenter 登入不要打網域

正常登入要打網域

vsphere.local/xxxxxxxxx


如果把Administrators加入 vCenter 該台機器的 系統管理員
然後把帳號加到Adimistrators群組內,這樣就能登入


http://blog.xuite.net/tolarku/blog/250007676-VMWare+vcenter+SSO+%E6%96%B0%E5%A2%9E%E4%BD%BF%E7%94%A8%E8%80%85+-+%E6%8E%88%E8%88%87%E7%AE%A1%E7%90%86%E6%AC%8A%E9%99%90


[轉]cloudflare加速最佳化設置

https://hzsh.xyz/173/cloudflare%E5%8A%A0%E9%80%9F%E6%9C%80%E4%BD%B3%E5%8C%96%E8%A8%AD%E7%BD%AE#comment-207

[轉]vestacp

https://hzsh.xyz/679/vestacp%E5%AE%89%E8%A3%9D-%E5%85%8D%E8%B2%BBvps%E6%8E%A7%E5%88%B6%E9%9D%A2%E6%9D%BF%E9%85%8D%E7%BD%AE%E6%95%99%E5%AD%B8

Remove Cluster configuration

http://pve.proxmox.com/wiki/Proxmox_Cluster_File_System_(pmxcfs)

stop the cluster file system in /etc/pve/
# systemctl stop pve-cluster


start it again but forcing local mode
# pmxcfs -l


remove the cluster configuration
# rm /etc/pve/cluster.conf
# rm /etc/cluster/cluster.conf
# rm /var/lib/pve-cluster/corosync.authkey


stop the cluster file system again
# systemctl stop pve-cluster


restart PVE services (or reboot)
# systemctl start pve-cluster
# systemctl restart pvedaemon
# systemctl restart pveproxy
# systemctl restart pvestatd


=======移除node==============
經PVE03 執行pvecm delnode pve07
刪除 已重灌的pve07 節點,corosync.conf 內的node 資料已刪除
但gui上仍出現pve07 的資料
需手動進pve03 的shell,進入/etc/pve/nodes,rm -rf pve07
手動刪除pve07 的資料夾,再重整網頁gui,pve07即消失

proxmox cluster failed

pvecm expected 1

暫時把集叢的期待數量從2降低為1

service pve-cluster restart


==========
本機運作
systemctl stop pve-cluster
pmxcfs -l


==========

systemctl restart corosync.service
systemctl restart pve-cluster.service
systemctl restart pvedaemon.service
systemctl restart pveproxy.service



https://pve.proxmox.com/wiki/Separate_Cluster_Network

proxmox lvm

pvs
vgs
lvs

pvdisplay
vgdisplay
lvdisplay

lvdisplay  可以看到目前all locate % size

qnap lacp layer 2 layer 2+3

https://www.qnap.com/zh-tw/tutorial/con_show.php?op=showone&cid=216



目前預設的Layer 2(MAC) 相容性最高, 但僅能使用MAC來進行負載平衡。我們建議您用Layer 2+3 (MAC+IP)來達到更好的效果,但此功能必須交換器同時也有支援Layer 2+3 (MAC+IP)才能使用。 因此請先確認您的交換器可以支援Layer 2+3 (MAC+IP)。


就單個用戶端而言,即使使用Port Trunking技術,NAS之傳輸速度仍會維持為單一埠之速度。例如:若您使用的是兩個1Gb的網路埠,則使用聚合技術之後,雖然網路總頻寬已增至2Gb,但網路速度仍會維持在1Gb/s。

vlan cisco

vlan — IP

Port (interface) - vlan (access)

Port (interface) - 單/多vlan (trunk)  allowed (add | all | except)

Port (interface) - no switch port (set ip address)



ip routing  讓vlan互通

ACL 讓vlan互不通


http://blog.yam.com/gavint/article/31578943

http://www.hkitblog.com/?p=19103

use zfs directly to send snapshots

https://forum.proxmox.com/threads/pve-zsync-vs-others-like-znapsend-or-sanoid.27663/#post-139274

FreeBSD ZFS Backed ESXi Storage Over NFS

FreeNAS NFS  dataset set  sync=disabled

zfs set sync=disabled tank/dataset 

Need to remeber have data risk.


https://www.ateamsystems.com/tech-blog/solved-performance-issues-with-freebsd-zfs-backed-esxi-storage-over-nfs/

http://christopher-technicalmusings.blogspot.tw/2011/06/speeding-up-freebsds-nfs-on-zfs-for-esx.html

vmware esxi nfs Settings

https://www.vmguru.com/2015/12/best-practices-running-vmware-with-nfs/

hugo chang ip and bind all

hugo server  --theme=hugo_theme_robust --baseURL 192.168.xxx.xxx:1313 --bind "0.0.0.0"


baseURL 192.168.xxx.xxx   you server ip

bind  for all  default only localhost.......

streaming mpeg-dash GPAC live streaming html5 browsers

Live Streaming to HTML5 Browsers

https://github.com/sparks/rter/blob/master/docs/streaming.md


Now need webSocket, webRTC or mpeg-dash
http://flashphoner.com/broadcasting-of-a-webrtc-stream-to-ios-safari-and-other-browsers-with-low-latency/


GPAC
https://gpac.wp.mines-telecom.fr/
https://gpac.wp.mines-telecom.fr/dashcast/


mpeg-dash

dash.js
https://github.com/Dash-Industry-Forum/dash.js/wiki

http://dashif.org/software/


DASH Low Latency Web Server

https://github.com/gpac/node-gpac-dash


MPEG-DASH browser support and device compatibility

https://bitmovin.com/mpeg-dash-browser-support-device-compatibility/




http://www.mem.com.tw/article_content.asp?sn=1207190001

https://imququ.com/post/html5-live-player-1.html
https://imququ.com/post/html5-live-player-2.html
https://imququ.com/post/html5-live-player-3.html

[轉]How to Fix PIN Errors After Restoring from TWRP Android Backups

http://www.howtogeek.com/240657/how-to-fix-pin-errors-after-restoring-from-twrp-android-backups/

[轉]台灣為什麼變弱了,二十年來台灣倒底“少做”了什麼?



http://www.mobile01.com/topicdetail.php?f=291&t=4913584&p=8





8KK





2016-09-07 09:07 #4






內鬥跟扯後腿以及官商勾結




好的貿易協定卻被另一個說這是賣台說不能簽

單單是關稅的影響就讓台灣生產的售價比其他國家貴10~25%

尤其是韓國,韓國產品品質不差,但價格卻能比台灣賣更便宜




於是消費者優先考量就是韓國產品




台灣是海島國家,必須依靠外銷才能撐起經濟

但是因為貿易協定一直都被人扯後腿

被有心人士找無知的學生來抗議




喊口號不會讓你競爭力提高

喊口號不會讓台灣經濟起飛

喊口號不會讓飯從天上掉下來




結果導致台灣的外銷競爭力一天不如一天




而台灣廠商為了生存

就只能不斷把產線給外移




產線一旦外移就會使失業率提高

會讓越來越多人沒工作

失業率提高

整體競爭力就會下降




如此不斷惡性循環下

台灣經濟就不斷衰退了




在台灣選舉是需要龐大的資金

於是政客就會找財團支援

當政客當選後就會被財團給控制




就算沒有控制也會互相互惠

反正政府的錢不是我的錢

只要放鬆一下

就可以讓政府大開方便之門

然後讓財團有利可圖

政客也當然能從中獲利




慢慢國家的錢就因為各種浮濫及金額灌水的標案而被掏空

國家沒錢就用國家的名義借錢

然後再把稅金拿去填補坑洞




在這段過程中

政客 財團 銀行都能從中獲利




唯一的受害者就是民眾

但是因為是溫水煮青蛙

民眾不會感覺痛




而經濟會慢慢反應出來

因為錢沒有花在刀口上

導致經濟越來越衰退














alffu





2016-09-07 09:35 #7






一人得道(當選總統),可指定幾百個專案的官員,例如水利局-局長、環保局....




這些官員以往都是局內優秀人員上來,現在都是誰當選,就派誰的親戚(的鄰居的同學)




任期又短,亂指揮,治水工程可以改來改去嗎?




佔二年,領了18%,又換一個




換來換去,政策一直【改來改】




兩黨都一樣










水云






2016-09-07 09:43 #9






沒有少做什麼

台灣沒有變弱,只是別人變強




同樣的




日本沒有失落 20 年,只是被 台灣 找到 10 年、被 韓國 找到 10 年








8KK








2016-09-07 09:48 #11






貿易協定乃是雙方彼此開放條件來談

你不開放條件來互惠,對方哪有可能讓你零關稅




你想得到零關稅

當然要有所付出

但卻被有心人士利用開放條件的理由說是賣台

於是阻擋簽貿易協定




每一次的貿易協定我們沒簽到的話

台灣產品就會比其他國家更貴一次




我友好幾個客戶就在痛罵

因為台灣沒有簽到貿易協定

導致台灣產品被徵收10%以上的稅金

其他國家乃是零稅金




客戶想衝刺海外市場

但是成本硬是比其他國家還高10%以上

想打出品牌也要先能站穩基礎才行

但想先站穩基礎

成本硬是比別人高




這是一場還沒開打就已經輸掉的戰爭了










8KK





2016-09-07 10:11 #16






這也是為何台灣低中高階各大產業不斷外移的原因




以前台灣是密集勞力產業外移

因為大陸跟東南亞工資低




密集勞力產業是需要大量廉價的勞工來從事簡單的生產

所以密集勞業產業外移對台灣影響並不大




當時中高階產業並沒有外移

因為中高階產業不需要廉價的密集勞力




而中高階產業乃是高獲利產業

所以密集勞力的低階產業外移對台灣經濟影響不大




但這幾年許多國家紛紛一起簽貿易協定

這時台灣中高階產業發現

我們的產品越來越無法跟其他國家對打




每個國家都有中高技術產業

但其他國家的中高技術產業成本越來越低

導致我們中高階產業產品越來越難賣出去




其他國家的產品由於低稅金

所以可以不斷賺取外匯

然後再從中撥錢出來研發新產品

慢慢差距就越拉越大了




原本產品獲利可以達到40%以上

但產品獲利一年比一年少

從40%一路降到10%以下,最後變成毛三到四

公司獲利大減當然員工的薪資跟福利就會大減

連帶的國內經濟也受到影響(敢花錢的人越來越少)




中高階產業為了能提高競爭力

只好開始把公司重心移到新加坡&香港&大陸..等國家

並且把核心技術人員外派




而新加坡政府為了能留下這些產業

大開方便之門

導致台灣很多高技術以及高端人才的產業都紛紛外移到新加坡

這也讓新加坡經濟突飛猛進




原本台灣產業只有低階產業外移

現在連中高階產業也外移了




若是台灣還是民粹治國的話

那台灣到時就會淪落跟菲律賓一樣的下場




在以前菲律賓可是經濟強國

但由於政府腐敗貪污內鬥

於是變成落後國家










8KK





2016-09-07 10:43 #22






台灣並沒有輕財團

台灣比韓國好的是財團影響力沒有那麼大




但台灣對於財團的態度是能放水就放水




看看這幾年的食安新聞

試問那些大廠有被強力制裁嗎?




財團被罰款億元卻不繳

試問政府有強力追討嗎?







可以放水就放水

若使引起民怨的話就先口頭上逞罰

等風聲過後就當作沒這回事










dongmark





2016-09-07 11:02 #31






學習美國民主社會




會出現的問題




就是少數資本控制多數民眾




這就是逐利的狼群社會




600萬猶太人控制3億美國人




帶著美國金錢社會向前走




制度同樣的事情在台灣是一樣一樣的







另外一個美式民主




是大量消耗社會資源的制度




每次選舉的錢財




實質上很多是打水漂




有利有弊




看台灣經濟以後是否玩得起美式民主










abond yeh





2016-09-07 11:18 #36






好久沒看到01上面有這麼理性的討論串,感動!




小弟長期在現在正夯的東南亞國家工作




從早期當地廠家(華裔居多)清一色都是購買台灣的機器,一直到現在其他國家取代,除了價格成本因素外(就是上面討論到的貿易協定),還有情感及國家印象的因素。




1.雖然很多人不喜歡中國,但是大國崛起是趨勢,在東南亞哪一國不是仰仗他的鼻息?我國和對岸的貿易協定不只是兩國事務,也會影響其他國家的態度,而當然我國和其他國家簽貿易協定不需要對岸同意,但國際現實是把台灣視為對岸的附屬,故要跟其他國簽貿易協定,至少我國和對岸的要先搞定!當初貿協和表決過程被污名化為避免爭執,那就不說了。




2.記得之前有人要刪減僑委會預算,認為為何要拿錢去發展除了台僑以外的僑務?老一輩的海外華人一直認為中華民國才是正宗,就算他們從來不是中華民國國民,所以在情感上會喜歡跟台灣做生意、來台灣玩。而現在哪?僑務工作沒有經費、對岸大肆挖牆腳、年輕一輩華人沒有認同感,也連帶影響跟台灣的經濟往來。

像現在韓劇風行、日本外資企業為當地第一外資,當地年輕人選擇旅遊會去日本、韓國,還是台灣?




3.台灣人骨子裡還是歧視外人,對東南亞國家的印象還停留在二十年前,泰國滿街都是人妖?大家都騎大象當交通工具?當地手機很稀有?我們的島國性格太重,不國際化一點、視野不廣一點只會故步自封了~




4.南向政策喊得震天價響的,說穿了只是不要企業到對岸去,實際的作為呢?有提供跟台灣本土企業一樣的貸款利率給台商嗎?有集合政府的力量來爭取台商權益嗎?我只看到為了交差所簽無任何實際效力的備忘錄,以及『傾聽』台商聲音的不足一小時的座談會。




5.污名化的企業家~社會氛圍很奇怪,好像有錢該死、老闆都是無良的?這樣跟共產黨鬥垮有產階級有何兩樣?我們自傲的民主呢?自由的資本主義社會呢?




一不小心說了那麼多,哈哈哈,果然是老了










dongmark





2016-09-07 11:32 #39






全球各地分佈的華人接近8000萬人口




都是當地經濟的絕對有影響力的一支







過去之所以和台灣經貿聯繫緊密




完全是因為台灣還自居中國正統,在全球華人中擁有絕對的地位







現在台灣人以生為中國人為恥




思維不光在台灣島內混亂




還造成了台灣在全球各地華人社團影響力的直線下落










h348213





2016-09-07 11:32 #41






僅分享




jim567

加入好友 加入黑名單

2016-09-07 11:29

就小弟的觀察,從15年前看到現在...我一直都在關心台灣的發展。

小弟我76年生,從國一開始注意東協10國、金磚四國、大陸、韓國、新加坡的轉變




對我來說,一路上只看到失望再失望......

幾個原因分享一下,

1. 台灣產業轉型,過去60年代末前台灣培養了很想專業人出國深造,當然帶回台灣未來發展的基礎,在加上政府政策明確扶持有不錯的成績。

但是轉眼到近20年,沒有再看到有企業企圖轉行或新事業發展,中小企業開始守成然後沒落,大型企業由於發展新事業沒有在大膽、前瞻的執行導致產品優勢漸漸不在、也導致台灣經濟停滯!




2. 教育政策轉變,台灣過去由於陳前總統廣設大學為了成就一縣一大學,廢除專科制度,導致社會無法評鑑學生個別優勢,造成既不重專業、也不重視學歷的社會現況。產業與學界也嚴重脫節,除了醫科需要進行實習外其餘的學科都完全沒有跟業界連結,沒看過工廠、產業現況、最新技術、國際關係這些通通脫節。




3, 台灣社會人民還是太過短視,由於台灣沒有任何一家國際媒體在日間播放、唯一的英文新聞卻在晚上11點。反觀中國有將一線國際媒體翻譯成中文讓不懂英文的觀眾接受到第一線的資訊,日本、韓國全都有也同樣的做法。

台灣還搞不清楚世界在玩什麼把戲,我們還在關心哪位藝人暗戀、那位立委說了什麼話、哪個名嘴又告了誰這些無關台灣發展的新聞要點!




4. 語言能力停滯,外語推行已經30年以上,而台灣的英語能力卻停滯不前,外面企業卻把自己要求的標準降低造成自我良好的外語錯覺, 這進一步影響國人對外資訊吸收及能力成長的限制,因為大家沒得選,只看得懂中文,無法在進一步了解。




5, 政策轉向,政策不斷在內部打轉,連續三政黨轉移都沒有看到明確持續的國家目標,台灣已經害怕跨出去,未能在過去即時的開放大陸交流、也怕台灣企業流失,而設立許多保護條款。台灣大學生到現在還保有中國是落後國家,洗手間沒有門等等落後印象。




以上小弟的見解、不帶任何政治立場。










lonxyz168





2016-09-07 11:40 #45






呵呵,台灣會衰敗是重政治輕經濟的結果,老是扯甚麼國家認同最討人厭,笨蛋永遠只會被少數政客牽著鼻子走,有錢人為了避稅都可以改國籍當外國人了,只有笨蛋才會信那些每天高喊愛台灣的政客!




愛台灣先把台灣經濟弄好再說,看中外幾千年的歷史下來真正和平發展的時間合計都沒幾百年,以國家、宗教、種族、地域認同為訴求用來鬥爭從史至今沒斷過,殊不知這都是少數政客用來謀求自身利益最好的手段。




希望嘲笑22K的政黨執政了能把22K多提高幾K;希望反對服貿的執政黨能幫台灣多簽幾個協定回來;希望嘲笑633的至少要能做到543。










shizukaman





2016-09-07 11:47 #50






其實樓主的看法都只是結果?

一個國家的演變還是要看長期的,中間一個方向變了,就成了現在的結果

而一個國家不管政府企業都是人民自己組成的

大家都知道

怪政府,怪企業,怪媒體但是為什麼他們會變成這樣

就我個人覺得,真正的根源還是,

人民普遍的素質還沒到那個程度,

素質低落的人民,面對權力的使用越是荒腔走板

人民有了選票就覺得我最大,選上了鄉長立委就迷失濫權

當個公司小主管就不可一世,當了老闆唯利是圖

當了媒體就拿錢辦事,個人意識偏頗報導




就我來說就是,台灣的民主來的太快,人民還沒準備好而已

要推動一個國家這個巨輪,有這麼多聲音

你再怎麼努力,該扯後腿的還是會扯後腿

想想看今天有人拿著幾億元,請大把林志玲等級的美女誘惑,讓你幹危害國家的事,

首先失敗的機率低,即使失敗了你的付出代價也低

請問有這樣好康事情,你會去幹嘛!

「不會」坐在電腦前打著鍵盤的你,一定這樣說

但是,當美女捧著白花花的銀子跟你在HOTEL房間內,脫光了站在你面前

你還會這樣說嗎?




只有相對的集權你才有辦法把,一個國家導向正軌

當聯合國在批評,菲律賓總統杜特蒂上任掃毒造成幾千人的死亡

卻不願提菲律賓多年來,因毒品這個萬罪之源的危害,使得更多守法的人被搶或被殺,

如果一年的陣痛造成菲國毒品相關犯罪分子有一萬人的死亡

能換上今後幾十年,減少因毒品氾濫而解救10萬個平民百姓

是我的話,我也會毫不考慮的選擇後者,如果不集權能做得到嗎?




但是人的感受都只是現在進行式,

當你說機車退出騎樓,還是大學生的你很幹,因為你沒地方停了,反對政府這個決定

所以選舉你投了反對票,過了幾年你出社會了,當個上班族,或帶著妻兒

走在你曾經停機車的騎樓,你的感受呢,是不是會覺得能很舒適的走在空曠騎樓內心情舒暢嗎?

但是你會去反省當初你因為很幹而投給反對陣營的自己嗎?我想不會吧!




很多人在為台灣的民主感的自豪,

每個人都認為他所支持的才是對國家最好的

當所有的政府決策方針,都需要聽一個平民百姓意見時

基本上已經沒有專業了,會吵的小孩有糖吃,所以當你順應了10%的需求,可能會損害到20%的人的需求

而70%的人事不關己,他可以因為意識形態去支持10%的人

所以你就看到這個國家你要推動甚麼前進,卻怎麼努力確也完全動不了










h348213





2016-09-07 11:55 #54






南進政策只有曇花一現罷了...

1. 台灣對東南亞並不熟悉,語系也不熟悉,英文老實說少數人只能算堪用。

2. 我們對南進只去要人力、工廠而不是要他們的市場,這樣的做法不就跟10年前去大陸一樣嗎?

3. 大者恆大趨勢,中國、美國、日本還是是世界上三大經濟個體,歐盟這麼多國家,初創歐盟時台灣怎麼不進去呢?

4. 東協內還是已經是同等的泰國、印尼、越南、印度幾國國家、他們已具備語言、人文&經濟保護優勢,回頭看看台灣呢?






夏米克





2016-09-07 12:06 #65






原因很簡單




就是『中國崛起』就只有這個理由而已




不用怪罪到太陽花也不用牽扯到什麼關稅服貿,

年輕人沒國際觀你老人也沒有,不用五十步笑百步。

今天就算全部都通過,陸客照來,台灣依舊向下沉淪,

太陽花也是馬執政後期的事情了,那時股票還逆勢上漲,

顯示我國政府機關早就空轉許久了。




為什麼我會說『中國崛起』是主要理由呢?




就說香港吧,

年輕人不夠國際觀嗎?外語不好嗎?貿易協議也沒被檔阿!(好啦有擋高鐵)

但香港沉淪的速度可是台灣的好幾倍快。




中國崛起對於世界各國可能是掏金好地方,

但至少對於香港和台灣可不是如此。




為什麼?

因為政治關係,中國要邊緣化這兩個地方實在是易如反掌,

而且這還是行之有年了,我小時候因為台商家庭的關係,我在深圳長大,

那時候老師就說了,這裡之後會超越香港,而且是用肯定句現在也成真了,

各別提現在大陸沿海都市發展更早,早就都取代台灣了。




中國只要一個政策就可以把一個國家的產業打死,

官方隨便發布一個『禁韓令』『禁日令』,

加上比台灣嚴重幾百倍的民粹主義,你真以為有國家反抗的了?




在來說說台灣房價,不是也是因為中國崛起而帶動漲勢的?

當房價拖垮生育,生育拖垮教育,這本來就是惡性循環的過程,

跟大學數量沒有關係,大學招收不到學生自然倒閉或轉型,物競天擇,

要說大學美國更多,加社大全美5000多間,怎麼你們就不會嘲笑他們沒競爭力?




最後說結論:當中國崛起,台灣沉淪就是必經過程,抵抗不了的。

但有沒有機會谷底反彈?100%有!

至少各人蠻看好台灣被中國邊緣化這段時間,

台灣不管是企業或是觀光的整合與"再生"。非常令人期待。




因為必須老實說,台灣早就在過度依賴中國的情況下,

失去了太多競爭力,因為過度依賴中國而變的安逸,

這段時間是好是壞各有解讀,但各人認為這個方向是好的。




台灣人可以關注一下如果到時川普當選,國際情勢又會大洗牌了,

也許還會有可以見縫插針的商業契機。

























[轉]zfs那點事 細詳解說

https://linux.cn/article-7422-1.html

media server rtmp...

Live555
RED5
giss.tv
markup

http://headstats.com/compare/red5.org-vs-live555.com-vs-giss.tv-vs-markup.io

http://blog.udn.com/mhwu1/10559752

http://www.cuplayer.com/player/PlayerCode/Red5/

windows RDP 多人 rdpwrap

https://github.com/stascorp/rdpwrap



http://kuang1984tw.pixnet.net/blog/post/144954046-%E3%80%90%E9%81%A0%E7%AB%AF%E6%A1%8C%E9%9D%A2%E3%80%91windows-10-%E5%A4%9A%E4%BA%BA%E9%81%A0%E7%AB%AF%E6%A1%8C%E9%9D%A2%E9%80%A3%E7%B7%9A%E4%BF%AE%E6%94%B9-

zfs command 指令


1、查硬碟  (硬碟排線寫上編號 -- 疑問~可能要看bios吧)

lsblk
fdisk -l   //usb hdd  linux指令,freebsd沒有
ls -l /dev/disk/by-id/   //linux指令,freebsd沒有
df -k

format
devfsadm
iostat -En


2、建zpool

a. zpool create zpool名稱 磁碟

EX:zpool create storage01 /dev/sda1 /dev/sda2


b. zpool create zpool名稱 mirror/raidz 磁碟 磁碟   //建立 (mirror為一般raid 1,raidz其他raid格式)

EX:zpool create storage02 mirror /dev/sda1 /dev/sda2


c.指定掛載點?? (不指定,會在根目錄自建掛載目錄)



3、增加(新增)zpool容量

a. zpool add zpool名稱 磁碟      //增加(新增)容量(mirror)

EX:zpool add storage01 /dev/sda1


b. zpool add zpool名稱 mirror 磁碟 磁碟      //增加(新增)容量(mirror)

EX:zpool add storage01 mirror /dev/sda1 /dev/sda2


c. zpool add zpool名稱 spare 磁碟     //增加 後備(spare)hdd

EX:zpool add storage01 spare /dev/sda1



4、更換zpool設備 ??

a.zpool replace zpool 磁碟 [磁碟]



5、檢查zpool (完畢後看結果 zpool status -v zpool名稱)

a. zpool scrub zpool名稱

EX:zpool scrub storage01



6、刪除zpool

a. zpool destroy zpool名稱

EX:zpool destroy storage01



7、檢查zpool

a. zpool list    //zpool 快速使用情況

EX:zpool list


b. zpool status  [-x]

EX:zpool status [-x]


c. zpool status zpool名稱

EX:zpool status storage01


d.zpool status -v zpool名稱  (同c)

EX:zpool status -v storage01


e. zpool get all    //列出所有資訊

EX:zpool get all


zpool history -l //最出歷史記錄
zpool history -i //最出歷史記錄


=====zpool import/export //系統移機使用=====
過程中請用zfs list配合檢查

a. zpool export zpool名稱   //移除zpool

EX:zpool export storage01


b. zpool import //列出可以import zpool

c. zpool import
   -d 目錄
   -o 掛載


   -R  zpool名稱  //用root import

EX:zpool import -R /vm_win stroage01/vm_win


   -D  被刪zpool名稱 新還原後zpool名稱 //被刪掉(destory)

EX:zpool import -D    //列出被刪的zpool
EX:zpool import -D 被刪zpool名稱 新還原後zpool名稱  //指定新pool名稱


. zpool offline zpool名稱 磁碟   //暫某顆hdd暫時離線
. zpool online zpool名稱 磁碟    //暫某顆hdd暫時上線



=====zfs 指令操作 (zfs檔案系統操作和一般linux裡面的要分開)=====

zfs list     //zfs 列出所有檔案情況
zfs list -r  //zfs 列出所有檔案情況
zfs mount    //zfs 掛載磁區


1、zfs 建目錄

a. zfs create zpool名稱/目錄名稱   // 建目錄

EX:zpool create storage01/vm_win


b. zfs create -o reserv=配額(容量大小) zpool名稱/目錄名稱  //預留空間

EX:zfs create -o reserv=1G storage01/vm_win


c. zfs create -v(-V) 配額(容量大小) zpool名稱/目錄名稱   //建立volume (iscsi)

EX:zfs create -v(-V) 1G storage01/vm_win


d. zfs create -p  子目錄也順便建立


e. zfs 分享檔案系統建議屬性,在建立檔案系統時就一起設定,建立之後就無法修改

每個參數前面都須要加上-o

casesensitivity=mixed 混合式大小寫,配合windows的習慣
nbmand=on 配合檔案系統同時作NFS和CIFS分享,使用的interlock模式
utf8only=on 檔案名稱只接受utf8的unicode編碼,不使用ansi編碼。

EX:zfs -o casesensitivity=mixed -o nbmand=on -o utf8only=on storage01/vm_win



2、zfs 刪目錄

a. zfs destory zpool名稱/目錄名稱  //刪目錄

EX:zpool destory storage01/vm_win


b. zfs destory zpool名稱/目錄名稱  //刪除volume (iscsi)

EX:zfs destory storage01/vm_win



3、zfs 修改目錄名稱

a. zfs rename zpool名稱/舊目錄名稱 zpool名稱/新目錄名稱

EX:zfs rename storage01/vm_win storage01/vm_windows



=====zfs屬性=====

1、zfs 取得屬性(properties)

a. zfs get all zpool名稱

EX:zfs get all storage01
EX:zfs get all vm_win



2、zfs 變更掛載點 (mount 想成檔案目錄操作)

a. zfs set mountpoint=/目錄 zpool名稱/目錄名稱  //變更掛載點

EX:zfs set mountpoint=/images/vm/100 storage01/vm_win  //將/images/vm/100 掛上vm_win
EX:zfs set mountpoint=/storage02/vm_win_new storage01/vm_win  //vm_win_new 取代 vm_win



3、zfs 目錄壓縮

a. zfs set compression=on zpool名稱/目錄名稱

EX:zfs set compression=on storage01/vm_win

b. zfs set compression=lz4 ??


4、zfs 目錄取消壓縮

a. zfs inherit compression zpool名稱/目錄名稱

EX:zfs inherit compression storage01/vm_win



5、zfs 目錄設定配額(容量大小)

a. zfs set quota=配額(容量大小) zpool名稱/目錄名稱

EX:zfs set quota=1G storage01/vm_win



6、zfs 給NFS使用

a. zfs set sharenfs=on zpool名稱/目錄名稱

EX:zfs set sharenfs=on storage01/vm_win



7、zfs 給CIFS使用

a. zfs set sharesmb=name=CIFS分享名稱 zpool名稱/目錄名稱

EX:zfs set sharesmb=name=vm_win storage01/vm_win


b. zfs get sharesmb zpool名稱/目錄名稱

EX:zfs get sharesmb storage01/vm_win



8、ACL繼承設定 (aclinherit改成passthrough)  ??

a. zfs set aclinherit=passthrough zpool名稱

EX:zfs set aclinherit=passthrough storage01



=====zfs快照=====

1、zfs 建立快照

a. zfs snapshot zpool名稱/目錄名稱@snapshot名稱

EX:zfs snapshot storage01/vm_win/win10@20160828_win10


b. zfs snapshot -r zpool名稱@snapshot名稱   //zpool名稱底下所有的檔案系統都用相同的snapshot名稱

EX:zfs snapshot -r storage01


2、zfs 還原快照

a. zfs rollback -r zpool名稱/目錄名稱@snapshot名稱

EX:zfs rollback -r storage01/vm_win/win10@20160828_win10



3、zfs 複製快照

a. zfs clone 來源zpool名稱/目錄名稱@snapshot名稱 目地zpool名稱/目錄名稱

EX:zfs clone storage01/vm_win/win10@20160828_win10 storage02/vm_win/win10_test



4、zfs 移除快照

a. zfs destory 來源zpool名稱/目錄名稱@snapshot名稱

EX:zfs destory storage01/vm_win/win10@20160828_win10



5、zfs 列出快照

a. zfs list -t snapshot  //列出所有快照



6、zfs 快照避免被修改

a. zfs hold keep 來源zpool名稱/目錄名稱@snapshot名稱  //keep避免被修改

EX:zfs hold keep storage01/vm_win@20160828_win10



b. zfs holds 來源zpool名稱/目錄名稱@snapshot名稱   //holds檢查

EX:zfs holds storage01/vm_win@20160828_win10



======參考======
http://blog.virtual-on.org/2011/06/zfs-nas-nexentacore1.html
http://gallery.tses.tc.edu.tw/nuke/sections.php?op=viewarticle&artid=600
http://mail.ycsh.tp.edu.tw/~tory/ezblog/index.php?entry=entry100521-020651
http://blog.virtual-on.org/2011/06/zfs-nas-nexentacore1.html
https://blogs.oracle.com/forrest/entry/zfs%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F_4_zpool_inport_export
http://leoprosoho.pixnet.net/blog/post/32323214-zfs%E5%9F%BA%E7%A4%8E%E7%AE%A1%E7%90%86

kvm win vm

http://itheiso.blogspot.tw/2013/01/kvmubuntu-1204-lts.html


Windows虛擬機器效能調整
如果想讓Windows虛擬機器在KVM中有比較好的效能,可以安裝virtio驅動程式來提昇虛擬機器中的硬碟及網路卡速度。請先到 http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/ 下載最新版本的virtio(本範例版本為virtio-win-0.1-30.iso),接著先將Windows的虛擬機器關機,並從虛擬機器管理員編輯虛擬機器細節,將下載的virtio-win-0.1-30.iso掛載到IDE CDROM 1(先將原先Windows7的安裝光碟斷線再連線,並指定virtio-win-0.1-30.iso檔的位置),接著再加入硬體,新增一個Storage儲存裝置,並指定裝置類型為Virtio disk,然後將網路界面(NIC)的裝置類型也改為virtio,最後就可以將Windows虛擬機器再度開啟。

Virtio disk

Windows虛擬機器再度開啟之後,裝置管理員中會產生二個有驚嘆號的裝置,分別是Ethernet控制卡和SCSI控制卡,只要更新此二個裝置的驅動程式,並將驅動程式的位置指向剛剛掛載virtio的光碟機就可以正確安裝。



安裝完畢請再度將Windows虛擬機器關機,並再次從虛擬機器管理員編輯虛擬機器細節,移除剛剛新增的0.1G虛擬硬碟(請勿刪錯磁碟),再將原先安裝Windows系統的IDE Disk 1之虛擬磁碟型態改為Virtio,然後再重新開啟Windows虛擬機器。如此就可以提昇Windows的效能。

IDE to Virtio

proxmox mount extend usb hdd

1、
apt-get update
apt-get install ntfs-3g

2、fdisk -l 看有沒有找到usb hdd

blkid   use uuid  



3、根目錄底下有mnt
mount -t ntfs /dev/sdxxxx /mnt

該死的proxmox usb install….....


When you get error like this


Loading, please wait...
Volume group "pve" not found
Cannot process volume group pve
Unable to find LVM volume pve/root

like this picture




just reboot then
choese  menu

Advanced options for Proxmox Virutal Enviroment



then press e


then add rootdelay=2  after pve-root ro quiet

before

after


then ctrl+x   now can boot success!

!!! remeber change /boot/grub/grub.cfg      

https://forum.proxmox.com/threads/solved-proxmox-4-pve-not-found-after-first-start.24702/

[轉]ZFS特性

http://blog.virtual-on.org/2011/10/zfs3-zfs.html

[轉]Windows 10 guest best practices

https://pve.proxmox.com/wiki/Windows_10_guest_best_practices

[轉]Proxmox VE Physical disk to kvm 實體硬碟給kvm用

http://blogs.yyes.chc.edu.tw/post/2/75


1、ls -l /dev/disk/by-id/  找出硬碟

2、修改vm設定檔
nano /etc/pve/qemu-server/xxxxx(vmid).conf

Example:
virtio0: /dev/disk/by-id/ata-ST2000DL003-9VT166_5YD1ZYK5,size=2000G


===============

https://forum.proxmox.com/threads/proxmox-and-hdd-passthrough.17856/

[轉]proxmox 增加其他硬碟

http://blog.pulipuli.info/2014/10/proxmox-ve-add-another-hard-disk-in.html

1、找硬碟
ls /dev/sd*   (sata is sd,  ide is hd)


2、碟磁分割
fdisk /dev/sd*
a. n (new)
b.p (primary)
c. enter
d. enter
e. enter
f. w (寫入)

c d e 操作是使用整個硬碟空間


3、格式化
mkfs -t ext3 /dev/sd*


4、掛截磁碟
a.建目錄  mkdir aaa
b.寫 /etc/fstab
/dev/sd* /aaa ext3 defaults 1 2

重開,用df查

5、用proxmox掛上去
記得 content 要全選




[轉]Shrink Qcow2 Disk Files

https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files

proxmox use vmdk

http://blog.pulipuli.info/2015/06/proxmox-vevmdk-use-vmdk-format-as.html


這是因為在KVM虛擬技術中,預設快取寫入硬碟的方式為「Default (No cache)」,但是vmdk必須使用「Write Through」設定,因此只要調整硬碟快取寫入方式就可以解決這個問題。



其實上面的Bus/Device改成VIRTIO的話,一般來說效能會更好,因為這是虛擬裝置原生的通道,而非模擬出來的IDE或SATA。

vdmk 減肥 縮小 shrink windows

結論:第二步的vmkfstools -k 或是 -i 都沒用!!

最快的方式用vSphere Client 匯出 ovf範本 就自動瘦身了!!!………


=========Windows=========
In windows VM

1、sdelete
https://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

sdelete -z -c c: (有幾個權,要都做)


2、登入esxi

cd /vmfs/volumes/

vmkfstools -K [disk].vmdk    //不見得有用  maybe no use

vmkfstools -i [來源].vmdk -d thin [新目的].vmdk



=========Linux=========
In Linux VM

1、
dd if=/dev/zero of=/[PATH]/zeroes bs=4096 && rm -f /[PATH]/zeroes


2、登入esxi

cd /vmfs/volumes/

vmkfstools -K [disk].vmdk    //不見得有用  maybe no use

vmkfstools -i [來源].vmdk -d thin [新目的].vmdk

=============================================
http://techblogsearch.com/a/vmware-virtual-disk-shrink-jiang-vmdkdang-an-suo-xiao.html

http://blog.xuite.net/tolarku/blog/331992410-%E7%B8%AE%E5%B0%8F+VMDK+%E8%99%9B%E4%BD%94%E7%94%A8%E7%9A%84%E7%A9%BA%E9%96%93+-+shrink+a+thin+provisioned+disk

http://www.virten.net/2014/11/howto-shrink-a-thin-provisioned-virtual-disk-vmdk/

[轉]Migrate vmware vm to proxmox

https://noteits.net/2015/07/21/migrate-vmware-vm-to-proxmox/



http://blogs.yyes.chc.edu.tw/post/2/78

proxmox freenas all in one

http://www.servethehome.com/the-proxmox-ve-kvm-based-all-in-one-freenas/


各種效能比較
https://b3n.org/vmware-vs-bhyve-performance-comparison/



參考
http://churnd.net/2014/06/29/smartos-homelab-hypervisor-v3/

[轉]2 wan mapping to 1 lan multiple wan mapped to a single internal server

http://www.minitw.com/archives/routeros/routeros-2-wan-mapping-to-1-lan-multiple-wan-mapped-to-a-single-internal-server.htm

mysql 備份

http://codego.net/10343891/



1.逻辑备份(mysqldump的,由脚本)锁定数据库。这将破坏客户端端端操作。 我的方法备份关键任务数据库InnoDB的OpenSolaris上,并采取DATADIR和日志目录的日常ZFS快照。 这些快照,然后复制到离线服务器。 因为InnoDB的是事务性和快照是atomicity,也没有必要关闭在创建快照之前的服务器(回收来自它就像复苏的表单突然停电:InnoDB支持它)。

[轉]mysql 備份還原

https://read01.com/PxLz.html

[轉]直播 深入討論

https://www.zhihu.com/question/42162310



supermicro FreeNAS

Supermicro X10SLM-F
Intel Xeon E3-1231 V3、3.4GHz、10M Cache、4C/8T
8GB DDR3 ECC UnBuffer
Supermicro SC836BE16-R920B 3U 機架式 機箱 (3U 專用滑
Supermicro 920W ( 1 + 1 ) Redundant 高效能 AC-DC power supply w/ PFC
AOC-S2308L-L8e Toshiba SAS 4TB

supermicro 支援普通ddr4 關鍵字 non-ecc

copy file from freenas usb || Connect USB External Drive to FreeNAS

dmesg   check usb drive

1、mkdir /mnt/usb1234
//not sure 2、kldload fuse
3、ntfs-3g /dev/da1s1 /mnt/usb1234

umount -f /var/usb


https://forums.freenas.org/index.php?threads/connect-usb-external-drive-to-freenas.15150/

Acronis 備份/還原

http://kuang1984tw.pixnet.net/blog/post/172651324-%E3%80%90%E5%82%99%E4%BB%BD%E8%BB%9F%E9%AB%94%E3%80%91acronis-backup-11.5-build-43994---%E7%95%B0%E6%A9%9F


1、支援 UEFI/GPT 轉換 BIOS/MBR
2、異機還原最關鍵 – Universal Restore 驅動程式重抓
3、變更 SID


3跟2 在還原時會有選項
2產生的錯誤,直接略過
1也是還原時,要注意看的,會有提示

windows 快速一般化

https://dotblogs.com.tw/jamesfu/archive/2014/05/17/sysprep.aspx


公司所製作的工具 「SIDCHG 2.0」,這是一個非常小巧的工具程式,一次就可以解決更換電腦名稱和 SID 的兩個步驟,而且還會保留既有使用者的環境設定,使用起來實在是非常的方便,只要在 DOS 環境下值星傳入參數就完成了。



在我的範例中,我希望更改的時候連同電腦名稱更改為 VM1,因此使用「/COMPNAME」的參數,後面加入電腦名稱;參數「/R」是指設定完成後自動重新啟動;參數「/F」是忽略確認的訊息。而由於我目前範例中所使用的是測試版本,因此他會詢問我一個測試序號,此序號每個月會更新,必須前往官網上查看,這樣不到兩分鐘的時候,你就可以有一個仿造之前的 VM ,不但保留所有的設定,也幫你更新電腦名稱和 SID,算是非常的方便。


SIDCHG 2.0ghttp://www.stratesave.com/html/downloadsfl.html

蟑螂



http://www.mobile01.com/topicdetail.php?f=729&t=4893063&p=4







蟑螂我研究很久了, 因為住獨門獨院, 每到夏天都被蟑螂煩到不行. 我試過各種不同方法, 後來發現最有效的, 就是漂白水+香茅油+九層塔.

1. 在門口或窗口擺一盆活的九層塔盆栽.

2. 在廁所, 角落及門口擺香茅油, 放在精油罐裡讓味道釋放.

3. 每兩天在馬桶, 門口水溝及排水管倒漂白水.

4. 不會開的氣窗用矽利康封住窗縫.




我家以前每天廁所都會躲四五隻大蟑螂, 打掃再乾淨也沒用, 前撲後繼從外面湧入. 自從做了上述四點已經很久沒看到了. 一隻小的都沒有.

freenas dataset zvol

Volume = zvol

===========================
http://www.getnas.com/2015/01/386.html

FreeNAS 9.3 创建卷时会同时创建一个与卷同名的数据集,目前测试来看,在 WebGUI 界面中无法删除该数据集,因此我们只能在此数据集上面创建新的数据集。



数据集支持嵌套,即可以在某个数据集中再次创建数据集,没有数量限制,可以根据需要自由创建。也可以在数据集中创建 Zvol 虚拟硬盘,用于 iSCSI 块级共享


[轉]企業固定制 vs 固定制 比較



http://www.mobile01.com/topicdetail.php?f=507&t=4891902




結論 ping值差不多


企業固定制IP價格

10M/10M 16固定IP 6453元

20M/20M 16固定IP 9959元

30M/30M 16固定IP 11599元




固定制IP價格

100M/100M 6固定IP 2474元





Link Aggregation NIC 802.3ad switch 802.11ad

switch 交換器 重要參數

重要
WIRESPEED  WIRE-SPEED

NonBlocking  Non-Blocking

wirespeed的packet lost


  • 符不符合

1個 Gigabit port Wire Speed 每秒傳輸封包(64bit) = 1Gbit/672 = 1,488,095.2pps = 1,488.095kpps = 1.488095Mpps

簡稱 1.488算法


24 port giga switch 

1、架構(architecture):要有 24 *(1G出+1G入 理論) = 48G   (switching fabric   ,不是switching capacity)

2、效能(wire-speed):要有 24 * 1.488M = 35.712M/s    (Stack-forwarding rate for 64-byte )packets





.Backplane bandwidth 是switch的背板頻寬
所有由port傳來的packet交換的地方,通常是一台switch的可交換能力

.Backbone bandwidth  是網路的骨幹傳輸最大的流量容納分支點匯入或分支的

.Fabric switch bandwidth

.througput



http://www.vlab.com.tw/index.php/forum/network-internetwork-design/62-non-blocking-wire-speed

ubuntu lvm 新增硬碟

http://blog.xuite.net/m740138.m740138/blog/31793294-LVM%E5%AF%A6%E6%88%B0

要注意的地方是 硬碟分割完之後,partion id要設8e (linux lvm)



https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/


======

說明

第一部份: 實體磁區先切

第二部份:加到LVM

第三部份:更新系統


第一部份: 兩種方式  A. fdisk  B.gparted (圖形)

基本上建議用B.  去下載 http://gparted.org/  iso,掛到虛擬機上

vmware F2 進bios 改光碟開機,然後用圖形化介面,把磁碟擴展。


如果用A. 方法是 把多的空間建立partition,問題在於partition會越建越多,比較不推


通用部份:
fdisk -l  請記得 要看兩個地方: DISK  /dev/sda   xxxxxG
DISK /dev/mapper/xxxxxxxx   xxxxxG

兩個部份是目前硬碟空間使用情況



第二部份:
先用pvscan  看有沒有free空間

再來加到LVM,

lvextend -L +xxxxG     /dev/ubuntu-vg/root   //注意,這裡請用lvdisplay



第三部份:

resize2fs /dev/ubuntu-vg/root




windows iso download

http://windowsiso.net/

unreal media server obs

https://obsproject.com/forum/threads/to-set-up-a-private-stream-server-with-ums.5401/


1、obs: customer steam  rtmp://xxx.xxx.xxx.xxx:5130/live/name
5130 is Unreal media server live port

2、Unreal media server: New Live Broadcast ->  Rebroadcast live RTMP / RTSP / MEGG-TS / MMS Stream ->

Live broadcast Alias :  name
chosese   PUSH   rtmp://     no auth for test

 then

use unreal streamplayer   or vlc


vlc
rtmp://xxx.xxx.xxx.xxx:5119/live/name
5119 is Unreal media server players port

Visual Studio Code

https://code.visualstudio.com/

CTJS2016 新手上路之 40 分鐘學會 Angular 2 網站開發框架 '



https://www.youtube.com/watch?v=IQYYHLtpiAQ


http://www.slideshare.net/WillHuangTW/ctjs-javascript-conference-happy-coding-with-angular-2

https://github.com/doggy8088/ctjs2016-ng2demo


非常建議值得一看,非常容易了解,非常清楚

chromebook how to backup firmware || restore

1、https://johnlewis.ie/Chromebook-ROMs/utils/flashrom
sudo flashrom –r


2、https://johnlewis.ie/flash_chromebook_rom.sh
option 4


3、
https://raw.githubusercontent.com/MattDevo/scripts/master/firmware.sh

This shell have backup option.

Then

http://mrchromebox.tech/firmware-util.sh   call   firemware.sh

So try fireware.sh


===== flashrom =====

https://johnlewis.ie/Chromebook-ROMs/utils/flashrom


chmod +x flashrom
sudo ./flashrom -w xxxxxbios.bin


==== restore =====
https://docs.google.com/document/d/1Q_5_rTv2CEMgXiAm86IXGOVGBtb8JWXj-zcCPzAEEkQ/edit

cordova framework7 base

index.html


  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>APP</title>
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/framework7.ios.min.css">
    <link rel="stylesheet" href="css/framework7.ios.colors.min.css">
    <link rel="stylesheet" href="css/my-app.css">
  </head>




    <script src="cordova.js"></script>
    <script src="js/index.js"></script>
    <script src="js/framework7.min.js"></script>
    <script src="js/my-app.js"></script>



==========
index.js for cordova

my-app.js for framework7

Crodova build release apk windows

c:\cordova_project
c:\cordova_project\project_name
c:\cordova_project\Crodova build release apk1.bat
c:\cordova_project\Crodova build release apk2.bat
c:\cordova_project\Crodova build release apk3.bat
c:\cordova_project\zipalign.exe


.Crodova build release apk1.bat

cd project_name
cordova build --release android



.Crodova build release apk2.bat

ECHO off
set /p storepass=input storepass  :
set /p keypass=input keypass  :

cd project_name
set PATH=%PATH%;C:\"Program Files"\Java\jdk1.8.0_74\bin\
jarsigner -verbose -keystore ../keystore/eexcel.keystore -storepass %storepass% -keypass %keypass% platforms/android/build/outputs/apk/android-release-unsigned.apk alias_name



.Crodova build release apk3.bat

cd project_name
del /f /q platforms/android/build/outputs/apk/project_name.apk

%cd%\..\zipalign -f -v 4  platforms\android\build\outputs\apk\android-release-unsigned.apk platforms\android\build\outputs\apk\project_name.apk


PS:zipalign download from internet
http://forum.xda-developers.com/showthread.php?t=2214583
http://forum.xda-developers.com/attachment.php?attachmentid=1848618&d=1364750980

Cordova android framework7 回上一頁

https://muut.com/framework7-cn#!/?%E8%BF%94%E5%9B%9E%E4%B8%8A%E4%B8%80%E9%A1%B5


onDeviceReady: function() {
         document.addEventListener("backbutton", function(e) {
              var currentView = myApp.getCurrentView();
              if(currentView.history.length>1) {
                     currentView.router.back({});//返回上一级
              }else{
                      navigator.app.exitApp();//首页点返回键退出
              }
        }, false);
       
        app.receivedEvent('deviceready');
}

Cordova android AdMob framework7

cordova create  oooxxxx

see js/index.js

onDeviceReady: function() {
  app.receivedEvent('deviceready');
}


Now put AdMob Code

onDeviceReady: function() {
       
        // place our admob ad unit id here
        var admobid = {};
 
        if( /(android)/i.test(navigator.userAgent) ) {
          admobid = { // for Android
            banner: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo',
            interstitial: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo'
          };
        } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
          admobid = { // for iOS
            banner: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo',
            interstitial: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo'
          };
        } else {
          admobid = { // for Windows Phone
            banner: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo',
            interstitial: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo'
          };
        }
       
        if (! AdMob ) { alert( 'admob plugin not ready' ); return; }
       
        // this will create a banner on startup
        AdMob.createBanner( {
          adId: admobid.banner,
          adSize: 'SMART_BANNER',
          position: AdMob.AD_POSITION.BOTTOM_CENTER,
          isTesting: true, // TODO: remove this line when release
          overlap: false,
          offsetTopBar: false,
          bgColor: 'black'
        } );
       
         this will load a full screen ad on startup
        AdMob.prepareInterstitial({
          adId: admobid.interstitial,
          isTesting: true, // TODO: remove this line when release
          autoShow: true
        });
     
        app.receivedEvent('deviceready');
}


PS:If see example https://github.com/floatinghotpot/cordova-admob-pro/blob/master/test/index.html
Maybe this need to change
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *">


reference
https://www.npmjs.com/package/cordova-plugin-admobpro
https://github.com/floatinghotpot/cordova-admob-pro/blob/master/test/index.html
https://github.com/floatinghotpot/cordova-admob-pro/blob/master/test/admob_simple.js

FileOptimizer

http://nikkhokkho.sourceforge.net/static.php?page=FileOptimizer

google AdMob 最新版有很多問題

https://github.com/googleads/googleads-mobile-android-examples    See Issues

最新版 9.0.2 or 9.0.0   (com.google.firebase:firebase-ads:9.0.2)

Log查 w/Ads

W/Ads: Failed to connect to remote ad request service.
W/Ads: Could not start the ad request service.
W/Ads: Failed to load ad: 0


整個無言! ..............最簡單的範例也出錯!!

c# not vb.net PrintPreviewDialog PrintDialog 在PreviewDialog中按列印鈕,直接呼叫PrintDialog

http://www.blueshop.com.tw/board/FUM20050124191756KKC/BRD200707131926393KJ.html
http://homepage1.nifty.com/yamato/texts/memorandum/memo5_1.html



Globa
private ToolStripButton tbs = new ToolStripButton();


private void preview_Click(object sender, EventArgs e)  //normal buttion click
{
  tbs.Text = "Print";
  tbs.Click += new EventHandler(tbs_Click);

  PrintPreviewDialog print_preview = new PrintPreviewDialog();
  ((ToolStripButton)((ToolStrip)print_preview.Controls[1]).Items[0]).Visible = false;
  ((ToolStrip)print_preview.Controls[1]).Items.Insert(0, tbs);

  print_preview.Document = printDocument1;  //PrintPreviewDialog
  print_preview.ShowDialog();
}

private void tbs_Click(object sender, EventArgs e) {
  MessageBox.Show("dd");  //now here can put PrintDialog code

  var print_dialog = new PrintDialog();
  print_dialog.Document = printDocument1;

  if (print_dialog.ShowDialog() == DialogResult.OK)
  {
      printDocument1.Print();
  }
}






c#打印

http://www.cnblogs.com/scottckt/archive/2008/01/31/1059576.html

http://kenyanzi.blogspot.tw/2011/05/c.html

http://fanli7.net/a/bianchengyuyan/_NET/20130427/347677.html

http://stackoverflow.com/questions/25069994/use-printdocument-to-print-each-row-in-datatable-to-seperate-page

ssl vpn server vmware Openwr OpenConnect

http://www.hooklearn.top/2016/04/27/openwrt%E6%90%AD%E5%BB%BAopenconnect-vpn/

核心問題 cost down 分享

個人覺得這篇沒有說到真正的核心問題,看到的cost down只是大家本來就會做,商人天生就會做的事。

真正的問題是:分享,另一說法就是做免錢的,台灣老闆完完全全不了解這個,只有看到有收益才會投入,這才是真正最大的殺手!

為什麼會這樣說?

github上面一堆大型的Open Source專案,真正核心都是有一群熱心的、沒有收益的人在處理,然後加上一大堆志工來做文件、教學、推廣,最後大家有付出,才會共同理念,才會去支持,最後成就這套Open Source。
社群經營不外如是,有人花大量的時間及成本來維護社群,回覆新進人員問題,不耐煩的一再教育,最後加入的人產生共鳴,成為死忠粉絲。

上述跟cost down一點關係都沒有,跟分享(免錢)絕對關係。


商人天生是不會分享的,更正確的來說,是沒有利益是不分享,我想大家都認同,那問題來了,那為什麼外國商人會搞這種分享,投入大筆的資金做免費的事,google是最明顯的例子,為什麼?

因為看利益的角度是完全的不同,自己的親身實例,之前待過公司有提過做beacon,這是要投入人力、時間、成本,結果只起了個頭,剩下就希望員工自己利用時間處理完畢。再以目前手機APP程式需學習android,要員工自己進修,而不願意提供時間及成本給員工。

更重要的開放專案、社群,肯定第一論調,開放專案會讓公司的核心價值沒了,別人都能模枋,不可能!社群經營要有人力維護,花成本在這上面,沒有收益,那不投入,不然隨便找一個公司完全不懂社群的人,請他每天post一些莫名其妙的文章,公司嘴上上心,實際隨便找個員工,員工也是兼職隨便弄。

方向錯,步步錯,最後像管理學的例子,書店進二本書,一個月後賣掉,發現只賣二本書,得到這本書賣不好的結論,是一模一樣的道理。


沒有開放的Open Source、硬體,是沒有人會投入,自己先提供免費,才能讓別人一起投入免費行例,但這些對台灣的老闆太難了。


==========
https://www.twreporter.org/a/g0v-civic-tech-community

pushover

https://pushover.net/faq#overview-fees


$4.99 USD once, per-platform (iOS, Android, Desktop)

send Pushover notifications may send 7,500 messages per month for free

10,000 for $50.00 USD, 25,000 for $115.00 USD, 50,000 for $200.00 USD

M$ workflow foundation

https://dotblogs.com.tw/sophieq/archive/2012/07/04/73210.aspx



文件核准程序
公司購買程序
招聘程序
Visual 工作流程追蹤
暫停的執行個體管理

訂購狀態機器範例
Outlook 工作流程精靈範例
語音應用程式範例
終止追蹤服務範例
追蹤設定檔設計工具範例
工作流程監視器範例
工作流程反映公用程式範例

----------
.net 3.5
http://msdn.microsoft.com/zh-tw/library/ms741723(v=vs.90)

.net 4.0
http://msdn.microsoft.com/zh-tw/library/dd483375.aspx
WF4.5
http://msdn.microsoft.com/zh-tw/magazine/hh781025.aspx
http://msdn.microsoft.com/zh-tw/library/gg427656


C# print preview multiple pages

http://www.codeproject.com/Tips/733680/Printing-and-Previewing-multiple-pages-in-Csharp

信用卡 收款手續費

豐掌櫃

收款: 手續費率 2.2%  
提領:

提領帳號為「永豐帳戶」者:免費
提領帳號為「他行帳戶」者:25

系統服務費 (月費):
當月累積代收金額超過5 萬元者,每月380

==============================

Paypal

收款:  手續費 2.4% ~ 3.9% ~5.4%
提領:

台灣當地銀行的美金帳戶 2.5%
台幣 免費


==============================

歐付寶 Allpay

收款: 手續費 2.75%  行動支付2%
提領: 無

==============================

PayNow

收款:  手續費 2.5% ~ 3.5%
提領:

每次撥款帳務處理費新台幣30元由賣家支付


==============================

第e支付

收款:  手續費 2% ~ 2.5%
提領:

進階會員、進階商務會員每次提領收費新台幣30


==============================

Go2Pay

收款:  手續費 2.8%
提領:

一次15元 (其他條件超多...)


==============================

Pay2Go

收款:  手續費 2.8%
提領:

提領手續費 10元 (每個月可享有四次手續費免收優惠)


freenas cifs slow

https://forums.freenas.org/index.php?threads/slow-transfer-speeds-via-cifs.39867/

https://forums.freenas.org/index.php?threads/cifs-directory-browsing-slow-try-this.27751/

---CIFS--Advance mode----Auxiliary Parameters:-------------
store dos attributes = no
map system = no
-----------------------------------------------------------------------
Jumbo Frame enable
-----------------------------------------------------------------------
In BSD the CFIS implementation is only single threaded
-----------------------------------------------------------------------
Omni-OS + Napp-it for great iSCSI and CIFS performance
A multithreaded kernel based alternative to SAMBA is Solaris CIFS in Oracle Solaris, OmniOS or NexentaStor
OmniOS is currently SMB1
Nexenta and Solaris 11.3 is SMB 2.1.
Most feature rich is Solaris 11.3 as it includes real ZFS encryption, SMB 2.1, LZ4 compress and fast sequential resilvering
-----------------------------------------------------------------------

store dos attributes = no
ea support = no
map archive = no
map hidden = no
map system = no
map readonly = no

2. (and 3.) was probably related to the old switch, which is now replaced. Even home PCs had short interruptions, which should be now gone (it seems so).
4. I deleted this share (wasn't necessary anymore), but didn't reset the permissions yet.
1. and 5. done.

Now I get speeds around 110-115MB/s.
But with another PC it is around 75MB/s writing to NAS and 95MB/s reading from NAS.


=====
ea support = no
store dos attributes = no
map archive = no
map hidden = no
map readonly = no
map system = no


1. Disables Samba from using EAs.
2. Tells Samba not to store the DOS attributes (any existing bits that are set are simply abandoned in place in the EAs).
3. Forces all 4 parameters to off/no/unchecked/disabled.

Note: The read-only bit I am mentioning, disabling, then forcing to off is not the standard read-only permissions users may be given to files or folders.

[轉] solved use root Login CIFS(access is denied)

https://forums.freenas.org/index.php?threads/use-root-login-cifs-access-is-denied.21233/



I fixed the issue by changing root's password via the WebGUI. To do this:
1. Go to the "Accounts" page
2. Click on the "Users" tab
3. Locate and select the user "root"
4. Click on the "Modify" button located at the bottom of the page and a dialogue window will open
5. Enter a password, twice, and click on the Save? button located at the bottom of the dialogue window

xampp upgrade php for linux

1、backup

/opt/lamp/etc/extra/httpd-xampp.conf

or
/opt/lamp/etc/extra/   any conf  be edited


/opt/lamp/etc/php.ini
/opt/lamp/etc/httpd.conf

any conf、ini  or your edit file backup .

2、download xampp newst install sh    then install again

3、Don't copy backup file overwrite old ini conf file

use note++ to compare different, then change or no change.


4、finish try to ./lamp restart

====================================

Maybe other way

You can see  /opt/lampp/properties.ini

maybe use apt-get install php or mysql, then change this path, then restart......I Not Sure can or not.

ConfuserEx 保護 C# windows form

https://yck1509.github.io/ConfuserEx/

http://confuser.codeplex.com/


=====
http://www.cnblogs.com/zhangzhi19861216/p/3937434.html

Visual Studio 2015 net 4.6.1 四捨六入五成雙 錯誤

最近再試,發現 Math.round() 又正確了....奇了! 116.55出來是116

==========
一般的說法是Math.round()

但實際上跑

decimal num = 116.55
Math.round(num)

結果是 117  這是錯的!!


所以

參考這個
https://windperson.wordpress.com/2013/02/21/c-%E5%B0%87%E5%B0%8F%E6%95%B8%E9%BB%9E%E5%BE%8C%E6%8C%87%E5%AE%9A%E4%BD%8D%E6%95%B8%E7%9A%84%E6%95%B8%E5%80%BC%E5%8E%BB%E6%8E%89%E7%9A%84%E6%96%B9%E6%B3%95/


改成

decimal GetFrag1(decimal input,int digit) //這個四捨六入五成雙才正確
{
            if (digit < 0) { return Math.Floor(input); }
            double pow = Math.Pow(10, digit);
            decimal sign = input >= 0 ? 1 : -1;
            return sign * Math.Floor(sign * input * (decimal)pow) / (decimal)pow;
}


GetFrag1(num, 0).ToString()

結果 116



[轉]vm安全性

http://www.mobile01.com/topicdetail.php?f=494&t=4790863

EluSiOn
請看 https://www.openssl.org/news/secadv/20160503.txt Severity: High. 2016/05/03 嚴重的 bug. 但是到了今天我伺服器上所有的 patch 都已經更新完畢了. 但是 Q & S 的 nas 的 patch 連影子都沒有.

所有的 debian/ubuntu/centos/freebsd 基本上都會在 5個工作天內完成 patch 提供更新, 但是不管是 Q牌或是S牌的更新是絕對超過 30天以上的.

再來就是 VM 有自己獨立的 file system. 其 file system 損會是不會傷害到 host 的資料. 但是 LXC/Docker 是允許跟 NAS host 共用資料夾, 這個時候, 就有機會讓針對於 host 共享的資料夾的資料造成毀損.



防火牆是使用 PFSense, 你的安全係數可以拉很高! 不管是 Deep packet inspection (DPI), Intrusion Detection System IDS 以及 Intrusion Prevention System 都有. 但是就要看你防火牆的 cpu 是否夠力了


pfsense 主體是 iptable, 但是搭配了其它的 package 後 (直接從 pfsense 裡面選擇安裝), 它就變成非常的強大. 安全防護的 package 如下

1. pfBlockerNG
2. snort IDS/IPS
3. Squid Proxy 可以搭配 clamav 掃毒任何所有的 http request.

但是上述這些服務都非常吃 cpu. 一定要時候夠有力的喲. intel atom 2558 等級以上的才可能考慮全開.

j1900 n3150 n3700 這些都不夠力

android crosswalk goback



MainActivity.java

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
  if(event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() != KeyEvent.ACTION_UP) { //按下有用,key up 無用
    if (mXWalkView != null && mXWalkView.getNavigationHistory().canGoBack()) {
      mXWalkView.getNavigationHistory().navigate(XWalkNavigationHistory.Direction.BACKWARD,     1);
      return true;
    }
  }

  return false;
}

[轉]为什么放弃WebView crosswalk

http://www.cnblogs.com/ct2011/p/4100132.html

android remove title bar



<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>