# hdparm -t /dev/sdb1
/dev/sdb1:
Timing buffered disk reads: 750 MB in 3.01 seconds = 249.58 MB/sec
# hdparm -t /dev/sdb1
/dev/sdb1:
Timing buffered disk reads: 750 MB in 3.01 seconds = 249.58 MB/sec
方法一 :
# echo “foo” > bar
# du -h bar
4.0K bar
方法二 :
# tune2fs -l /dev/sda1 | grep ‘Block size’
Block size: 4096
方法三 :
# dumpe2fs -h /dev/sda1 | grep ‘Block size’
dumpe2fs 1.39 (29-May-2006)
Block size: 4096
方法四 :
# blockdev –getbsz /dev/sda1
4096
# iozone -a -i 0 -i 1 -f /xxx/xxx/iozone.test -q 64k -n 32M -g 1G > iozone.out
# Generate_Graphs iozone.out
由於 NoMachine免費版本只能支援 2 個使用者. 在家用當然是足夠. 但是要給多人用就沒辦法了. 只好自己架設免費的 FreeNX server.
在安裝 FreeNX Server 前. 請記得安裝 expect.
# yum install expect
Loaded plugins: kernel-module
sl-base | 1.1 kB 00:00
sl-security | 1.9 kB 00:00
sl-security/primary_db | 1.8 MB 00:02
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
–> Running transaction check
—> Package expect.i386 0:5.43.0-5.1 set to be updated
—> Package expect.x86_64 0:5.43.0-5.1 set to be updated
–> Finished Dependency Resolution
Beginning Kernel Module Plugin
Finished Kernel Module PluginDependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
expect i386 5.43.0-5.1 sl-base 158 k
expect x86_64 5.43.0-5.1 sl-base 160 kTransaction Summary
================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)Total download size: 318 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): expect-5.43.0-5.1.i386.rpm | 158 kB 00:01
(2/2): expect-5.43.0-5.1.x86_64.rpm | 160 kB 00:00
——————————————————————————–
Total 153 kB/s | 318 kB 00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : expect 1/2
Installing : expect 2/2Installed:
expect.i386 0:5.43.0-5.1 expect.x86_64 0:5.43.0-5.1Complete!
之後就去下載 FreeNX 和 NoMachine Client 的套件(freenx-0.7.3-4.el5.centos.x86_64.rpm, nx-3.4.0-4.el5.centos.x86_64.rpm and nxclient-3.4.0-7.x86_64.rpm)然後安裝 :
# rpm -ivh freenx-0.7.3-4.el5.centos.x86_64.rpm nx-3.4.0-4.el5.centos.x86_64.rpm nxclient-3.4.0-7.x86_64.rpm
Preparing… ########################################### [100%]
1:nx ########################################### [ 33%]
2:freenx ########################################### [ 67%]
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
Starting freenx-server: [ OK ]3:nxclient ########################################### [100%]
Showing file: /usr/NX/share/documents/client/cups-infoCUPS Printing Backend
The NX Client set-up procedure detected that your “IPP CUPS” printing
backend doesn’t allow printing from the NX session. In order to have
printing support in your NX system, you need to set proper permissions
on the IPP backend. Please execute:chmod 755 /usr/lib/cups/backend/ipp
設定 NX server :
# nxsetup –install –setup-nomachine-key
Setting up /etc/nxserver …done
Setting up /var/lib/nxserver/db …done
Setting up /var/log/nxserver.log …done
Adding user “nx” to group “utmp” …done
Setting up known_hosts and authorized_keys2 …done
Setting up permissions …done
Setting up cups nxipp backend …done—-> Testing your nxserver configuration …
(omit)
<---- done----> Testing your nxserver connection …
HELLO NXSERVER – Version 3.2.0-73 OS (GPL, using backend: not detected)
<--- doneOk, nxserver is ready.
PAM authentication enabled:
All users will be able to login with their normal passwords.PAM authentication will be done through SSH.
Please ensure that SSHD on localhost accepts password authentication.You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!
複製 node.conf.sample 範本檔案到 node.conf :
# cp /etc/nxserver/node.conf.sample /etc/nxserver/node.conf
檢查 FreeNX Server 是否有執行 :
# nxserver –status
NX> 100 NXSERVER – Version 3.2.0-73 OS (GPL, using backend: not detected)
NX> 110 NX Server is running
NX> 999 Bye
將 /usr/bin/nxserver –start 指令放在 /etc/rc.local 內 機器每次開機都執行 FreeNX sever
昨天把我爸的 Ubuntu 電腦升級到 10.04. 結果只能顯示英文. 不知道怎麼搞的.

anyway, 重點不是這個. 這篇的主題是 Ubuntu 10.04 iPhone Tethering
首先, 先打開 “Terminal” 輸入下列指令, 安裝 tethering 的套件 :
# sudo -s
# add-apt-repository ppa:pmcenery/ppa
# apt-get update
# apt-get install gvfs ipheth-utils
上列安裝就可以讓 Ubuntu tethering, 可以直接接USB就可以上網了. 當然你要設定藍芽也是可以. 要先配對. 在右上方藍芽icon上按 “Set up new device…”

按”Forward”

選你的iPhone, 然後按”Forward”

出現配對碼

在你的手機輸入你的配對碼

打勾那個”Access the Internet using your mobile phone” 然後按 “Close”

在無線網路那個icon找一個藍芽的代碼

這樣就可以上網了
如何更改 vmware linux 機器的 MAC 位址?

在vmware 上的mac只能改固定的位址 格式如下 00:50:56:xx:xx:xx (xx代表你可以改的位址) 可是這樣的改法並不能滿足我.我需要改 MAC 好讓原本申請的 mac address 能運作.
在改變之前先查看一下本來的MAC位址 :
# ifconfig -a | grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:11:25:CC:BB:AA
然後編輯 ifcfg-eth0 檔案. 把你要的 MAC 改好
# vi /etc/sysconfig/networking/devices/ifcfg-eth0
HWADDR=00:11:25:AA:BB:CC
改變網卡MAC位址
# service network stop
# ifconfig eth0 hw ether 00:11:25:AA:BB:CC
# service network start
如果要每次開機都改就寫到 rc.local內
vi /etc/rc.local
ifconfig eth0 hw ether 00:11:25:AA:BB:CC
service network restart
理論上這樣就沒問題了.
rsync –delete -avl /xxx/xxx/xxx/ liho.tw:/xxx/xxx/xxx/
make sure you already install xfs module :
# yum install -y xfs*
part it :
# parted /dev/sdb
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel
Warning: The existing disk label on /dev/sdb will be destroyed and all data on
this disk will be lost. Do you want to continue?
Yes/No? Yes
New disk label type? [gpt]? gpt
(parted) printModel: IFT A16F-G2430 (scsi)
Disk /dev/sdb: 26.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gptNumber Start End Size File system Name Flags
(parted) mkpart
Partition name? []?
File system type? [ext2]? xfs
Start? 0
End? -1
(parted) printModel: IFT A16F-G2430 (scsi)
Disk /dev/sdb: 26.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gptNumber Start End Size File system Name Flags
1 17.4kB 26.0TB 26.0TB xfs(parted) quit
Information: Don’t forget to update /etc/fstab, if necessary.#
# mkfs -t xfs -f /dev/sdb1
mount it :
# mount -t xfs /dev/sdb1 /diskarray/
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 852M 18G 5% /
/dev/sdb1 24T 5.1M 24T 1% /diskarray
localhost> lam user.test
test lrswipcda
localhost.localdomain> dm user.test
deletemailbox: Permission denied
localhost> sam user.test cyrus c
localhost> lam user.test
test lrswipcda
cyrus c
localhost> dm user.test
要先安裝 minicom
# yum install -y minicom
在設定 minicom
# minicom -s
選 “Serial port setup” 由
Serial Device : /dev/modem
改為
Serial Device : /dev/ttyUSB0
記得 “Save setup as dfl”
如果你直接打 minicom 指令進入 minicom 也是可以設定
先按 Ctrl + A 再按 Z 在選 O
Recent Comments