123
 123

Tip: 看不到本站引用 Flickr 的图片? 下载 Firefox Access Flickr 插件 | AD: 订阅 DBA notes --

2008-08-05 Tue

22:06 你愿意为无碳能源付贵4-5倍的电费吗?对付气候变化不应只是口号 | 伊莎贝尔•希尔顿 - 中外对话 [del.icio.us] (350 Bytes) » 车东[Blog^2]
南非环境部长马蒂纳斯·范斯卡尔奎克解释说,“在南非,每度电的成本是13分(2美分),太阳能发电每度的成本是46分,风能则是57分。找到弥补这个差距的资金是个难题。”从另外一方面说,石油涨价不会超过5倍,因为超过5倍,大家就都改用风车和晒太阳了……
19:30 OraPub, Inc. - Relevant Oracle Training, Products, and Consulting (0 Bytes) » Delicious/Fenng/oracle
19:00 BlogBus的环保袋展览 (1222 Bytes) » Fenng's shared items in Google Reader
  四个月前,BlogBus和触动传媒合作举办了一个“I'm not plastic bag!环保袋创意设计大赛”,一个月内收到了1800多件作品,有来自78个国家的用户参与了这个活动,也让我们看到了不少精彩的设计作品,但获奖的只有5个名额,为了让更多的好作品有一个呈现给大家的机会,我们一直在筹划一个大赛之后的展览——选出50件优秀的作品,制成实物展出,甚至我们可以考虑以后放在Bus小店售卖。

  展览的选址和时间几经周折,最后终于定在8月6日-8月26日,在干叶子茶料理(新华路359号 近定西路),BlogBus邀请大家去“品茗赏袋”。

  

  
18:40 身边的体验0806 (1908 Bytes) » Fenng's shared items in Google Reader

1、杭州,某公共广告上反复播放着“一舟无痛人流医院”的广告,貌似很正规很大的医院,广告里一直最强调着的概念是 —— “安全”。
广告片尾留有联系方式,电话、和24小时值守的QQ号码。

我认为他们很了解自己的用户群:需求大、担心安全问题、害怕、不好意思、用QQ。
我认为他们很知道QQ的作用:典型客户都在用而且很依赖、不见面可以省去很多尴尬。

2、杭州,每个路口都有一个铁架搭的棚子。很多小区的灯箱下面其实都是灭蚊器。
因为:太阳很大,雨水很多。行人可以在此躲避,也避免了闯红灯。
因为:绿地很多的小区蚊子也很多。

我认为他们很了解自己的用户活动场景。

3、杭州,下午4点半到7点你几乎打不到车。因为这是出租车换班时间,而且这是下班高峰期。

不知道哪个缺心眼的要把换班时间设置到这个时候。据说是政府为了平衡出租车、公车之间的利益。

4、北京,首都机场,候机厅。
等待是一件最难熬的事情,这个时候抽烟是一个不错的选择。看到有人从吸烟室出来,我很纳闷——“打火机都被没收了,丫们怎么点烟的?”
进一吸烟后发现,原来机场准备好了被固定的烟斗。赶紧点上,爽哉!

我认为他们了解用户的需求。用什么功能无所谓,只要能满足这种需求。
有些非核心和常用功能怎么展现、是否突出给用户,无所谓。真的需要时,我自己会去找到这个功能。

5、北京,出门记得带身份证、暂住证、结婚证。良民证。

17:33 看来我可以去演黑客了 (833 Bytes) » Fenng's shared items in Google Reader

昨天有个客户单位的兄弟,下午过来干活,在我们这里的一台交换机莫名其妙配置貌似被人改了,enable口令也被人改了,估计是内部谁干活的时候不小心弄错了,否则也不会去改端口上的配置啊。

昨天下午回复了口令和配置,让他设置一个新口令,结果糊里糊涂设置了个enable口令,今天早上一看又是进不去,于是帮着回忆昨天的口令。

口令还是记得的,但就是不对,于是怀疑他当时拼写错误了,于是两个人又开始猜口令,尝试所有可能的拼写错误,我运气比较好,尝试记录如下:

Switch>en
...

17:01 dbms_xplan in 10g " Oracle Scratchpad (110 Bytes) » Delicious/Fenng/oracle
The hint /*+ gather_plan_statistics */ enables collection of rowsource execution statistics for the statement.
17:01 Oracle10G LOGMNR捕获不到记录(一) (183 Bytes) » Delicious/Fenng/oracle
查询了metalink,Oracle在文档Doc ID: Note:291574.1中对这个问题进行... SUPPLEMENTAL LOG DATA PRIMARY KEY和UNIQUE INDEX,这样Oracle才能确保LOGMNR可以获取SQL语句:
17:01 Oracle Database 10g 10.2.0.4 Cannot Boot a Large SGA on AMD Servers Running Linux " Kevin Closson's Oracle Blog: Platform, Storage & Clustering Topics Related to Oracle Databases (0 Bytes) » Delicious/Fenng/oracle
11:13 Linux DHCP server: Static IPs are gone in 60 seconds (12310 Bytes) » Red Hat Magazine

Are you sick of your ISP’s DHCP and want more control? Maybe you have a crusty Windows DHCP server that is about to blow up from the latest virus of the month or a series of “magic” GUI clicks gone horribly wrong.

Do a little spring cleaning, and solve your network problems with open source software. Setting up a DHCP server with Red Hat Enterprise Linux 5 or Fedora is a piece of cake. In this article we’ll go over the basics of setting up DHCP, doing basic troubleshooting, and finally setting up static mapping DHCP.

1. Install DHCP.

yum install dhcp

2. Turn on the service at boot.

chkconfig dhcpd on

3. Start the the service.

service dhcp start

Whoops–you’ll get a message like this:

[root@mothership etc]# service dhcpd start
Starting dhcpd:                                            [FAILED]

That’s because the dhcpd.conf file in the /etc directory is empty. If you take a look at it, you’ll see a hint:

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#

On Red Hat Enterprise Linux 5.2 you should see something like the following in /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample:

ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  192.168.0.1;
        option subnet-mask              255.255.255.0;

        option nis-domain               "domain.org";
        option domain-name              "domain.org";
        option domain-name-servers      192.168.1.1;

        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#       option netbios-node-type 2;

        range dynamic-bootp 192.168.0.128 192.168.0.254;
        default-lease-time 21600;
        max-lease-time 43200;

        # we want the nameserver to appear at a fixed address
        host ns {
                next-server marvin.redhat.com;
                hardware ethernet 12:34:56:78:AB:CD;
                fixed-address 207.175.42.254;
        }
}

This is a lot to digest, but we can break it down. I’m a big fan of doing the absolute minimum to get something started. For most users, you probably want to have a few static mapped IP addresses based on a MAC address, and then everyone else will get IP addresses from a range. To do this, copy from this file, and then paste the sample into /etc/dhcpd.conf.

Minimal DHCP config

authoritative;
ddns-update-style interim;
default-lease-time 21600;
max-lease-time 43200;

        option routers                  192.168.1.254;
        option broadcast-address        192.168.1.255;
        option subnet-mask              255.255.255.0;
        option domain-name-servers      192.168.1.10;

        subnet 192.168.1.0 netmask 255.255.255.0 {
                range 192.168.1.100 192.168.1.120;
}

If you are a vim user, you should do this to paste it in:

:set paste

Then insert using “i”, and paste it in. This ensures a cut and paste that preserves formatting–a nice trick to know about in vim.

Minimal DHCP config explained line by line

You can man dhcpd.conf for a more thorough explanation, but here are some simple
explanations of the minimal DHCP configuration:

  • authoritative;

    Makes the DHCP server authoritative for requests. This is not set by default, but it needs to be configured to distribute IP addresses. This is to ensure that “rogue” DHCP servers are not set up willy-nilly by people who don’t understand how they work.

  • ddns-update-style interim;

    This line must be in the config for dhcpd to run. For more information, read the man page for dhcpd.conf.

  • default-lease-time 21600;
    max-lease-time 43200;

    These two lines set maximum and minimum times for a client to hold onto an IP address lease obtained from the dhcp server.

  • option routers 192.168.1.254;
    option broadcast-address 192.168.1.255;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 192.168.1.10;
  • These four lines are basic network configuration parameters that you would normally set if you had to manually configure an IP address. This is, in fact, one of the main points of DHCP. Note that the line that says domain-name-servers–this is where you tell the clients to grab information from DNS servers. If you set up your own caching DNS server to speed up name server lookups, then this would be the place to tell the DHCP clients about it.

  • subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.100 192.168.1.120;
    }

    This final section is where subnet declarations go. In this declaration, we are saying that any client on the subnet 192.168.1.0 will get an IP address with the information we defined above, but they will only get an IP address in the .100 to .120 range. So you can’t get 192.168.1.121 or 192.168.1.99, but you can get any IP address in between.

Now you’re ready to alter your configuration to match your network, and then restart or start for the first time dhcp:

service dhcp start

Simple troubleshooting steps and tips For DHCP

If things didn’t go as you excepted–for example, the dhcp server didn’t start–you should do a bit of troubleshooting. DHCP can be very frustrating to fix. Here are a few things to check:

1. Configure DHCP to only listen on a specific interface. Being explicit is always a safe bet, so you can edit /etc/sysconfig/dhcpd and define the interface to listen on. For eth0, this would look like:

# Command line options here
DHCPDARGS=eth0

2. Start the dhcp server in foreground mode:

dhcpd -f

This is handy because it will show you more verbose errors than you would normally get from /var/log/messages.

3. Watch the semi-colons. One of the most common mistakes in a DHCP config is to forget a semi-colon. You can usually see the line number with the problem if you start dhcpd in foreground mode.

4. Restart the server, or reload the config file to see changes.

It’s very common to make changes and then wonder why they aren’t working. You need to either reload or restart the dhcpd service. Just remember that if you do restart and you have a semi-colon missing, then you will stop the dhcpd service. Doing a reload is safer, as it will not reload a broken config.

5. Use version control to keep track of every change to /etc/dhcpd.conf

Using version control to manage your /etc/dhcpd.conf file is a huge win. As long as you keep the file updated with changes, you can revert in milliseconds back to a known good configuration.

Getting fancy with static mapping

One of the cooler things that DHCP does is mix dynamically distributed addresses from a pool, and assign static addresses based on a hardware address, or MAC address. This last feature is called static mapping DHCP, and it’s the best thing since sliced bread.

Why is static mapping DHCP so cool? It allows you to automatically configure a machine’s network configuration, even if the operating system is rebuilt from scratch, as DHCP assigns it a specific address based on the ethernet hardware. This means if you set it up in the DNS, you will always know the hostname and IP address of the machine.

For a network administrator, that’s great news. To make things even better, you can mix and match part of your subnet with static mapping and part of it with regular DHCP. This is what that would look like based on our previous configuration.

authoritative;
ddns-update-style interim;
default-lease-time 21600;
max-lease-time 43200;

        option routers                  192.168.1.254;
        option broadcast-address        192.168.1.255;
        option subnet-mask              255.255.255.0;
        option domain-name-servers      192.168.1.10;

        subnet 192.168.1.0 netmask 255.255.255.0 {
                range 192.168.1.100 192.168.1.120;

        host noah {
        hardware ethernet 00:11:00:11:00:11;
        fixed-address 192.168.1.121;
        }
}

If you look at this “mapping” configuration, you’ll see tell it’s really simple. The normal pool of addresses is set to give out addresses between 100-120, and we gave our “static” address to 121, but only if it matches a specific MAC address. You can create hundreds of these stanzas and control a whole network this way.

Summary

In this article, we went over how simple it is to set up sophisticated DHCP configurations in Fedora and Red Hat. There are other items that we did not cover in this article that you may want to research on your own. The first is ddns-update, which allows DHCP to update DNS on the fly. It’s a great tool to have in the DHCP toolkit. Second, we didn’t cover DHCP relay agents, which allow a DHCP server to relay requests to DHCP servers on other subnets.

Linux DHCP is a low-cost alternative to proprietary network servers that depend on the user doing a series of GUI clicks. On the surface it may seem convenient to have a “wizard” setup your network for you. But it’s often better to tap into the power of an explicit operating system like Linux. It doesn’t get any more explicit than a few lines in a dhcpd.conf config file. DHCP on Linux is elegant, simple, and powerful. Sure, the lure of the “dark side GUI click” is strong, but true mastery of networking lies with another path.

About the author

Noah Gift is the co-author of Python For Unix and Linux by O’Reilly and the upcoming Google App Engine in Action by Manning. He is an author, speaker, consultant, and community leader, writing for publications such as IBM developerWorks, Red Hat Magazine, O’Reilly, and MacTech. His consulting company’s website is www.giftcs.com, and his personal website is www.noahgift.com. Noah is also the current organizer for www.pyatl.org, which is the Python User Group for Atlanta, GA. He has a master’s degree in CIS from Cal State Los Angeles, a B.S. in nutritional science from Cal Poly San Luis Obispo, is an Apple and LPI certified SysAdmin, and has worked at companies such as Caltech, Disney Feature Animation, Sony Imageworks, and Turner Studios. In his free time he enjoys spending time with his wife Leah and their son Liam, playing the piano, and exercising religiously.

10:31 小议自治事务(六) (638 Bytes) » yangtingkun
这两天看了11g的CONCEPT文档的事务部分,发现自治事务还有一些以前没有注意到的地方,这里简单总结一下。对比自治事务与普通事务的代价差别。小议自治事务(一):http://yangtingkun.itpub.net/post/468/467765小议自治事务(二):http://yangtingkun.itpub.net/post/468/467840小议自治事务(三):http://yangtingkun.itpub.net/post/468/467933小议自治事务(四):http://yangtingkun.itpub.net/post/468/468031小议自治事务(五):http://yangtingkun.itpub.net/post/468/468180自治事务提供了很方便的事务控制功能,使得用户可以...
09:50 被 Darcs 折磨了一天 (3691 Bytes) » Fenng's shared items in Google Reader

最近想在子项目中试一下 darcs ,替代原来的 svn 。只是尝试一下。

之前都是在本地玩 darcs 的,没遇到多少问题。今天找了台 freebsd 的机器,做了一个集中的仓库。没想到遇到许多麻烦。

我的想法很简单,在集中仓库的机器上建一个专有用户,把几个项目相关人员的 key 都放进去,大家都可以通过 ssh 访问这台机器。那么所有人都可以方便的通过 darcs get/put/pull/push 操作仓库了。

从 freebsd 或 linux 上远程操作这个仓库都没有多少问题,问题出在 windows 上。windows 版的 darcs 在提交文件时,一旦 patch 过大,就很容易失败。弄了一天才把问题弄明白。

一开始怀疑是 darcs 版本不匹配,patch bundle 文件不兼容。因为 freebsd 上装的是 2.0.2 版,而 windows 上是 2.0.0 版的。提交失败时,总会报一句,

darcs failed: Malformed patch bundle: '[init' is not 'Context:'

貌似我的 init 这个 patch bundle 格式错误。尝试了老版的仓库格式还是依然存在。

google 了一下,有许多人遇到跟我一样的问题,但是没有人解答。我试着找 2.0.2 版的 windows 下编译好的 darcs 未果。想自己在 windows 下 build 一个出来,怎么弄都没搞定,放弃。转而去 freebsd 下自己 build 了个 2.0.0 版的 darcs ,可问题依旧。

我用 darcs send -O 生成 patch 文件,再用 scp 放到远程机器上,然后 ssh 登陆 darcs apply 一下却没有问题。确定不是版本不兼容问题。

通过修改 DARCS_SSH 设置了一个 bat 文件间接引导 ssh ,以此观察 darcs 如何调用 ssh 工作。发现,在 darcs push 的时候,其实就是在远程机器上运行了 darcs apply ,然后等待标准输入。这边通过 ssh 把 patch bundle 发送过去。

由于小的 patch bundle 没有问题,问题都出在文件太大的时候。让人怀疑是 windows 控制台的问题。胡乱改了一些 windows 控制台的属性,并反复测试,发现同样大小的 patch bundle ,有时候可以正常工作,有时候却不行。很难确定具体原因。症状就是:从 ssh 建立的管道发送过去的输入数据不完整。

最后,放弃使用 mingw 版的 darcs 以及 putty 带的那个 plink (ssh)工具;装了一个 cygwin 以及 openssh 。一切就正常了。另外,如果用 cygwin + putty 的 ssh 也有问题。

我估计很大可能出在那个 darcs 的 windows 包中带的 ssh.exe (其实就是 putty 的 plink.exe )这个工具上。windows 糟糕的管道设施或许也有责任。

哎,在 windows 上跑 *nix 的命令行工具就是问题多多啊。


随手记录下这失败的一天,希望可以帮助到遇到同样问题 google 到这里的人们。


顺便宣传一下 darcs ,虽然 windows 版很是折磨了我一次,但东西还是很好用的。如果你有 svn / cvs 的经验,很容易切换过去。下面列几条基本指令,前几条大约可以跟 svn 对应起来,但不完全一致。

  darcs get == svn co
  darcs put == svn import
  darcs pull == svn up
  darcs push == svn ci
  darcs record == 本地提交
  darcs send == 发送/生成 patch bundle
  darcs apply == 打上 patch bundle

darcs 是没有版本号的,工作理念跟 svn 很不一样,但是很人性,容易让人接受。推荐有兴趣的朋友试一试。

09:00 Google搜索结果中的中文域名 [Flickr] (341 Bytes) » DBA notes

dbanotes posted a photo:

Google搜索结果中的中文域名

08:18 Google搜索结果中的中文域名 (341 Bytes) » Uploads from dbanotes

dbanotes posted a photo:

Google搜索结果中的中文域名

07:56 我的美人肩与2008上半年经济数据 (3300 Bytes) » 玉面飞龙的BLOG
首先关注上半年CPI。CPI关系到消费物价,劳动力价格,股市等重要指标。 7.9%,典型的严重通货膨胀。 国家统计局17日公布今年上半年国民经济数据,上半年居民消费价格总水平(CPI)同比上涨了7.9%,其中,6月份居民消费价格上涨7.1%,较上月回落了0.6个百分点。 从过去一年CPI走势来看,国家在通过多种货币(加息/紧缩货币)汇率(升值)财政(缩减开支/调整退税政策等/东莞发钱等)政策降低恶性通货膨胀发生,这些政策或多或少的起些好作用,但由于国际复杂的形势,降低CPI的成本(因为无法融资导致中小企业倒闭,失业率上升)不容乐观。 再看GDP,上半年GDP同比增10.4% ,名义的。考虑通货膨胀因素,减去7.9%,实际GDP同比增长应低于2.5%。考虑到未计算绿色GDP,以及官方统计的传统—报喜不报忧。真实GDP增长有可能超级低或为负增长,意味着步入了经济的衰退周期。 再看其他数据, 石油等五行业实现利润最多   1-5月份,全国规模以上工业企业实现利润10944亿元,同比增长20.9%,比上年同期回落21.2个百分点。 更多报道: ·上半年财政收入增长30%以上 符合宏调预期 通胀压力较大 ·社会消费品零售总额增21.4% 6月70个大中城市房价涨8.2% ·上半年货币净回笼194亿 城镇居民人均可支配收入增6.3% ·价格水平仍高 肉价高位运行 要继续控制价格过快上涨 ·工业品出厂价格同比上涨7.6% 夏粮产量连续第五年增产 ·全国房价涨幅连续6月回落 上半年全国地价整体大涨 财政收入增长30%,大大超过了城镇居民人均可支配收入。国家富,人民穷。国家在税收这个财政政策上还有很大搞头,缩减政府开支,提高政府效率,降低各种赋税,就可以有效的扩大内需。 而人均可支配收入增6.3%,低于通货膨胀1.6个百分点。说明普通老百姓的财富在通货膨胀中缩水。 全国房价涨幅连续6月回落,大中城市房价涨8.2%,说明实际价值涨幅不高于0.3%,略快于通货膨胀7.9%。通货膨胀下并没有导致固定资产的价格更高,反而会导致房价和老百姓的财富一样不断降低。 工业品出厂价格上涨到CPI上张会有一定时期得延迟,7.6%的涨幅会给下半年通货膨胀控制带来很大压力。企业不断增长的生产成本在已经无法压缩的结果下必将向下游消费者扩展。按照经济学大道理,价格上涨,需求曲线移动带来蛋糕缩小。 企业报表也预示着,通货膨胀下,企业利润增长率大大折扣。但垄断企业依旧是人们向往的雇主。如果企业不能通过技术创新,cost saving来提高生产效率,增加附加值,下半年报表更让人担心。 高涨的通货膨胀注定了2008年上半年股市的颓废。指望炒股跑赢通胀 — 的确需要很高的智慧。 下面的很多人必定和我一样。在减少消费的同时,还在股市中站岗或割肉。 在熊市中赚钱,需要花费太多时间了。买股涨个2%-3%不是难事,但是等不到5%的涨幅,马上就狠跌成下一个美丽的肩膀。 做散户好惨啊。
07:48 十个男DBA的聚会 (2454 Bytes) » OracleDBA Blog---Please enjoy the pain which is unable to avoid!

我们已经进入了奥运封网阶段了.

下午一到办公室,alan同学就要我请吃饭,想想最近兄弟们也比较辛苦,而且我也有接近30小时没有吃东西了,那就答应吧.那小子说去吃火锅,37度高温去吃火锅,创意还真有.

那就去吧,顺便问他叫了那些兄弟,最后一数,有alipay的DCBA,Brotherxiao,钟离,小付;taobao的流云,Ningoo,小占以及我们公司的我,alan以及lori,一共刚好10个大男人

想想很久没有见这些兄弟了,那一起吃饭就一起吃饭好了.

先是taobao的三个兄弟到了,他们给我们电话的时候我快到门口了,进去,然后我们6人开始等alipay的兄弟,厉害是厉害的,10个人战斗力超强,基本上吃的都一扫光.

不过10个DBA在一起,居然没有聊技术,难得呀.大家都随便扯淡扯淡.

到买单的时候,发生了特别的意外,本来是alan准备买单的,结果服务员说,招商银行的信用卡可以打折,然后DCBA同学说他有,但是由于要刷招商银行的卡才可以打折,最后变成了DCBA买单.

总体来说,吃的还是蛮爽的,就是Brotherxiao同学不肯喝酒,也不知道他咋的了,说是有咽炎,俺建议他最好能抽烟喝酒,你看我就没咽炎吗.另外,因为是DCBA买单,所以下次大家还有一次一起喝茶的机会,下次就肯定是alan同学买单了.

这次所有的人中,小付和小占都是从我们这个team中过去的,也算老熟人了,不过有意思的是,小付,小占和我在同一个team中,但是原来却属于三家公司的人.小占同学今天还接到猎头电话,询问我们这个team中都有谁,莫非我们这个team已经盛名在外了?

嗯,想要知道10个男DBA到底在一起聊了啥,吃了啥?这些信息是保密的,呵呵,谁出价高我就告诉谁,哈哈.

06:55 sed中如何引用变量 (2869 Bytes) » Ricky's Test Blog

最近写了一个系统资源监控的脚本,想让它每次机器重启后也可以自动启动,决定放到inittab中去,于是写了一个脚本run.sh,执行的时候启动脚本,并且加入inittab,可是调试的时候发现sed对shell的变量引用一直无法替换,百思不得其解,后来得到几位高手指点,终于解决,还有两种解决方法。

问题描述:

命令是这样的

work_dir=/home/ractest

sed ‘/start_mon.sh/d
/init.crsd/ a\
h4:3:respawn:${work_dir}/scripts/start_mon.sh >/dev/null 2>&1
‘ /etc/inittab

想把work_dir替换,但是没成功。

sed “/start_mon.sh/d
/init.crsd/ a\
h4:3:respawn:${work_dir}/scripts/start_mon.sh >/dev/null 2>&1
” /etc/inittab
试过,报错
sed: command garbled: /init.crsd/ ah4:3:respawn:/home/ractest/ricky/atm_monitor/scripts/start_mon.sh >/dev/null 2>&1

在Solaris上不行,但是在Linux上是可以的,所以初步确定是sed版本的问题,但是在Solaris上怎么解决这个我呢?有如下两种方法:

方法一:使用单引号
单引号:

sed ‘/start_mon.sh/d
> /init.crsd/ a\
> h4:3:respawn:’${work_dir}’/scripts/start_mon.sh >/dev/null 2>&1
> ‘ /etc/inittab

方法二:使用双引号

sed “/start_mon.sh/d
> /init.crsd/ a\\
> h4:3:respawn:${work_dir}/scripts/start_mon.sh >/dev/null 2>&1
> ” /etc/inittab

经过测试,两种方法都可以成功。
记录之!


05:43 注册表单之密码强度检测 (5565 Bytes) » Fenng's shared items in Google Reader

不可否认,Ajax技术的流行给网站带来了很大的改变,用户在使用网站的时候得到了比以往好上几倍的体验感受,而在这些改善当中,Ajax技术在注册表单上的应用带给用户的改善无疑占了很大一部分。然而并非只要在网站上应用Ajax技术就能改善用户体验,很多的网站由于Ajax技术的滥用或者使用不当,带来的效果往往是相反的。

注册表单做为网站的最基础应用之一,以往是用户所诟病最多的地方,因为用户不得不一次又一次的面临提交注册信息后服务器返回信息“用户名已被注册”或者“两次输入的密码不同”等困境,用户不得不在注册这一环节上接受一次又一次的失败挫折感。而随着Ajax技术的应用,注册表单的用户体验得到了颠覆性的改善。通过Ajax技术对注册表单填写项的实时检测,以判断用户输入的内容是否正确,用户已经不会在注册的时候遇到诸如提交注册信息后返回“用户名已被注册”之类的困境了。

在填写注册表单时,由于密码是不可见的,所以很多网站在注册时都会要求用户填写两次密码,以便确认用户不会因为误输入而把密码弄错。通过对输入内容的实时检测,Ajax程序可以判断出用户两次输入的密码是否相同,在这项应用的基础上,很多网站在用户输入密码的时候又加入了对密码强度的判断,以进一步保障用户的密码安全。

互联网上有无数个网站,几乎所有的网民都会在不同的网站注册用户,以便得到不同的服务。然而如何去记忆这数量众多的用户名与密码并将其与相应的网站对上号,成了用户头痛的一件事,很多的用户不能使用帐号登录网站并不是因为帐号或者密码被盗而是因为自己忘记了帐号或者密码。

因为用户有这种需求,所以出现了OpenID这个身份网址的平台,OpenID极大的方便了用户管理自己的信息,然而由于商业利益等因素在内,只有很少的网站支持OpenID平台,特别是国内的互联网更是只有极少一些网站支持OpenID平台。

所以一般情况下,用户会以一个相同的用户名跟密码去注册不同的网站,当然这是在环境允许(比如说用户名未被注册)的前提下的。这个用户名跟密码会是与用户相关的信息内容,因为这样便于用户记忆。不是特殊情况,用户一般不会轻易的更改这个用户名跟密码。

然而在注册表单中加入的密码强度检测这一功能,却很有可能改变用户的这一习惯,因此也更有可能造成用户忘记密码的概率上千。

如果用户在输入密码的时候,被系统告知密码强度为“弱”,那么用户不可能对此视若无睹。这就犹如一个“权威人士”告诉你,你家大门上的锁是很容易开的那种,你的心里自然会产生一种不安全的心理,为了让自己感到安心,于是你选择了换锁。而用户在输入密码的时候被告知强度为“弱”时也会有这个心理,于是有很大一部分用户为了让自己心里有安全感,选择了更换自己熟悉的密码,换成新的不容易记忆的密码只是为了让自己有一种安全感在心里。这无疑是加重了用户的记忆负担。

更有甚者,当用户输入的密码被系统判断为“弱”时,竟不能完成注册表单的提交!无疑这是一个很错误的行为。

事实上,由于密码强度是由各网站自己定义的,并没有一个统一的标准,所以很有可能在A网站注册输入密码时被告知强度为“中”,但在B网站注册时却被告知强度为“弱”,由此产生用户不得不去根据不同网站注册时系统告知的密码强弱去更改自己的密码。

密码强度检测本意只是为了给用户一个善意的提醒,希望用户对自己信息有更强的保护心理,但由于在注册过程中把密码强度检测提到一个比较明显的位置,所以“迫使”有些用户去修改自己熟悉的信息,从而增加用户的负担。

注册表单越来越精简,在精简的基础上,试着去减轻用户的负担。密码强度检测并不是没有需要,但不应该把它做为一个显眼的标准,更好的情形应该把其做为对用户注册时一个善意的提醒。

相关日志

04:04 SSD 近況 (422 Bytes) » Fenng's shared items in Google Reader
Shared by Pahud
看來SSD for server還是不大成熟

PIXNET 買的兩顆用了不到半年的 Memoright SSD 最近一起故障了。
故障的狀況為出現 DMA Error。目前沒有掛點的 SSD 只剩下 Mtron 1000 系列。

00:20 Quick tip: how to convert tables to InnoDB (381 Bytes) » Fenng's shared items in Google Reader
I use Maatkit for a lot of grunt work and thought you might appreciate this quick tip. Suppose you have a bazillion tables to convert from MyISAM to InnoDB, but they are mixed in with other tables that are already InnoDB, or are another storage engine that you don't ...
00:20 传马化腾收购今麦郎 一个“弹”字撮合 (2171 Bytes) » Fenng's shared items in Google Reader
Shared by 5+
这则新闻够震撼

回味无穷
马化腾下军令状:腾讯网奥运报道要争流量第一 ,也就是说,心疼网三家中,明确号称要超越新浪了,也就是说要做“第一门户”了。

小马哥的策略很简单,就是“在完成各项准备后,腾讯测试的结果显示,奥运新闻推送至 3亿用户桌面的时间只需要短短的30秒,实现了真正意义上的第一时间传播”,说白了,就tmd弹窗嘛。。

现在我的感觉是每天都在吃方便面,今麦郎,因为每天我都要被弹很多次,不给钱成为会员的话,还没法屏蔽,以前曾经一段时间花钱买会员,就是为了Y不给我弹窗,后来算了,忍了。

因此建议马化腾直接收购今麦郎算了,这样就可以腾讯今麦郎,还是让葛优代言,吃今麦郎弹面,享受QQ弹窗,一边吃面一边看奥运。

阅读全文...

相关文章:抓虾 google reader 鲜果

2008-08-04 Mon

22:53 IE里模拟DOMContentLoaded事件 » Fenng's shared items in Google Reader
21:15 128GB or RAM finally got cheap » MySQL Performance Blog
21:15 DNS漏洞续----为什么我们需要全面披露 » Fenng's shared items in Google Reader
21:02 《外滩画报》:对“豆瓣模式”的借鉴和创新 » Fenng's shared items in Google Reader
18:35 我们中间的“小白”或“troll” » Fenng's shared items in Google Reader
17:40 欺骗Google如此轻易 » Fenng's shared items in Google Reader
17:34 WebChart监控系统 » AnySQL.net
12:46 疯狗,又见疯狗! » 存储部落
10:01 小议自治事务(五) » yangtingkun
09:28 Advanced Oracle Troubleshooting seminars - announcing dates » Tanel Poder's blog: Core IT for geeks and pros
09:26 Happy Birthday PayPal! » Fenng's shared items in Google Reader
08:24 GoogleInfoEcosystem » Uploads from dbanotes
08:15 流氓王八蛋--杭州推送 » Uploads from dbanotes
04:20 Userstats patches with information schema support » MySQL Performance Blog
01:01 IBM p 系列管理员认证(Test 191)指南系列,第 8 部分 » developerWorks 中国 : 技术文章 , 教程 AIX

2008-08-03 Sun

22:01 小议自治事务(四) » yangtingkun
21:21 eBay Storage Topology » Uploads from dbanotes
19:37 墨墨恢复健康 - 病好了 » Oracle Life