Server 上如何產生一個大的測試檔?

突然需要在 Solaris 跟 Linux OS 間測試 FTP 的速度,
所以需要產生一個大的檔案來測試 FTP,於是就把這個 command 翻出來用囉...

Case1. 如何在 Linux OS 上產生一個空的大檔案:

To create a file of a specified size, like the Solaris mkfile command...
# dd if=/dev/zero of=/tmp/bigfile bs=1M count=2048

以上這個動作將會產生一個 (2048 * 1MB) blocks or (2GB) 的檔案 /tmp/bigfile .

Case2. 如何在 Solaris OS 上產生一個空的大檔案:

# mkfile 10m filename
則檔案大小為 10m = 10 MG byte 大小
# mkfile 10g filename
則檔案大小為 10g = 10 GB byte 大小 (詳全文...)

[Solaris] Cluster NTP 的設定

幫其他國家的 Site 檢查設定時發現居然 server 間時差很嚴重,所以只好先幫他們解決 NTP 不 sync. 的問題。
1. 先從 /etc/inet/ntp.server copy 到 /etc/inet/ntp.conf.cluster 來用,分別在
myklmitv01, myklmitv02都做一樣的動作,把檔案中前面哪一堆有 # 的部分都先殺掉 (佔空間,看著很礙眼).
2. 再編輯一下 by "vi /etc/inet/ntp.conf.cluster".
>> 直接貼下面的設定進去 /etc/inet/ntp.conf.cluster (其中 10.1.110.11 是 NTP server 的 IP address)
server 10.1.110.11
peer clusternode1-priv prefer
peer clusternode2-priv
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

3. 兩台都改好之後,重起一下 NTP service by "/etc/init.d/xntp.cluster stop; /etc/init.d/xntp.cluster start;"
4. 然後稍待一下檢查 NTP process 及 sync. status by "ps -ef | grep ntp" and "ntpq -p".
5. 附上執行完的結果:

myklmitv01 root#ps -ef | grep ntp
root 1452 1 0 18:18:07 ? 0:00 /usr/lib/inet/xntpd -c /etc/inet/ntp.conf.cluster
root 1458 1 0 18:18:17 ? 0:00 /usr/lib/inet/xntpd
root 2287 28745 0 18:29:31 pts/22 0:00 grep ntp


myklmitv01 root#ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*10.1.110.11 .GPS. 1 u 9 128 377 27.97 -5.261 27.92
LOCAL(0) LOCAL(0) 10 l 43 64 377 0.00 0.000 10.01
clusternode1-pr 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0
+clusternode2-pr 10.1.110.11 2 u 23 64 176 -4.67 20.924 390.00


myklmitv02 root#ps -ef | grep ntp
root 5439 1 0 18:20:02 ? 0:00 /usr/lib/inet/xntpd
root 6092 5346 0 18:30:12 pts/16 0:00 grep ntp
root 5433 1 0 18:20:02 ? 0:00 /usr/lib/inet/xntpd -c /etc/inet/ntp.conf.cluster


myklmitv02 root#ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*10.1.110.11 .GPS. 1 u 15 64 377 42.54 19.533 22.26
LOCAL(0) LOCAL(0) 10 l 14 64 377 0.00 0.000 10.01
+clusternode1-pr 10.1.110.11 2 u 34 64 377 0.78 3.101 11.80
clusternode2-pr 0.0.0.0 16 - - 64 0 0.00 0.000 16000.0

(詳全文...)

Firefox 出現了 menuitem error

今天 03/03 重新開機,發現 Firefox 狀態列底部突然出現menuitem —————-^的異常現象,
Google了一下,原來是 Java 1.6 搞的鬼。

以下是解決方法:測試 ok

修正
C:\Program Files\Mozilla Firefox\extensions\{CAFEEFAC-0016-0000-0001-ABCDEFFEDCBA}\chrome.manifest
內容中的
locale javaconsole1.6.0_01 zh-TW chrome/locale/zh_TW/ffjcext/
改成
locale javaconsole1.6.0_01 zh-TW chrome/locale/zh-TW/ffjcext/
然後以安全模式開啟firefox (直接於開始功能表中選擇即可)
退出小火狐,再以正常方式啟動小火狐就可以了。 (詳全文...)