Tuesday, June 21, 2005
Free2Code - articles - Creating a PHP Login Script
TortoiseCVS: About
Open-source LAMP a beacon to developers - Builder - ZDNet Asia
Operators are not marketing 3G correctly - Communications - News - ZDNet Asia
Monday, June 20, 2005
Gather disk usage statistics with iostat
System monitoring is an important part of network administration. Fortunately, there are numerous tools on the market that monitor performance, network activity, and SMART status of hard drives. One tool that isn't very well known is called iostat, and it monitors I/O (Input/Output) performance related to disk drives.
Some Linux distributions ship with iostat. If your distribution doesn't include it, simply download the iostat source code and build it as follows:
$ tar xvzf iostat-2.2.tar.gzcd iostat-2.2make
When the build is complete, you'll have the tool iostat and the manpage iostat.8 in the current directory. To install iostat and its manpage in the /usr/local directory tree, simply perform a "make install":
$ tar xvzf iostat-2.2.tar.gzcd iostat-2.2make install
You can run iostat with a number of options and two optional arguments: "interval" and "count." To view disk activity over time, provide it with an interval of 15 (seconds) and a count of 10 (samples). Here's how:
$ ./iostat 15 10
However, this will give you only basic information on the installed physical disk drives. To obtain more information, pass iostat a few more options, such as printing statistics per disk (-d), printing CPU activity stats (-c), including per-partition stats (-p), and including extended statistics (-x). For a good sampling of data, enter this code snippet:
$ ./iostat -Dpxc
Since iostat prints out a lot of information, you'll want to keep the manpage handy so that you can identify what each column means. Some of the information includes total transfer rate per second, total number of requests per second, number of reads (and writes) per second, percentage of CPU time spent in user, system, and idle modes, and much more.
If your system is slowing down and you're having a hard time finding the bottleneck, iostat may clue you in on some problem areas. Even before that slowdown, iostat can tell you what disks are over- and under-utilized, which allows you to plan ahead and balance the I/O load.
Vincent Danen, a native Canadian in Edmonton, Alberta, has been using Linux for nearly two years. Vincent obtained his Linux Administrator certification from Tekmetrics.com, and he hopes to tackle the RHCE when it is offered in Canada.
Some Linux distributions ship with iostat. If your distribution doesn't include it, simply download the iostat source code and build it as follows:
$ tar xvzf iostat-2.2.tar.gzcd iostat-2.2make
When the build is complete, you'll have the tool iostat and the manpage iostat.8 in the current directory. To install iostat and its manpage in the /usr/local directory tree, simply perform a "make install":
$ tar xvzf iostat-2.2.tar.gzcd iostat-2.2make install
You can run iostat with a number of options and two optional arguments: "interval" and "count." To view disk activity over time, provide it with an interval of 15 (seconds) and a count of 10 (samples). Here's how:
$ ./iostat 15 10
However, this will give you only basic information on the installed physical disk drives. To obtain more information, pass iostat a few more options, such as printing statistics per disk (-d), printing CPU activity stats (-c), including per-partition stats (-p), and including extended statistics (-x). For a good sampling of data, enter this code snippet:
$ ./iostat -Dpxc
Since iostat prints out a lot of information, you'll want to keep the manpage handy so that you can identify what each column means. Some of the information includes total transfer rate per second, total number of requests per second, number of reads (and writes) per second, percentage of CPU time spent in user, system, and idle modes, and much more.
If your system is slowing down and you're having a hard time finding the bottleneck, iostat may clue you in on some problem areas. Even before that slowdown, iostat can tell you what disks are over- and under-utilized, which allows you to plan ahead and balance the I/O load.
Vincent Danen, a native Canadian in Edmonton, Alberta, has been using Linux for nearly two years. Vincent obtained his Linux Administrator certification from Tekmetrics.com, and he hopes to tackle the RHCE when it is offered in Canada.
Sunday, June 19, 2005
How to generate a good password
Diceware Passphrase Home PageDiceware Passphrase Home Page --The famous method to generate a good password.
VISA卡和MASTER CARD卡有何差别
深圳观察--【理财】清清楚楚办卡 明明白白刷卡--南方报业网
终于找到了我要的答案:VISA卡和MASTER CARD卡有何差别?
在填信用卡申请表时,首先要选择就是申请VISA卡还是MASTERCARD卡,很多消费者都不知所措。其实,这两种卡主要是品牌的差别,实际使用差别不大。
专家介绍,这两种卡分别来自威士国际组织(VISA International)——目前世界上最大的信用卡和旅行支票组织,万事达卡国际组织 (MasterCard International)——全球第二大信用卡国际组织,这两个组织本身并不直接发卡,VISA和MasterCard品牌的信用卡是由参加组织的会员(主要是银行)发行的。
一般而言,VISA卡较通行的地区是美国、加拿大、日本等国,其交易种类较适合旅行使用,例如机票、旅馆订房等,MASTER CARD卡较通行于欧洲、韩国,适合一般性的购物消费。 若您出国旅游或商务洽谈时,信用卡不慎遭窃或遗失,却仍需要使用信用卡时,可向VISA或MASTER CARD紧急支援中心要求申请紧急替代卡以应急需,除了VISA金卡可以免年费外,VISA普卡、MASTER CARD各系列卡都需要一定申请费用。
“现在,VISA卡和MASTER CARD卡使用的地区和行业逐渐走向统一,差别逐渐缩小,但是由于节假日在国外刷卡消费时,两种品牌都可能出现信用卡系统繁忙,暂时无法操作的情况,所以建议消费者两个品牌的信用卡各办一张。”中国建设银行深圳分行市场部李先生这样建议。
终于找到了我要的答案:VISA卡和MASTER CARD卡有何差别?
在填信用卡申请表时,首先要选择就是申请VISA卡还是MASTERCARD卡,很多消费者都不知所措。其实,这两种卡主要是品牌的差别,实际使用差别不大。
专家介绍,这两种卡分别来自威士国际组织(VISA International)——目前世界上最大的信用卡和旅行支票组织,万事达卡国际组织 (MasterCard International)——全球第二大信用卡国际组织,这两个组织本身并不直接发卡,VISA和MasterCard品牌的信用卡是由参加组织的会员(主要是银行)发行的。
一般而言,VISA卡较通行的地区是美国、加拿大、日本等国,其交易种类较适合旅行使用,例如机票、旅馆订房等,MASTER CARD卡较通行于欧洲、韩国,适合一般性的购物消费。 若您出国旅游或商务洽谈时,信用卡不慎遭窃或遗失,却仍需要使用信用卡时,可向VISA或MASTER CARD紧急支援中心要求申请紧急替代卡以应急需,除了VISA金卡可以免年费外,VISA普卡、MASTER CARD各系列卡都需要一定申请费用。
“现在,VISA卡和MASTER CARD卡使用的地区和行业逐渐走向统一,差别逐渐缩小,但是由于节假日在国外刷卡消费时,两种品牌都可能出现信用卡系统繁忙,暂时无法操作的情况,所以建议消费者两个品牌的信用卡各办一张。”中国建设银行深圳分行市场部李先生这样建议。
电子信用卡、电子支付工具与设备
电子信用卡、电子支付工具与设备 刚申请了信用卡,却不知如何使用。
Visa国际组织中国大陆网站 - 关于个人信用
Visa国际组织中国大陆网站 - 关于个人信用
Visa国际组织中国大陆网站 - 关于个人信用
Visa国际组织中国大陆网站 - 关于个人信用
Visa国际组织中国大陆网站 - 关于个人信用
Monday, June 13, 2005
Monitor network traffic with ngrep
June 13,2005
When it comes to network monitoring, there are a number of available tools out there. However, one tool that administrators often overlook is the network grep (ngrep) tool.
As a network sniffer or monitor, ngrep is very similar in some respects to tcpdump, but it's somewhat different because you can use grep-style syntax to filter what you want.
Ngrep's most basic use is to listen to all traffic on an interface. However, you can extend this quite a bit to narrow down what you're looking for. Ngrep's syntax is similar to that of tcpdump. Here's an example:
$ ngrep port 80 and src host 192.168.5.10 and dst host 192.168.5.100
This monitors all traffic on port 80 from the host 192.168.5.10 to the host 192.168.5.100.
If you're interested in watching Telnet traffic, you can do so using ngrep. You can make it only return traffic that shows a login string by using grep-style syntax. Here's an example:
$ ngrep -q -t -wi "login" port 23
This tells ngrep to look for the string "login" as a word (without case sensitivity) on port 23 for any connection. In this case, ngrep operates in quiet mode so it only prints out matches. In addition, it timestamps them (as designated by the -t option).
Used in conjunction with tcpdump, ngrep can also be very valuable for searching standard pcap dump files to look for patterns. If you have a large dump file from tcpdump, you can use ngrep to examine it by using standard ngrep commands and issuing it an input file with the -I parameter. Here's an example:
$ ngrep -wi "login" port 23 -I /tmp/packet.dump
Vincent Danen, a native Canadian in Edmonton, Alberta, has been using Linux for nearly two years. Vincent obtained his Linux Administrator certification from Tekmetrics.com, and he hopes to tackle the RHCE when it is offered in Canada.
When it comes to network monitoring, there are a number of available tools out there. However, one tool that administrators often overlook is the network grep (ngrep) tool.
As a network sniffer or monitor, ngrep is very similar in some respects to tcpdump, but it's somewhat different because you can use grep-style syntax to filter what you want.
Ngrep's most basic use is to listen to all traffic on an interface. However, you can extend this quite a bit to narrow down what you're looking for. Ngrep's syntax is similar to that of tcpdump. Here's an example:
$ ngrep port 80 and src host 192.168.5.10 and dst host 192.168.5.100
This monitors all traffic on port 80 from the host 192.168.5.10 to the host 192.168.5.100.
If you're interested in watching Telnet traffic, you can do so using ngrep. You can make it only return traffic that shows a login string by using grep-style syntax. Here's an example:
$ ngrep -q -t -wi "login" port 23
This tells ngrep to look for the string "login" as a word (without case sensitivity) on port 23 for any connection. In this case, ngrep operates in quiet mode so it only prints out matches. In addition, it timestamps them (as designated by the -t option).
Used in conjunction with tcpdump, ngrep can also be very valuable for searching standard pcap dump files to look for patterns. If you have a large dump file from tcpdump, you can use ngrep to examine it by using standard ngrep commands and issuing it an input file with the -I parameter. Here's an example:
$ ngrep -wi "login" port 23 -I /tmp/packet.dump
Vincent Danen, a native Canadian in Edmonton, Alberta, has been using Linux for nearly two years. Vincent obtained his Linux Administrator certification from Tekmetrics.com, and he hopes to tackle the RHCE when it is offered in Canada.
Sunday, June 12, 2005
Australian moves on online music in Asia - Technology - International Herald Tribune
Monday, June 06, 2005
Virus scanning with ClamAV
To date, Linux has experienced only a small number of viruses. Some of these viruses exist but aren't active, and they certainly don't propagate like viruses for Windows. As Linux on the desktop reaches critical mass, there's a possibility that more viruses will appear, but that may still be a long ways off. This being the case, you may wonder why Linux has so many virus scanners.
Linux plays a critical role in server systems and mixed platform environments. Thus, virus scanners for Linux are essential when serving e-mail or files to Windows clients. If you can remove the viral threat before it hits the Windows clients, those clients become safer and less prone to infection.
One open source virus scanner that deserves mentioning is ClamAV. You can plug ClamAV directly into e-mail servers, and it will scan for viruses as the e-mail arrives--before it's delivered to users' mailboxes. It also performs routine scans on files that are served up to Windows clients via Samba sharing. ClamAV even has plugins for scanning files on the fly as they are accessed via Samba.
Most Linux distributions ship with ClamAV, so using this tool is often as simple as installing a pre-packed archive. Another option is to download it from the ClamAV Web site, which provides additional links to ClamAV scanners built for Windows and Mac OS X.
ClamAV works as a client/server system, but you can use it as a stand-alone scanner as well. To initiate the simplest invocation of ClamAV, run the following command:
$ clamscan -r -l scan.log /home/user
This will tell ClamAV to perform a recursive scan on the /home/user directory for any viruses, and it will save the scan results in the file scan.log. If you're a Linux administrator, be sure to include ClamAV in your security arsenal.
Linux plays a critical role in server systems and mixed platform environments. Thus, virus scanners for Linux are essential when serving e-mail or files to Windows clients. If you can remove the viral threat before it hits the Windows clients, those clients become safer and less prone to infection.
One open source virus scanner that deserves mentioning is ClamAV. You can plug ClamAV directly into e-mail servers, and it will scan for viruses as the e-mail arrives--before it's delivered to users' mailboxes. It also performs routine scans on files that are served up to Windows clients via Samba sharing. ClamAV even has plugins for scanning files on the fly as they are accessed via Samba.
Most Linux distributions ship with ClamAV, so using this tool is often as simple as installing a pre-packed archive. Another option is to download it from the ClamAV Web site, which provides additional links to ClamAV scanners built for Windows and Mac OS X.
ClamAV works as a client/server system, but you can use it as a stand-alone scanner as well. To initiate the simplest invocation of ClamAV, run the following command:
$ clamscan -r -l scan.log /home/user
This will tell ClamAV to perform a recursive scan on the /home/user directory for any viruses, and it will save the scan results in the file scan.log. If you're a Linux administrator, be sure to include ClamAV in your security arsenal.
Making Oracle use MySQL's default date format
PHP vs. ASP.NET
PHP 中文站 - PHP Programming - PHP 与 ASP.NET 正面交锋
Sunday, June 05, 2005
Advanced Bash-Scripting Guide
Advanced Bash-Scripting Guide
Very nice for shell script. It solves my trim string problem with easy command.
No awk/gsub required or sed .
look this
[root@localhost tools]# aa="hello world "
[root@localhost tools]# cc=lq
[root@localhost tools]# bb=${aa//" "/""}
[root@localhost tools]# echo $bb$cc
helloworldlq
Very nice for shell script. It solves my trim string problem with easy command.
No awk/gsub required or sed .
look this
[root@localhost tools]# aa="hello world "
[root@localhost tools]# cc=lq
[root@localhost tools]# bb=${aa//" "/""}
[root@localhost tools]# echo $bb$cc
helloworldlq