Archive for March, 2005

对 Solaris 服务器 Down 机的一次检查

Monday, March 28th, 2005

昨晚系统 down 机。修复后查看日志发现如下记录:

#view /var/adm/messages

Mar 27 22:40:39 nbzh.net genunix: [ID 470503 kern.warning] WARNING: Sorry, no swap space to grow stack for pid 3248 (httpd)
Mar 27 22:40:39 nbzh.net last message repeated 4 times
Mar 28 00:31:53 nbzh.net ufs: [ID 526661 kern.notice] NOTICE: mode = 040755, inum = 396864, fs = /export/home

系统看来是 swap 空间不够,引发了重新启动。

#swap -l 看到如下结果:

/dev/dsk/c0t0d0s1 32,1 16 1052144 1040784

# mkfile 500m /var/swap
#swap -a /var/swap

#swap -l 看到:

交换文件 dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,1 16 1052144 1040784
/var/swap
- 16 1048560 1036896

#swap -s
总数:分配了 853136k 字节 + 保留 810880k = 已使用 1664016k,158032k 可用

解决了 swap 的问题后,其他启动一些服务时,冒出来的稀奇古怪的问题就都没有了。

服务器 CPU 标志:
root nexus = Sun Enterprise 450 (2 X UltraSPARC-II 400MHz)

再次检查  /var/adm/messages 发现,还是有警报:

WARNING: Sorry, no swap space to grow stack for pid 5291 (httpd)

决定再增加 swap space ,按照以上步骤新添加 512m 后, 决定重新挂 /dev/dsk/c0t0d0s1 分区。

于是 swap -d /dev/dsk/c0t0d0s1
运行一段时间后, 成功删除,但是再次运行  swap -a /dev/dsk/c0t0d0s1   报告:
操作系统故障转储原先被禁用 –
调用 dumpadm(1M) -d 交换以选择新的转储设备
采用 dumpadm -d swap 后报告:
      Dump content: kernel pages
       Dump device: /dev/dsk/c0t0d0s1 (swap)
Savecore directory: /var/crash/NBZHAPP
  Savecore enabled: yes

# swap -l
交换文件             dev  swaplo blocks   free
/var/swap             -       16 1048560 676672
/var/swap2            -       16 1048560 952496
/dev/dsk/c0t0d0s1   32,1      16 1052144 1051120

成功挂接上了。

root@nbzh:/www/freelamp/photo# swap -s
总数:分配了 927984k 字节 + 保留 758584k = 已使用 1686568k,650736k 可用

PHP 的一个 Trick

Monday, March 28th, 2005

有很多的雕虫小技,在管理系统和写程序的时候,都可能遇到。
如果不注意这些雕虫小技的积累,那么我想一个人也很难成长。

安装 Mambo 的时候,需要把 PHP.ini 中  short_open_tag 关闭,但是关闭后,基于 SquirrelMail  的  PHP 邮件系统,不能使用了。 查看 php err 知道是有程序采用了 short_open_tag ,也就是 <?php ?> 的格式中缺少了 php 引起的。修改对应的程序即搞定。

原来在安装 pLog 的时候,也碰到类似的问题,不过不是缺少 php 而是 <?php 后面有个空格。

这些程序,如果在 setcookie,header 之类的函数之前被调用,或者 include ,那么就会报错。

所以,良好的代码风格和兼容性的考虑实际上是很重要的。

新技术,新界面,新博客

Monday, March 28th, 2005

原来的拿来主义的博客,皆搬到了新的门户,现在的博客系统看起来有点空旷。

是啊,经过了多种技术的迁移,系统的性能应该有大幅的提升。

blog.nalai.net 将会是一个博客站。

nalai.net 是原来的拿来的文章。

FreeLAMP.com 还是自己的原创文章。

个人的博客站点,可以继续用  username.nalai.net 访问。

上海常用联系方式

Saturday, March 26th, 2005

主题: 申城常用电话

开门七件事,难免会遇到一点困难。您家里用电用水是否畅通?烧饭、看电视、取暖
家电是否“听话”?出外串门旅游,叫车订票是否得心应手?“有车族”是否有车辆抛锚的烦恼?节日里很多人要进行大采购,您是否有消费投诉的需求呢?今天,我们为您准备了一份本市服务行业常用电话“大礼单”,在假日生活! 有难时会有帮助。

出行
节日中,要出游,要去机场、车站、码头接送友人,可打电话问问航班、车船到达等确切情况

民航虹桥机场问讯:62683659
浦东机场问讯:38484500
大众航空服务有限公司订票热线:65951171
铁路铁路上海站问讯服务热线:63179090
上海西站服务热线电话:52829500
上海南站服务热线电话:64511039
上海地区旅客列车查询电话:16088188
铁路上海站免费订票热线:8008207890
假日列车旅游热线:63250169
铁路投诉热线:56235701上海港客运热线:63260269
如要去浦东机场,1线问讯电话:68346612
2线问讯电话:68346612
3线问讯电话:68346645
航运航运客运问讯:63261261

4线问讯电话:68346830
5线问讯电话:68346830
6线问讯电话:68346645
市民节日用车会增多,可选预约叫车、服务投诉的电话也很多,出租汽车市出租汽车
管理处热线电话:63232150
大众出租叫车电话:82222
强生出租叫车电话:62580000
巴士出租叫车电话:84000(出租车)、63841890(无障碍出租车及大巴、中巴租车)
浦江之星叫车电话:62155555
三电公司车队订车热线:64868640! (普通、空调公交车)
巴士联谊客运总公司租车热线:63904181(普通、空调大客车)、63841456(高级旅游
大巴车)
想坐长途车去外地,事先打听一下车次情况,可打公交长途客运有限公司问讯电话:
56538064
上海市长途汽车有限公司问讯电话:56630230
上海交通高速客运有限公司问讯电话:52768818
上海交通大宇高速客运有限公司问讯电话:64697356
上海巴士长途快捷客运有限公司问讯电话:56538590
现在利用节假日搬运家用品也是常事,需要叫车,搬场或货运租车可打公兴搬场公司
电话:62502222
大众物流有限公司电话:52819090
强生便捷货运公司订货用车电话:62580000
大众便捷货运公司订货用车电话:82222

家庭用品
如今,每家拥有的家庭用品,远远超过“三大件”,节日出了毛病,可打电话找“维修
医生”。

燃气 浦东销售有限公司热线电话:58995899
液化石油气 经营有限公司热线电话:53080500
燃气灶具 蓝宝石燃气器具服务维修中心电话:56308721
海华牌燃气器具服务维修中心电话:65449840
热水器申花牌维修中心热线电话:58353030
白兔牌热水器美能煤气燃气器具技术服务公司电话:63229788
林内牌维修专线:1252(限上海地区)
能率牌技术服务部电话:589! 99888、投诉电话:63065117
燃气器具林内有限公司售后服务中心电话:1252转林内热线
水仙能率牌燃气器具能率有限公司技术服务! 中心电话:56900000
申花牌燃气器具维修中心电话:58353030
吉帝、冬宝牌燃气器具电话:64381091
樱花牌燃气器具电话:6485243964850744
万家乐牌燃气器具维修部电话:56718815
松下牌燃气器具电话:56383676
视频上海牌上海新上广经济发展有限公司服务部电话:62528708或62521658
sva.金星牌上海广电股份有限公司销售中心上门热线:64168108
新科牌江苏新科电子集团公司上海分公司咨询电话:63122643(总)
空调器三菱电机牌热线电话:58523030
上海夏普牌热线电话:64183399、投诉电话:64177771
日立牌咨询热线:(全国)8008203328(上海)52818098
春兰牌春兰上海服务管理中心全国免费热线电话:8008286888、热线电话:56038800
(均24小时开通,春兰产品咨询、安装、保养、回访)
海信牌热线电话:63061111或63071221电冰箱
洗衣机
上菱牌热线电话:8008201890
海尔牌海尔集团热线电话:50544999、8008203999
小天鹅牌维修服务部电话:64705511或64699964
小鸭牌热线电话:65555585
照相机海鸥牌技术服务部电话:6328517763734 917
尼康牌、佳能牌、理光牌、宾得牌、冠龙照相器材公司维修中心电话:63221057

修车
节日里车抛锚、轮胎漏气,别着急,速打市汽车维修管理处热线电话:64030976
强生汽车修理公司急修电话:56060473(进口和国产小轿车抛锚急修或上门修理)
安畅汽车牵引公司24小时热线:1252(外环内机动车抛锚、故障现场牵引、施救、维
修,15分钟至半小时到)
南昌路95号(瑞金路口)宏昌汽配店24小时汽车修理

饮食
饮用水、乳品已成为家庭的长线食品,节日中发生“断档”,可打正广和牌正广和饮用
水有限公司订水热线电话:85818
农夫山泉牌免费订水热线电话:8006205888(早8时-晚8时)
光明牌订奶热线电话:62171717(6时-22时)、网上www.net1717.com
要想请厨师上门做家宴,请拨上海佳宴餐饮服务有限公司厨师上门预订热
线:58777777。

旅游
春节旅游是大热点,会遇到不称心的事,旅游质量监督热线:64393615可接受你的投
诉。要陪亲朋好友逛上海,那么可打十条旅游交通线路问讯电话:64265555
上海锦江观光巴士问讯电话:65287751
大众旅游咨询热线:63531349

房产
节日里呆在家里的时? 58880310
还可以打你家所在区的投诉电话
浦东新区分中心:58880311
黄浦区分中心:58880312、58880313
卢湾区分中心:58880314
静安区分中心:58880315
长宁区分中心:58880316
徐汇区分中心:58880317
普陀区分中心:58880318
闸北区分中心:58880319
虹口区分中心:58880320
杨浦区分中心:58880321
闵行区分中心:58880322
宝山区分中心:58880323
嘉定区分中心:58880324
松江区分中心:58880325
金山区分中心:58880326
青浦区分中心:58880327
奉贤区分中心:58880328
南汇区分中心:58880329
崇明县分中心:58880330

通信
通信,是节假日中亲朋好友相互问候的主要方式,电话打不通、手机有点小毛病,可
打中国电信集团上海市电信公司热线电话:1000
上海电信账务中心服务热线电话:170
上海移动通信有限责任公司客户服务中心电话:1860
中国联通有限公司上海分公司客户服务电话:1001、咨询电话:53080889转8008或
8009、电话报修热线:112

其他
消费者协会投诉电话:12315
价格投诉举! 报电话:12358
环保热线电话:62863110
市容环境卫生投诉热线:52901 111
法律援助中心电话:64221522
浦东新区市民求助热线:58601999
天气预报:121
信息气象服务:221
报时服务:117
查询电话号码:114
查询国内长途电话:116
查询邮政编码:184
水电煤
市给水管理处给水热线:65090015
自来水市北有限公司热线电话:55151515
自来水市南有限公司小郭热线:62581414
自来水浦东有限公司热线电话:58887474
自来水闵行有限公司热线电话:64300183
上水纯净水公司订水热线:65555555(上水牌瓶装、桶装的纯水、山泉水等和上门清
洗或维修饮水机)
电力公司热线电话:63292222
电力公司市东供电公司监督电话:58766334
电力公司市南供电公司监督电话:64855898
市区路灯报修热线电话:6464867064648671
市燃气管理处燃气热线电话:65079898
燃气市北销售有限公司报修电话:83777
“杨代表热线”:56423767
燃气市南销售有限公司热线电话:83777

Premier Wen prompts to build sound financial system

Monday, March 21st, 2005

Premier Wen prompts to build sound financial system
Last Updated(Beijing Time):2005-03-21 11:17

Chinese Premier Wen Jiabao told foreign delegates to the 2005 China Development Forum Sunday that the Chinese government would "unswervingly" promote financial reform, strengthen financial supervision and try to avoid financial risks through reform and system building.

Briefing the delegates on China’s economic situation, Wen called financial reform a "major task" for the Chinese government in 2005 and beyond. "A stable, sound and modernized financial system will surely be built in China," he said.

The Development Research Center of the State Council, the forum’s host, has held six annual meetings.

The 2005 annual session, focusing on China’s role in the world’s economy, attracted senior officials from international organizations, senior executives of multinational corporations, scholars and Chinese government officials.

From:  en.ce.cn

Merrill inks investment bank venture

Monday, March 21st, 2005

Last Updated(Beijing Time):2005-01-28 09:33

Merrill Lynch & Co. said Thursday it would own 33 percent of a new Chinese investment banking venture, joining a small but growing group of global investment houses in the mainland underwriting business.

Merrill, which has been looking for a mainland partner for months, said the joint venture with mid-sized brokerage Huaan Securities would have initial registered capital of 800 million yuan (US$97 million).

The breakdown of contributions for the registered capital was not immediately clear.

Big investment banks including Credit Suisse First Boston, UBS and Citigroup are all eyeing potential joint ventures in China to offer domestic stock and bond underwriting services in an economy that grew 9.5 percent last year.

Last month, the Chinese Government gave Goldman Sachs approval to go ahead with its joint venture with veteran investment banker Fang Fenglei.

Morgan Stanley has had a Chinese joint venture for a decade and French banks BNP Paribas and Credit Agricole also have mainland partnerships.

Merrill said the venture would apply for approval to engage in underwriting domestic securities, trading bonds and advising on mergers and acquisitions.

"Our cooperation with Merrill Lynch will allow us to leverage on the global expertise of one of the most reputable investment banks in the world and develop capabilities which allow us to achieve our mutual business objectives," said Wang Yongping, Huaan chairman.

Huaan has 26 branches and registered capital of US$206 million.

Merrill also has a Chinese asset management joint venture with the Bank of China, with its first mutual fund raising a less-than-expected US$130 million in late 2004.

China’s stock markets are a draw to foreign players seeking to tap the country’s US$1.3 trillion in savings and its A-share market, which rivals Hong Kong as Asia’s second largest.

It seems many investment banks are just trying to keep up with competitors — executives say that if their rivals can offer domestic underwriting as a complementary service, they can’t be left behind.

In December, Goldman said it had won approval from China’s securities regulator to set up an investment banking joint venture called Goldman Sachs Gao Hua Securities, in which it will own the maximum allowable 33 percent.

Goldman is lending Fang, the former head of domestic investment banks Bank of China (International) and China International Capital Corp. (CICC), US$100 million to set up Gao Hua and another US$30 million to capitalize it, sources have said.

Legend Holdings, parent of China’s biggest computer maker Lenovo Group , is also taking a stake in the deal.

“贸易结合度”下降反映中日经济关系已经冷却

Friday, March 11th, 2005

尽管日本方面的统计显示了日本经济正在向中国转移,但中国方面的统计表明中国经济正在与日本渐行渐远。日本经济产业研究所顾问研究员关志雄认为,“贸易结合度”的下降反映出中日经济关系已经冷却。中国作为生产基地和最终产品的市场,其规模正在不断扩大,世界各国都在增加对华贸易。从日本看,虽然对华贸易的增长高于其他地区,但由于不及中国贸易整体的扩大幅度,因此在中国眼里的日本地位相对下降了。实际上,不仅对中国而言,对其他国家而言,日本作为贸易伙伴的重要性都已经大不如前。从“贸易依存度”扣除了对象国在世界贸易中所占比重这一规模因素之后的“贸易结合度”来看,就可以更清楚地发现中日经济关系已经冷却。贸易结合度的定义如下:A国对B国的贸易结合度=(A国对B国进出口总额/A国对世界的进出口总额)/(B国对世界的进出口总额/世界的进出口总额)。按照这一公式,中国对日贸易结合度和日本对华贸易结合度,在上世纪90年代后期以来都呈现下降趋势。这表明一方面中国对日贸易依存度以超过日本占世界贸易比重的缩小幅度下降,另一方面尽管日本对华贸易依存度在提高,却不及中国在世界贸易中所占份额的扩大幅度。也许日趋冷却的政治关系已经对经济关系造成了恶劣影响,从以往的贸易结合度的变化来判断,可以说不仅中国经济正在对日本渐行渐远,而且日本也没有搭上中国经济快车。

银行在新的严厉监管时代面临更多的风险

Tuesday, March 1st, 2005

 Banks Face Added Risks in a Tough New Regulatory Arena

Bankers Trust was an aggressive and entrepreneurial commercial bank
that developed some of the basic risk management tools now used
throughout the banking industry. (It merged with Deutsche Bank in
1999.) "We moved from Keynesianism to monetarism in my career and it
wiped out one whole generation of traders," said Charles Sanford, the
former chairman of Bankers Trust. He added that double-digit inflation
in the 1970s wiped out another group of traders.

His point was that for a bank to manage its risks successfully, it must
make sure that those making decisions within the bank are accurately
gauging the environment around them. If their assumptions about
significant changes in the markets are wrong or outdated, they are
liable to make bad decisions.

"Judgment and Character"

Sanford made these remarks at a recent Wharton conference called
"Financial Risk Management in Practice: The Known, the Unknown and the
Unknowable," which brought together academics and industry participants
to discuss how risk is seen in different parts of the financial system,
including banking, financial policy-making, asset management and
insurance. The conference was co-sponsored by Mercer Oliver Wyman
Institute, the Alfred P. Sloan Foundation and Wharton’s Financial
Institutions Center. In addition to Sanford, the panel on banking
included investment banker Geoffrey Boisi, and H. Rodgin Cohen,
chairman of international law firm Sullivan & Cromwell and an
expert in bank mergers and acquisitions.

Each speaker focused on different risks that can affect the success of
a bank. Boisi stressed the importance of relationships and
accountability. Developing a culture for success within a bank depends
on the type of people hired, the motivational structure (in effect, the
compensation system), the strength of the review system, and
accountability — and it all starts with leadership, he said. He noted
that the fundamental risks a bank must manage involve human nature. We
can’t develop a "mathematical tool to deal with that," he said. "It
always gets back to judgment and character."

Boisi is a former investment banker who spent 22 years at Goldman
Sachs, 15 of them as a senior managing partner. In 1993, he and three
former colleagues from Goldman formed The Beacon Group, a private
investment firm. Care was taken in creating the partnership structure
to foster the right attitude toward risk. "Each of the original
partners had an equal share in the upside and low current income [at
Beacon] so they were locked in, and capital was maintained inside the
business to engender long-term thinking," Boisi said.

The firm raised an initial $700 million, the largest amount for a
private equity firm at the time, and went on to raise another $1.1
billion. Beacon developed a strong middle-market M&A practice and
money management business, and grew to about 125 employees. When
Goldman went public in November 1999, however, the motivation of some
of Beacon’s executives changed. "They wanted more immediate liquidity
than the agreement we had when we started," said Boisi.

Beacon was acquired by Chase Manhattan Bank in 2000, just before Chase
merged with J.P. Morgan to become the one of the largest global
financial services firms. Boisi became vice chairman of the new entity,
JPMorgan Chase, and co-head of the investment banking division.

Then the "thunderbolts" hit: recession, the tech bubble, the death of
some key leaders within the organization, 9/11, Enron, Tyco, and the
equity research scandal. Dealing with that during a period of bank
consolidation was "an immense challenge, yet we were named bank of the
year, and we instituted, with a lot of bumps in the road, a new risk
management system within the new organization," said Boisi.

He noted that those in risk-taking positions must be accountable for
their decisions. At Goldman, Boisi said, the firm’s partners were
accountable because they had their capital on the line. If there was a
disagreement about, say, underwriting, it would be taken to the
eight-person management committee. At Chase and then JPMorgan Chase, a
different system was in place. "The head of the business line no longer
sat at the table, with bottom-line responsibility [for what went on in
his division]," Boisi said. "That surprised me and was a cause of
friction in my mind philosophically with the senior management there."

Boisi left the bank in 2002. That year, as the pile-up of accounting
scandals continued to grow, the Sarbanes-Oxley Act overhauled corporate
governance. The legislation has had positive effects, Boisi said,
although it has gone too far. "Are we providing the right checks and
balances in looking at the governance structure?" he asked. In his
view, the long-term success of any organization depends on the way
individuals think about risk. "How can you look into the soul of a
relationship and determine if you can trust it?" asked Boisi. From a
risk standpoint, that’s what managers must do, he said.

Countering the Biases

Sanford agreed with Boisi that a bank’s culture must be imposed from
the top down. He emphasized the importance of understanding how people
think and make decisions, particularly under stressful conditions. "We
rely much, much too much on what we think we know," he said. "We should
always be more skeptical than we are."

Inertia and proprietary attitudes toward a department or group are also
risks. In Sanford’s view, one way to get around that is to move people
around within a bank. Moreover, intellectual agility must be
encouraged. "We recruit and train people under an existing environment
at that time," he said. But times change, and that makes it critical
for managers to continually "be judging their people’s understanding of
the current environment."

"We ought to treat people doing risk management like pilots in
airlines," Sanford suggested. "Every X period of time, at a minimum of
once a year, have them go down and sit in a simulator and see if
they’re up to speed and see if they understand what we think the
environment is." If not, all the available analysis and quantitative
modeling won’t counter the biases individuals carry with them.

At the same time, Sanford noted that risk management has become more
sophisticated in recent years. Faster communications and the increase
in computing power have "allowed us to transform a stream of data into
usable information we couldn’t possibly [have had] before, and it
creates more knowns," he said. The focus on the risks a bank’s
institutional customers face, the use of probabilities and data
analysis, and the tailoring of financial products to meet clients’
needs — all this helps banks innovate and improve their business, he
added.

Sanford made a number of other observations: It’s important for a
bank’s traders not to be too confident of a model’s forecasts about
market conditions more than two weeks out. Banks should be
over-capitalized, especially as they increase in size, because of
liquidity concerns. Banks should have a risk management committee on
the board of directors, and the CEO should be the top risk manager. On
the subject of compensation, he pointed out that it can serve as a
rough check on risk. What’s key is the "size of the bonus and the
computation — is it asymmetrical? So often it’s heads he wins, tails I
lose," he said.

Cohen took a different approach to risk in the banking industry, noting
that the risk that looms largest is the uncertainty surrounding the
current regulatory environment. Cohen is one of the country’s experts
on banking M&As and regulatory issues. Over the last two decades,
he has been involved in most of the major mergers between banks.

He outlined the risk succinctly: "What is known today is that the
regulatory environment is far more stringent and unpredictable. What is
unknown is what impact this regulatory environment will have on the
banking industry, including consolidation. What’s unknowable is the
impact of this environment on individual institutions because of the
randomness of the process."

From Collaborative to Confrontational

Over the last few years, bank supervision has "moved from a regulatory
approach that was collaborative to one that is confrontational, from
market-oriented to prescriptive," he said. Regulators have become more
hard-nosed. They search more aggressively for violations, mete out
stiffer punishment, and treat bad judgment and mistakes "as worthy of
severe sanction," he said. "They reject common practice or the absence
of prior criticism as a defense."

In Cohen’s view, banking institutions are especially vulnerable to the
current combination of tough laws and "subjective judgment" for two
reasons. First, banks face a "multiplicity of regulators." They deal
with federal bank regulators, state bank regulators, FinCen (the
Treasury Department’s Financial Crimes Enforcement Network), the
Securities and Exchange Commission and the Commodity Futures Trading
Commission, as well as foreign regulators. This creates a complex and
overlapping network of regulation. The second reason banks are
vulnerable is the "criminalization of the banking law," noted Cohen.
Until a couple of years ago, bank regulatory agencies were the primary
overseers of banks. That’s no longer the case. "Law enforcement
[agencies] now see themselves as having direct and primary jurisdiction
over violations of banking law," he said.

An example of the increasing stringency is the hardening of compliance
standards associated with the Bank Secrecy Act. The BSA was amended by
the USA Patriot Act of 2001 to combat money laundering and terrorist
financing. There are now "more rigorous BSA examinations, more
stringent standards, harsher criticism, and more automatic applications
of sanctions," Cohen said. Failure to maintain a robust BSA program "is
today a truly franchise-threatening matter."

This shift could affect the trajectory of the banking industry. An
enforcement order could result "in a ban on acquisitions for a period
of time — until the [enforcement] order is lifted," said Cohen. A
criminal prosecution would up the ante. So far, banks have avoided
criminal prosecution by entering into deferred prosecution agreements,
but "if the Department of Justice insists on a guilty plea, it is far
from clear that the banking organization could survive — at least as
an independent entity." At its extreme, a conviction of a
money-laundering offense would require the FDIC to determine whether
the bank should lose its federal deposit insurance.

Cohen ended with a plea: that regulators and law enforcement agencies
distinguish between violations arising from mistakes or negligence and
deliberate transgressions of the law. "In the absence of clearly stated
prior regulatory criticism, remedies should be prospective and
structural, as opposed to being retroactive and punitive," he said.
Echoing one of Sanford’s earlier points, he added that bank executives
should be careful about what they think they know since a changing
environment can leave them operating under outdated assumptions.