旌旗博客

2008-05-16

自动短信提醒进行服务器状态告警

归类于: I.T. — 标签:, — rocky @ 16:22

定时启动的脚本:

df | grep “/var” | awk ‘{ print $5 }’ | awk -F”%” ‘{print $1}’ | awk ‘{ if ($1 > 90){print “alert.sh \”139xxxxxxxx\” \”insufficient disk space on /var. “,$1,”\”"} }’ | csh
ps -ef | grep httpd | grep -v cronolog | grep -v grep | grep -v root | wc -l | awk ‘{ if ($1 > 3000){print “alert.sh \”139xxxxxxxx\” \”apache process “, $1,”\”"} }’ | csh
echo ’show processlist’ | mysql | grep -v Id | grep -v processlist | wc -l | awk ‘{ if ($1 > 3000){print “alert.sh \”139xxxxxxxx\” \”mysql process “, $1,”\”"} }’ | csh

alert.sh 脚本:

echo $2
echo -e “From:monitor<>\nReply-to:support <support.labs@etentec.com>\nSubject:$2\n\n$2\n.” | /usr/sbin/sendmail $1@139.com

一个监视服务器状态的shell脚本

归类于: I.T. — 标签:, — rocky @ 14:03

#! /bin/bash

for1
do
    clear
    date
    echo -n ‘httpd process:             ‘;ps -ef | grep httpd | grep -v cronolog | grep -v grep | grep -v root | wc -l
    echo -n ‘http connection:   ‘;netstat -an | grep :80 | grep ESTABLISHED | wc -l
    echo -n ‘mysql process:             ‘;echo ’show processlist’ | mysql | grep -v Id | grep -v processlist | wc -l
    echo -n ‘mysql connection:  ‘;netstat -an | grep 3306 | grep ESTABLISHED | wc -l
    echo ‘tcp connection stats:’;netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print “   “,a, S[a]}’
    echo ’sorted ESTABLISHED connections: ‘;netstat -na|grep ESTABLISHED|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r +0n
    echo ’sorted SYN connections: ‘; netstat -na|grep SYN|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r +0n
    sleep 5
done

  1. ; ; []

2007-12-20

招聘信息

归类于: 未分类 — rocky @ 14:40

1. 网站平面设计师。
2. 网站PHP开发工程师。

工作地点都在北京。

Make Source In Sight Supports PHP language

归类于: I.T. — 标签: — rocky @ 14:38

Import the attachment in the language option dialog of Source in sight. Passed for Source in Sight 3.50.
php-script.zip

2007-07-31

两则招聘启示

归类于: I.T. — rocky @ 11:39

1、精通MTK、展讯平台应用开发的技术总监,工作地点:深圳

2、具有2年C/C++工作经验的工程师,工作地点:新加坡或北京

2007-07-13

猎头

归类于: I.T. — rocky @ 11:19

    一个猎头机会,我觉得还是不错的,有意的朋友可以联系一下。

 

Title: Software Development Engineer Lead

We’re looking for the next generation of leaders to help define and lead the next era of innovation. It’s an exciting time to be at Center – especially if you’re an innovator leading the way. At Center of the company China R&D in Beijing, you get to experience the energy of a start-up company and the resources of the most successful software company in the world. Your potential is limitless. Come to enjoy the thrill of designing a great product and the rush of developing it with people as passionate as you. 
Center ICE (Innovation, Consumer, and Emerging) team is working on several projects and products that will define a new category of applications, next generations of services, and innovative solutions in Consumer space (Education, HealthCare and New application and experience). We are looking for talented Development Leads with great leadership skills and a passion for agility, quality, efficiency, and the desire and ability to learn new techniques and drive innovation. We invite you to lead and/or build dedicated team of high-caliber individuals who greatly enjoy working together as we deliver on our technology across both Developed and Emerging markets. 

The primary responsibilities include: recruiting, building, mentoring and maintaining a high performance team; working closely with other teams in Program Management and Test as well as with Product Design; driving sound architecture, design, and implementations; ensuring designs and implementations meet quality, performance, scale, and manageability requirements as well as cross team dependencies; initiating, promoting and implementing engineering best practices; project planning and tracking for your team.

As a successful candidate,

  • You should demonstrated success in building a strong development team, mentoring, delivering excellence in code quality and engineering process.
  • You must be a respected development leader with a proven track record of shipping products through multiple product cycles while dealing with challenges such as cross-team dependencies, rapid shipping schedules, being able to analyze diverse requirements and make recommendations as to implementation strategies and estimate development costs.
  • You must have strong communication skills (verbal and written).
  • You should also have solid fundamental computer science skills and have a passion for cutting-edge technologies.
  • You need to be proficient in at least two of the following: C#, ASP.net, JScript/Javascript, AJAX, Web Service/SOAP, WPF, Server application and Web protocols.
  • Experience with C++/Win32, SQL, SharePoint technology, and a solid background in Computer Science are all big pluses.
  • BS/MS in Computer Science or Engineering, or equivalent are required. Travel to Redmond may be required.

2007-04-27

你把公司当什么?

归类于: Life — rocky @ 15:26

       联想又要裁员了,上次裁员的时候,有位员工写了篇《联想不是家》打动了很多联想人的心。每位职场中人可能都想过:“我把公司当什么”。

       我想,首先公司不是家。对于绝大部分人来说,家是个温馨安全的港湾,你哪都去不了的时候,家总能包容你。而公司的文化再怎么追求人文,一旦经营不善就可能什么都不是。

       很多人想创业,要追求自己的事业,为什么在公司就找不到自己的事业呢?作为员工来说,如果公司是你的家,你作为家庭成员应该想方设法把你的家建设好;如果你只是把公司当作赚生活费的地方,得过且过就行了。个人认为在很多公司里采取第二种想法的人应该是占很大一部分的。

       其实对于很多公司经营的人来说,不管是不是老板,都有一种认同感,这种认同感并不完全在于薪酬、股权等利益上,而是公司提供了一个供他事业发展的平台。尤其体现在有活力的小公司里,在这样的公司里,每个人都能找到自己的位置,为集体作出最大的贡献。所有的有希望的公司都非常看重有激情的员工,这些员工都是公司的核心价值。所有的有希望的公司都注重给员工个体和集体提供共同发展的平台,这样的平台是公司的支柱

       公司是你个人事业发展的平台,你的成功源于此,你的失败公司帮你顶住。那么,你把公司当作什么?

2007-04-17

真实手机上的JAVA系统的BUG

归类于: I.T. — 标签: — rocky @ 23:33

       按照J2ME规范写了J2ME程序,可是部署到真实手机上,稀奇古怪的问题就会出来,别大惊小怪,写JAVA虚拟机的也是普通人,照样会犯错。在此列举一些,以供后来者踩着先驱者死掉的无数脑细胞前仆后继。

       1、中文问题:Nokia 6681上在Alert的内容中的中文都显示为“口”,而标题则正常。其余的控件也有类似的问题,即title可中的中文正常,string或者text中的中文显示为“口”。在Nokia 6600上,JAD中不能使用中文,否则直接告诉安装失败。

       2、Alert显示问题:Nokia 6600上,Display.setCurrent(Alert alert, Displayable nextDisplayable)工作不正常,可直接使用Display.setCurrent(Alert alert),然后在程序中响应alert的dismiss消息,显示下一个Displayable。6600上还有好多古怪的问题的,可以到nokia网站上去搜一下Known Issues In the Nokia 6600的这篇文档看看。

      3、WMA发送短信问题:忘了在哪个手机上用一个正数端口发送不了短信了,什么反应都没有,也没有Exception。而在MOTO E680i上,不能用端口0发送短信,没有任何Exception,把send调用注释掉之后终于看到Exception了:端口只能是1到65535之间。

      4、Nokia 8800上打包引起的问题参见:jar打包引起J2ME程序安装失败

2007-04-14

jar打包引起J2ME程序安装失败

归类于: I.T. — 标签: — rocky @ 12:28

  使用这种方式进行J2ME程序打包:

jar cvmf classes.jar mymanifest -C foo/ .

仍可以生成貌似很正常的jar文件,并且在大多数的手机上可以正常安装运行,然而在Nokia 8800手机上会报告“应用程序无效”。正确的打包方法应该是:

jar cvfm classes.jar mymanifest -C foo/ .

关于-f和-m参数顺序说明在jar的帮助信息中是这样说明的:

用法:jar {ctxu}[vfm0Mi] [jar-文件] [manifest-文件] [-C 目录] 文件名 …

清单(manifest〕文件名和存档文件名都需要被指定,按’m’ 和 ‘f’标志指定的相同顺序。

2007-04-13

faad2 2.5 decodec error message in ffmpeg

归类于: I.T. — 标签: — rocky @ 12:55

If you got error message like this:

[aac @ 0x53cde8]FAAD library: cannot resolve faacDecGetErrorMessage in libfaad.so.0!

That means ffmpeg could not load faacDecGetErrorMessage symbol from libfaad.so.0 library. First you should comfirm that libfaad.so.0 library is located in the path which are defined by the LD_LIBRARY_PATH environment variable.  Second, this problem may caused by the changes of faad2 upgrading. You can edit this file libavcodec/faad.c:

line 222:

do { static const char* n = “faacDec” #a; \

Modify it as below:

do { static const char* n = “NeAACDec” #a; \

« 上一页下一页 »

Powered by WordPress