博主资料

留言短消息 加为好友 收藏

用户ID:  47890
昵称:  nginx
来自:  山东 聊城
年龄:  保密

好友(0)

首页 前页 后页 尾页
1页,共 0 页

最近访问

圈子信息

最新评论

个人统计

用户名: nginx
等级: 普通百姓
威望: 0
在线时间: 0 小时
日志总数: 23
评论数量: 0
访问次数: 28840
建立时间: 2009-02-14
RSS订阅       手机访问

日历

2012 - 5
  12345
6789101112
13141516171819
20212223242526
2728293031  
«» 2012 - 5 «»

日志文章列表

2009年04月24日 10:26:40

nginx命令行参数 Usage: nginx [-?hvVt] [-s signal] [-c filename] [-g directives]

Usage: nginx [-?hvVt] [-s signal] [-c filename] [-g directives]
Options:
  -?,-h        : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -s signal    : send signal to a master process: stop, quit, reopen, reload
  -p prefix    : set prefix path
  -c filename  : set configuration file
  -g directives : set global directives out of configuration file

类别: Nginx |  评论(0) |  浏览(2077) |  收藏
2009年04月05日 23:41:07

Fix missing trailing slash char on folders RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

#Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

类别: etc. |  评论(0) |  浏览(730) |  收藏
2009年03月19日 08:07:59

[PATCH] crypt_r():unix uclibc does not have crypt_r

From:      Timothy Redaelli <drizzt () gentoo ! org>

in src/os/unix/ngx_linux_config.h you assume that linux always has crypt_r().

It is not true, only glibc has crypt_r.
I attach a patch that add an auto/feature check to find when you have crypt_t
function.

The patch work also on 0.7.43 version


--- nginx-0.7.42.orig/auto/os/linux
+++ nginx-0.7.42/auto/os/linux
@@ -121,3 +121,14 @@
ngx_feature_test="long mask = 0;
                  sched_setaffinity(0, 32, (cpu_set_t *) &mask)"
. auto/feature
+
+# crypt_r()
+
+ngx_feature="crypt_r()"
+ngx_feature_name="NGX_HAVE_GNU_CRYPT_R"
+ngx_feature_run=no
+ngx_feature_incs="#include <crypt.h>"
+ngx_feature_path=
+ngx_feature_libs=
+ngx_feature_test="struct crypt_data  cd;"
+. auto/feature
--- nginx-0.7.42.orig/src/os/unix/ngx_linux_config.h
+++ nginx-0.7.42/src/os/unix/ngx_linux_config.h
@@ -94,11 +94,6 @@
#endif


-#ifndef NGX_HAVE_GNU_CRYPT_R
-#define NGX_HAVE_GNU_CRYPT_R        1
-#endif
-
-
#ifndef NGX_HAVE_INHERITED_NONBLOCK
#define NGX_HAVE_INHERITED_NONBLOCK  0
#endif

类别: Nginx |  评论(0) |  浏览(437) |  收藏
2009年03月09日 18:55:12

Nginx0.7.40开始location,alias,server_name全面支持正则表达式(附例子)

Examples, alias:

    location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
        alias  /data/w3/images/$1;
    }


server_name:

server {
    server_name  ~^(www\.)?(.+)$;

    location / {
        root  /sites/$2;
    }
}

server {
    server_name  _; # nonexistent name

    location / {
        root  /sites/default;
    }
}


--
Igor Sysoev

类别: Nginx |  评论(0) |  浏览(1327) |  收藏
2009年03月08日 21:41:43

网址URL中的空格问题 Nginx对URL空格的处理方式 和设置方法

It is important to know that NGINX does the comparison not URL encoded, so if you have a URL like "/images/%20/test" then you should USE "/images/ /test"(Just a space for %20) to determine the location.

在配置nginx.conf文件时注意,NGINX在匹配网址时将会使用未进行URL编码的URL地址,所以,假设你有一个URL 链接是“/images/%20/test.gif”, 那么你需要使用“images/ /test.gif”来匹配它,而不是使用带%20的(空格的URL编码是%20)。

类别: Nginx |  评论(0) |  浏览(1211) |  收藏
2009年03月08日 09:48:30

nginx启动脚本service nginx does not support chkconfig问题[转]

    因为这2天要安装nginx服务器,但nginx官方没有提供启动脚本,只好自己写一个启动脚本,但是在写完脚本的时候想使用service启动该服务,提示出错了。

nginx启动脚本如下:

#!/bin/bash
# Startup script. for the nginx Web Server
# description: nginx is a World Wide Web server. It is used to serve
# HTML files and CGI.
# processname: nginx
# pidfile: /usr/local/nginx/logs/nginx.pid
# config: /usr/local/nginx/conf/nginx.conf
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
NGINX_HOME=/usr/local/nginx/sbin
NGINX_CONF=/usr/local/nginx/conf
PHP_HOME=/usr/local/php-fcgi/bin
if [ ! -f "$NGINX_HOME/nginx" ]
then
    echo "nginxserver startup: cannot start"
    exit
fi
case "$1" in
    'start')
        $PHP_HOME/spawn-fcgi -a 127.0.0.1 -p 10080 -C 20 -u nobody -f $PHP_HOME/php-cgi
        $NGINX_HOME/nginx -c $NGINX_CONF/nginx.conf
        echo "nginx start successful"
        ;;
    'stop')
        killall -TERM php-cgi
        killall -TERM nginx
        ;;
esac

[root@node1 ~]# chkconfig --add nginx
service nginx does not support chkconfig

很是奇怪,后经过查找资料,发现如果想添加脚本用service启动,必须要脚本里面包含这2行:

# chkconfig: - 85 15
# description: nginx is a World Wide Web server. It is used to serve

其他的都不所谓,只是个注意而已!!!

修改后的nginx启动脚本(正确的脚本):

#!/bin/bash
# Startup script. for the nginx Web Server
# chkconfig: - 85 15
# description: nginx is a World Wide Web server. It is used to serve
# HTML files and CGI.
# processname: nginx
# pidfile: /usr/local/nginx/logs/nginx.pid
# config: /usr/local/nginx/conf/nginx.conf
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
NGINX_HOME=/usr/local/nginx/sbin
NGINX_CONF=/usr/local/nginx/conf
PHP_HOME=/usr/local/php-fcgi/bin
if [ ! -f "$NGINX_HOME/nginx" ]
then
    echo "nginxserver startup: cannot start"
    exit
fi
case "$1" in
    'start')
        $PHP_HOME/spawn-fcgi -a 127.0.0.1 -p 10080 -C 20 -u nobody -f $PHP_HOME/php-cgi
        $NGINX_HOME/nginx -c $NGINX_CONF/nginx.conf
        echo "nginx start successful"
        ;;
    'stop')
        killall -TERM php-cgi
        killall -TERM nginx
        ;;
esac


[root@node1 ~]# chkconfig --add nginx
ok ,没有错误提示,说明添加成功!启动下看看,

[root@node1 ~]# service nginx stop
/sbin/service: line 68: 18616 Terminated              env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
[root@node1 ~]# service nginx start
spawn-fcgi.c.190: child spawned successfully: PID: 18624
nginx start successful

大功告成!

类别: Nginx |  评论(0) |  浏览(1472) |  收藏
2009年03月06日 13:48:11

一条Apache规则转换到nginx的rewrite的例子

> These are rewrite rules for apache:
>
> RewriteBase /
> RewriteCond %{REQUEST_URI}    !\.(gif|jpeg|png|jpg|bmp)$
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . index.php [L]
>
> How to change these rules for nginx?

If you use FastCGI and nginx 0.7.x:

location / {
    try_files      $uri  $uri/  @php;
}

location ~ \.(gif|jpe?g|png|bmp)$ {
}

location @php {
    fastcgi_pass  ...;

    fastcgi_param  SCRIPT_FILENAME  /path/to/index.php;

    ... other fastcgi_param
}


--
Igor Sysoev

类别: Nginx |  评论(0) |  浏览(635) |  收藏
2009年03月03日 22:17:39

ubuntu开启ssh服务[转]

网上有很多介绍在Ubuntu下开启SSH服务的文章,但大多数介绍的方法测试后都不太理想,均不能实现远程登录到Ubuntu上,最后分析原因是都没有真正开启ssh-server服务。最终成功的方法如下:
sudo apt-get install openssh-server
Ubuntu缺省安装了openssh-client,所以在这里就不安装了,如果你的系统没有安装的话,再用apt-get安装上即可。
然后确认sshserver是否启动了:
ps -e |grep ssh
如果只有ssh-agent那ssh-server还没有启动,需要/etc/init.d/ssh start,如果看到sshd那说明ssh-server已经启动了。
ssh-server配置文件位于/ etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务:
sudo /etc/init.d/ssh resar
ssh连接:ssh testuser[url=mailto:testuser@127.0.0.1]@127.0.0.1[/url]
断开连接:exit

类别: etc. |  评论(0) |  浏览(1124) |  收藏
2009年03月02日 10:08:43

rewrite rule sample of Niginx from Apache

> I tried to change the following apache rewrite to work under nginx. But it's
> still not working.
>
> RewriteEngine On
> RewriteBase /
> RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$
> auction.php?title=$1&item=$2&country=$3&ccid=$4
> RewriteRule ^item-(.*)_(.*)_(.*).html$
> auction.php?title=$1&item=$2&country=$3
> RewriteRule ^item-(.*)_(.*).html$ auction.php?title=$1&item=$2
>
> Could anyone teach me how can I do it correctly? Thanks a lot.

Igor Sysoev, author of the Nginx, reply:
      location /item- {
          rewrite  ^/item-(.*)_(.*)_(.*)_(.*).html$
                    /auction.php?title=$1&item=$2&country=$3&ccid=$4
                    last;

          rewrite  ^/item-(.*)_(.*)_(.*).html$
                    /auction.php?title=$1&item=$2&country=$3
                    last;

          rewrite  ^/item-(.*)_(.*).html$
                    /auction.php?title=$1&item=$2
                    last;
      }

类别: Nginx |  评论(0) |  浏览(535) |  收藏
2009年02月27日 23:20:46

Cygwin的常用命令

基本操作命令:
------------------------------------
ls #以默认方式显示当前目录文件列表
ls –a #显示所有文件包括隐藏文件
ls –l #显示文件属性,包括大小,日期,符号连接,是否可读写及是否可执行
ls --color=never *.so > obj #不显示文字颜色,将所有so文件记录到obj文件中

------------------------------------
cd dir #切换到当前目录下的dir目录
cd / #切换到根目录
cd .. #切换到到上一级目录
cd ../.. #切换到上二级目录
cd ~ #切换到用户目录,比如是root用户,则切换到/root下

------------------------------------
rm file #删除某一个文件
rm -fr dir #删除当前目录下叫dir的整个目录

------------------------------------
cp source target #将文件source 复制为 target
cp /root/source . #将/root下的文件source复制到当前目录
cp –av soure_dir target_dir #将整个目录复制,两目录完全一样
cp –fr source_dir target_dir #将整个目录复制,并且是以非链接方式复制,当source目录带有符号链接时,两个目录不相同

------------------------------------
mv source target #将文件source更名为target

------------------------------------
diff dir1 dir2 #比较目录1与目录2的文件列表是否相同,但不比较文件的实际内容,不同则列出
diff file1 file2 #比较文件1与文件2的内容是否相同,如果是文本格式的文件,则将不相同的内容显示,如果是二进制代码则只表示两个文件是不同的
comm file1 file2 #比较文件,显示两个文件不相同的内容

------------------------------------
echo message #显示一串字符
echo "message message2" #显示不连续的字符串
cat:
cat file #显示文件的内容,和DOS的type相同
cat file | more #显示文件的内容并传输到more程序实现分页显示,使用命令less file可实现相同的功能
more #分页命令,一般通过管道将内容传给它,如ls | more

------------------------------------
export LC_ALL=zh_CN.GB2312 #将环境变量LC_ALL的值设为zh_CN.GB2312
export DISPLAY=0:0 #通过该设置,当前字符终端下运行的图形程序可直接运行于Xserver
date #显示当前日期时间
date -s 20:30:30 #设置系统时间为20:30:30
date -s 2002-3-5 #设置系统时期为2003-3-5
clock –r #对系统Bios中读取时间参数
clock –w #将系统时间(如由date设置的时间)写入Bios

------------------------------------
eject #umout掉CDROM并将光碟弹出,但cdrom不能处于busy的状态,否则无效

------------------------------------
du #计算当前目录的容量
du -sm /root #计算/root目录的容量并以M为单位
find -name /path file #在/path目录下查找看是否有文件file
grep -ir “chars” #在当前目录的所有文件查找字串chars,并忽略大小写,-i为大小写,-r为下一级目录

------------------------------------
vi file #编辑文件file
vi 原基本使用及命令:
输入命令的方式为先按ctrl+c, 然后输入:x(退出),:x!(退出并保存) :w(写入文件),:w!(不询问方式写入文件), :r file(读文件file) ,:%s/oldchars/newchars/g(将所有字串oldchars换成newchars) 这一类的命令进行操作

------------------------------------
man ls #读取关于ls命令的帮助
man ls | grep color #读取关于ls命令的帮助并通过grep程序在其中查找color字串

------------------------------------
startx #运行Linux图形有环境
Xfree86 #只运行X图形server

------------------------------------
reboot #重新启动计算机
halt #关闭计算机
init 0 #关闭所有应用程序和服务,进入纯净的操作环境
init 1 #重新启动应用及服务
init 6 #重新启动计算机

------------------------------------
扩展命令
------------------------------------
------------------------------------
tar xfzv file.tgz #将文件file.tgz解压
tar xfzv file.tgz -C target_path #将文件file.tgz解压到target_path目录下
tar cfzv file.tgz source_path #将文件source_path压缩为file.tgz
tar c directory > directory.tar #将目录directory打包成不压缩的directory.tar
gzip directory.tar #将覆盖原文件生成压缩的 directory.tar.gz
gunzip directory.tar.gz #覆盖原文件解压生成不压缩的 directory.tar。
tar xf directory.tar #可将不压缩的文件解包

------------------------------------
dmesg #显示kernle启动及驱动装载信息
uname #显示操作系统的类型
uname -R #显示操作系统内核的version

------------------------------------
strings file 显示file文件中的ASCII字符内容

------------------------------------
rpm -ihv program.rpm #安装程序program并显示安装进程
rpm2targz program.rpm program.tgz #将rpm格式的文件转换成tarball格式

------------------------------------
su root #切换到超级用户
sulogin /dev/tty4 #在tty4即alt+F4终端等待用户登陆或直接登陆开启一个shell
chmod a+x file #将file文件设置为可执行,脚本类文件一定要这样设置一个,否则得用bash file才能执行
chmod 666 file #将文件file设置为可读写
chown user /dir #将/dir目录设置为user所有

------------------------------------
mknod /dev/hda1 b 3 1 #创建块设备hda1,主设备号为3,从设备号为1,即master硬盘的的第一个分区
mknod /dev/tty1 c 4 1 #创建字符设备tty1,主设备号为4,众设备号为1,即第一个tty终端

------------------------------------
touch /tmp/running #在/tmp下创建一个临时文件running,重新启动后消失

------------------------------------
sleep 9 #系统挂起9秒钟的时间

------------------------------------
lpd stop 或 cups stop #停止打印服务程序
lpd start 或 cups start #启动打印服务程序
lpd restart 或 cups restart #重新启动打印服务程序
lpr file.txt #打印文件file.txt

------------------------------------
fdisk /dev/hda #就像执行了dos的fdisk一样
cfdisk /dev/hda #比fdisk界面稍为友好些
mount -t ext2 /dev/hda1 /mnt #把/dev/hda1装载到 /mnt目录
df #显示文件系统装载的相关信息
mount -t iso9660 /dev/cdrom /mnt/cdrom #将光驱加载到/mnt/cdrom目录
mount-t smb //192.168.1.5/sharedir /mnt -o username=tomlinux,password=tomlinux #将windows的的共享目录加载到/mnt/smb目录,用户名及密码均为tomlinux
mount -t nfs 192.168.1.1:/sharedir /mnt #将nfs服务的共享目录sharedir加载到/mnt/nfs目录
umount /mnt #将/mnt目录卸载,/mnt目录必须处于空闲状态
umount /dev/hda1 #将/dev/hda1设备卸载,设备必须处于空亲状态
sync #将cache中的内容与磁盘同步,在Linux中复制文件,一般要系统空闲才去写文件
e2fsck /dev/hda1 #检查/dev/hda1是否有文件系统错误,提示修复方式
e2fsck -p /dev/hda1#检查/dev/hda1是否有错误,如果有则自动修复
e2fsck -y /dev/hda1#检查错误,所有提问均于yes方式执行
e2fsck -c /dev/hda1#检查磁盘是否有坏区
mkfs /dev/hda1 #格式化/dev/hda1为ext2格式
mkfs.minix /dev/hda1 #格式化/dev/hda1为minix格式文件系统
mfks /dev/hda9 #格工化/dev/hda9为Linux swap格式
swapon /dev/hda9 #将swap分区装载当作内存来用
swapoff /dev/hda9 #将swap分区卸载

------------------------------------
lilo #运行lilo程序,程序自动查找/etc/lilo.conf并按该配置生效
lilo -C /root/lilo.conf #lilo程序按/root/lilo.conf配置生效
grub #在Linux shell状态下运行boot loader设置程序
grub-install #安装grub磁盘引导程序,成功后升级内核无须像lilo一样要重新启动系统,只需修改/etc/grub.conf即可实现新引导配置
rdev bzImage #显示kernel的根分区信息
rdev bzImage /dev/hda1 #将kernel的根分区设置为/dev/hda1,这在没有lilo等引导程序的系统中非常重要.

------------------------------------
dd if=/dev/fd0 of=floppy.fd #将软盘的内容复制成一个镜像,功能与旧石器时代常用的hd-copy相同
dd if=/dev/zero of=root.ram bs=1024,count=1024 #生成一个大小为1M的块设备,可以把它当作硬盘的一个分区来用
mkfs root.ram #将块设备格式化为ext2格式
dd if=root.ram of=/dev/ram0 #将init.rd格式的root.ram的内容导入内存
mount /dev/ram0 /mnt #ramdisk /dev/ram0装载到/mnt 目录

------------------------------------
gcc hello.c #将hello.c编译成名为a.out二进制执行文件
gcc hello.c -o hello #将hello.c编译成名为hello的二进制执行文件
gcc -static -o hello hello.c #将hello.c编译成名为hello的二进制静态执行文件
ldd program #显示程序所使用了哪些库
objcopy -S program #将程序中的符号表及无用的调试信息去掉,可以小很多

------------------------------------
strace netscape #跟踪程序netscape的执行,看调用的库,环境变量设置,配置文件,使用的设备,调用的其它应用程序等,在strace下,程序干了什么东东一目了然。
ps #显示当前系统进程信息
ps –ef #显示系统所有进程信息
kill -9 500 #将进程编号为500的程序干掉
killall -9 netscape #将所有名字为netscape的程序杀死,kill不是万能的,对僵死的程序则无效。
top #显示系统进程的活动情况,按占CPU资源百分比来分
free #显示系统内存及swap使用情况
time program #在program程序结束后,将计算出program运行所使用的时间

------------------------------------
chroot . #将根目录切换至当前目录,调试新系统时使用
chroot /tomlinux #将根目录切换至/tomlinux目录
chroot /tomlinux sbin/init #将根目录切换至/tomlinux并执行sbin/init
adduser id #增加一个叫id的用户
userdel id #增除叫id的用户
userlist #显示已登陆的用户列表
passwd id #修改用户id的密码
passwd -d root #将root用户的密码删除
chown id /work #指定/work目录为id用户所拥有

------------------------------------
ifconfig eth0 192.168.1.1 netmask 255.255.255.0 #设置网卡1的地址192.168.1.1,掩码为255.255.255.0,不写netmask参数则默认为255.255.255.0
ifconfig eth0:1 192.168.1.2 #捆绑网卡1的第二个地址为192.168.1.2
ifconfig eth0:x 192.168.1.x #捆绑网卡1的第二个地址为192.168.1.x
ifconfig down eth1 #关闭第二块网卡,使其停止工作
hostname -F tomlinux.com #将主机名设置为tomlinux.com
route #显示当前路由设置情况
route add default gw 192.168.1.1 metric 1 #设置192.168.1.1为默认的路由
route del default #将默认的路由删除
dhcp #启动dhcp服务
dhclient #启动dhcp终端并自动获取IP地址
ping 163.com #测试与163.com的连接
ping 202.96.128.68 #测试与IP 202。96.128.68的连接

------------------------------------
probe rtl8139 #检查驱动程序rtl8139.o是否正常工作
lsmod #显示已装载的驱动程序
insmod rtl8139.o #装载驱动程序rtl8139.o
insmod sb.o io=0x280 irq=7 dma=3 dma16=7 mpu_io=330 #装载驱动程序并设置相关的irq,dma参数
rmmod rtl8139 #删除名为rtl8139的驱动模块
gpm -k #停止字符状态下的mouse服务
gpm -t ps2 #在字符状态下以ps2类型启动mouse的服务

------------------------------------
telnet 192.168.1.1 #登陆IP为192.168.1.1的telnet服务器
telnet iserver.com #登陆域名为iserver.com的telnet服务器
ftp 192.168.1.1 或 ftp iserver.com #登陆到ftp服务

Linux开发中的常用命令(cygwin环境也同样适用)

类别: Cygwin |  评论(0) |  浏览(474) |  收藏
2009年02月27日 09:56:41

1.5.25: pthread/ofstream problem(Cygwin 1.7 also has it)

From mailling list of cygwin.

"Filipek, Stefan R." <sfilipek () mitre ! org> Wrote:
Hello,

I've been trying to track down a segmentation fault that a rather large application \
I'm working on has been experiencing. I have seemed to narrow it down to two threads \
that are opening, appending, and closing files quite often. I've created a very \
simple example program that suffers from the same condition.

Two threads are created, each open up their own unique file, followed by a close (no \
writing, in this example). The threads are both joined and then the processes is then \
repeated. After some indeterminate amount of time - millions of iterations - the \
application segfaults with no real useful information that I can see. Running in gdb \
doesn't seem to help (after compiling with debug flags, of course) as the backtrace \
is either corrupted or can't be followed because I'm not using a debug version of \
Cygwin.

Note that this problem seems to be accelerated by having the target directory open in \
explorer and/or having the files highlighted. I've come across situations where even \
ofstream.open() will throw an exception when doing the above. The exception has been \
seen in both C++ and python, which makes me think it's something fundamental in \
Cygwin, and possibly related to this as well.

Is there something inherently wrong with having different treads access different \
files at once? I have reproduced this issue across multiple machines.


Compile: g++ FileTest.cpp -lpthread -oFileTest

FileTest.cpp:
#include <fstream>
#include <string>
#include <iostream>
#include <pthread.h>

using namespace std;

struct ThreadData {
  string fileName;
};


void *
FileThread(void *arg) {
  try {

    ofstream outfile;
    ThreadData *td = (ThreadData*)arg;
    string fileName = td->fileName;

    try {
      outfile.open(fileName.c_str(), ios_base::app);
    } catch(...) {
      cerr << "Exception during open()" << endl;
      return NULL;
    }

    try {
      outfile.close();
    } catch(...) {
      cerr << "Exception during open()" << endl;
      return NULL;
    }

  } catch(...) {
    cerr << "Exception while creating objects" << endl;
    return NULL;
  }
  return NULL;
}

int
main(void) {
  unsigned long long count = 0;

  ThreadData td1;
  td1.fileName = "temp1.txt";
  ThreadData td2;
  td2.fileName = "temp2.txt";

  while(1) {
    count++;
    if(countP00 == 0) cout << "Iteration " << count << endl;

    pthread_t thread1;
    pthread_t thread2;

    pthread_create(&thread1, NULL, FileThread, &td1);
    pthread_create(&thread2, NULL, FileThread, &td2);

    void *res = NULL;
    pthread_join(thread1, &res);
    pthread_join(thread2, &res);
  }

  // Not reached
  return 0;
}

Stackdump:
Exception: STATUS_ACCESS_VIOLATION at eip=610B5FF2
eax=0D89466C ebx=006A02F0 ecx=61149C88 edx=0D89466C esi=61149C88 edi=006C05C8
ebp=0022CAC8 esp=0022CAB0 program=c:\Documents and \
Settings\sfilipek\test\FileTest.exe, pid 4344, thread main cs=001B ds=0023 es=0023 \
fs=003B gs=0000 ss=0023 Stack trace:
Frame    Function  Args
0022CAC8  610B5FF2  (006A02F0, 00000000, 0022CAE8, 006A02F0)
0022CAE8  610B8B0D  (006A0298, FFFFFFFF, 0022CC98, 006B0508)
0022CC08  610B1E4B  (0022CC20, 0022CC94, 0022CCE8, 610935A8)
0022CC18  610779F8  (006A0298, 0022CC94, 00401150, 0022CCA0)
0022CCE8  610935A8  (00000001, 6116B798, 006A0090, 0022CC70)
0022CD98  610060D8  (00000000, 0022CDD0, 61005450, 0022CDD0)
61005450  61004416  (0000009C, A02404C7, E8611021, FFFFFF48)
    34 [main] FileTest 4344 _cygtls::handle_exceptions: Error while dumping state \
(probably corrupted stack)

Nothing was written to stderr in the end... just the segfault.

Any advice, workaround, etc. would be extremely helpful.

Regards,
Stefan Filipek

uname -a: CYGWIN_NT-5.1 [computer name] 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 \
Cygwin

Dave Korn <dave.korn.cygwin () googlemail ! com> Reply:

Filipek, Stefan R. wrote:

> Note that this problem seems to be accelerated by having the target
> directory open in explorer and/or having the files highlighted. I've come
> across situations where even ofstream.open() will throw an exception when
> doing the above. The exception has been seen in both C++ and python, which
> makes me think it's something fundamental in Cygwin, and possibly related
> to this as well.

  Actually, that makes me think you have BLODA-style interference.

> Potential app conflicts:
>
> ZoneAlarm Personal Firewall
> Detected: HKLM Registry Key, Named file.

  Which version is this?  Is it the full version with antispyware and all
sorts of extra tricks built in?  What anti-virus do you have?

  The stack trace you posted suggests BLODA too:

[ minor munging of paths to simplify
~ $ addr2line --exe /bin/cygwin1.dbg
610B5FF2
/usr/src/cygwin-1.5.25-15/winsup/cygwin/thread.cc:1593
610B8B0D
/usr/src/cygwin-1.5.25-15/winsup/cygwin/thread.h:147
610B1E4B
/usr/src/cygwin-1.5.25-15/winsup/cygwin/thread.h:301
610779F8
/usr/src/cygwin-1.5.25-15/winsup/cygwin/pthread.cc:71
610935A8
??:0
610060D8
/usr/src/cygwin-1.5.25-15/winsup/cygwin/dcrt0.cc:956
61004416
/usr/src/cygwin-1.5.25-15/winsup/cygwin/cygtls.cc:73

  Looking at the top of the stack there:

  1590  pthread_mutex::~pthread_mutex ()
  1591  {
  1592    if (win32_obj_id)
  1593      CloseHandle (win32_obj_id);
  1594
  1595    mutexes.remove (this);
  1596  }

suggests that a plain call to win32.CloseHandle blew up in our faces.  That
really does smack of a bad AV/PFW hook that's messing with handles.

> Is there something inherently wrong with having different treads access
> different files at once?

  No, of course not; any failures are real bugs.  However, nobody's going to
be very likely to fix it in 1.5, so you should definitely see if it reproduces
under 1.7.  If you can't narrow it down to a BLODA, that is.

    cheers,
      DaveK

"Filipek, Stefan R." <sfilipek () mitre ! org> Reply:

> Which version is this?  Is it the full version with antispyware and all
sorts of extra tricks built in?  What anti-virus do you have?

It's using Symantec Endpoint Protection 11.0.2000.1567 - all the bells and whistles.

I blamed AVS at first, but the problem also persists on machines that do not have any \
AVS installed. I double checked and ran another test today on a different machine \
that also ended the same way (exact same spot too), but only at 100k iterations.

But, it should be noted that the stackdump has occurred at different points, in \
different threads (as opposed to main). I can try to provide those if anyone is \
interested.


> > Is there something inherently wrong with having different treads access
> > different files at once?

> No, of course not; any failures are real bugs.

Thank you for the sanity check.


I'll test with 1.7 but I just wanted to say that it's not AVS/PFW to blame here. \
Could it possibly be Windows Explorer itself? Again, it does seem to occur more often \
when an explorer window is open to the output directory, in which it refreshes the \
status of the files being opened/closed every so often.

It would also be nice to know if someone else can reproduce the issue; perhaps just \
leave it running on a computer overnight.

Regards,
Stefan

"Filipek, Stefan R." <sfilipek () mitre ! org> Reply:

Dave Korn wrote:
> you should definitely see if it reproduces under 1.7

I tried the latest 1.7 and it hangs instead of segfaulting (less than 500k \
iterations).

This seems like a pretty major problem for any intensive multithreaded application. \
Though infrequent, it has produced a rather large roadblock.

I may not have much time to devote to this issue, but please let me know if I can \
assist further, as I would like to have this resolved.

Regards,
Stefan


类别: Cygwin |  评论(0) |  浏览(981) |  收藏
2009年02月25日 21:44:35

Only allow certain file extensions to be served by Nginx(Nginx只允许特定后缀的文件被存取的方法)

Nginx只允许特定后缀的文件被存取的方法

    location / {
        ...
    }

    location ~ \.(htm|css|jpg|gif)$ {
        ...
    }

    location ~ \.php$ {
        ...
    }

    location ~ \.[^\.]+$ {
        deny all;
    }

You can use "~*" for case insensitive regex.

类别: Nginx |  评论(0) |  浏览(521) |  收藏
2009年02月19日 19:08:47

File Path of Nginx for Windows Under Cygwin / Nginx Windows版本的网站路径问题

Author: Robert Kwok at lc365 dot net
[阅读提示:中文在底部]
NOTE: This document is for Nginx compiled under Cygwin / GCC.

If your pages were put on Driver C, it's really easy to confige nginx.conf for visitors open your site just follow the examples in original conf/nginx.conf, well, for some reason, we usually did not put our pages on the Driver where Windows System Files lies on, Driver C.
Nginx for Windows Under Cygwin is different from Nginx for Unix-Like System.  Nginx was compiled by GCC under Cygwin, so he cannot recognize Windows Path (e.g. D:/www/) but Cygwin Path (e.g. /cygdrive/d/).
Now, I throw out some examples for your refference,

[NO FASTCGI]

We set D:\www\ for http://www.#yours.com, Driver D for example, other drivers are the same.

Bad:
location / {
            root  D:\www\;
            index  index.html index.htm;
        }

Good:
location / {
            root  /cygdrive/d/www/; # '/cygdrive/d/' equal to  'D:\' in Nginx under Cygwin
            index  index.html index.htm;
        }

If we want to set D:\www\newsB\ for http://www.#yours.com/newsA/, then, we'd better to use alias or rewrite directive of Nginx, something like

location /newsA/ {
            alias /cygdrive/d/www/newsB/;
        }
# Note:The alias directive cannot be used inside a regex-specified location. If you need to do this you must use a combination of rewrite and root.
As above, if we want another Driver's file, set F:\www2\ for http://www.#yours.com/vip/, then will be the following:
location /vip/ {
            alias /cygdrive/f/www2/; #  /cygdrive/f/ for Driver F
        }

[WITH FASTCGI]

As we see, Nginx under Cygwin can only know the Drivers Letter with the format "/cygdrive/d/", treat '/cygdrive/d/' as 'D:\', treat '/cygdrive/e/' as 'E:\', and so on, but if we use fastcgi with Nginx, things comes back. In nginx.conf we should use Cygwin paths (e.g. /cygdrive/d/www) for Nginx and native PHP paths (e.g. D:/www) for PHP scripts.
Sample:
    location ~ .*\.php$ { # Note that usually wrong as former ~ \.php$ , does not run as hoped
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  D:/www$fastcgi_script_name;
        # Here must use Windows native paths (D:/www) for PHP scripts, because
        # PHP is compiled natively and DO NOT know Cygwin paths (/cygdrive/d/www)
        include        fastcgi_params; # Please cut off SCRIPT_FILENAME line in file fastcgi_params
    }

=============================

由于Windows版本的Nginx其实是在Cygwin环境下编译的,所以Nginx使用的是Cygwin的路径格式,所以在Nginx的配置文件nginx.conf中,路径既不能使用*nix的格式,也不能使用Windows系统的格式,而要使用Cygwin的格式,即: C盘的C:\/cygdrive/c/表示,D盘的D:\/cygdrive/d/表示,以次类推。例如:

我们设置访问 http://www.#yours.com 时读取D:\www\
location / {
            root  /cygdrive/d/www/; # '/cygdrive/d/' = 'D:\' in Nginx under Cygwin
            index  index.html index.htm;
        }
如果我们需要在访问 http://www.#yours.com/newsA/ 时读取目录D:\www\newsB\,那么我们需要使用Nginx的alias或rewrite等指令,例如

location /newsA/ {
            alias /cygdrive/d/www/newsB/;
        }
如果我们需要设置访问http://www.#yours.com/vip/ 时读取另一个硬盘上的东西,比如F:\www2\ ,可以这样:
location /vip/ {
            alias /cygdrive/f/www2/; #  /cygdrive/f/ for Driver F
        }
另外需要注意的是,如果你使用了FASTCGI配置PHP,那么设置fastcgi_param  SCRIPT_FILENAME这行的时候,必须使用设置的Windows路径格式,因为这里的参数值是Nginx传递给PHP使用的,而PHP只能识别Windows格式,例:
    location ~ .*\.php$ { # 注意这里老版本用的“~ \.php$”好像有问题
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  D:/www$fastcgi_script_name;
        # 这里必须使用Windows格式路径(D:/www)
        include        fastcgi_params; # 注意fastcgi_params中去掉SCRIPT_FILENAME这行
    }

类别: Nginx for Window |  评论(0) |  浏览(2482) |  收藏
2009年02月19日 14:22:06

An AB Benchmark for Nginx 0.7.35 Compiled under Cygwin/GCC4.4‏

一个随意的测试,Nginx 0.7.35,编译环境:Cygwin 1.7.0 / GCC 4.4

I just take some time to do it for fun.
================================================
Server Side:
A notebook, Celeron CPU 1.06GHz, SD-RAM 256Mb,
Windows XP SP2, Nginx 0.7.35 under Cygwin 1.7.0 compiled by gcc 4.4
In nginx.conf: worker_processes  5; worker_connections  40000;
Client Side:
PC, Celeron CPU 2.40GHz, DDR-RAM 1Gb,
Windows 2003 SP2, ApacheBench 2.0.41-dev.
Internat:
10Mbps bandwith to connect each other.
================================================
C:\>ab.exe -c 64 -n 1000 http://192.168.8.3/lc365_index.html
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.8.3 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        nginx/0.7.35
Server Hostname:        192.168.8.3
Server Port:            80
Document Path:          /lc365_index.html
Document Length:        112492 bytes
Concurrency Level:      64
Time taken for tests:  188.78125 seconds
Complete requests:      1000
Failed requests:        0
Write errors:          0
Total transferred:      112729000 bytes
HTML transferred:      112492000 bytes
Requests per second:    5.32 [#/sec] (mean)
Time per request:      12037.000 [ms] (mean)
Time per request:      188.078 [ms] (mean, across all concurrent requests)
Transfer rate:          585.32 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median  max
Connect:        0  101 329.2    46    3015
Processing:  3188 11771 3441.3  11453  62187
Waiting:      328 1268 911.0  1046  10765
Total:      3453 11872 3444.2  11531  62312
Percentage of the requests served within a certain time (ms)
  50%  11531
  66%  12265
  75%  13234
  80%  13734
  90%  15953
  95%  16640
  98%  18937
  99%  21312
100%  62312 (longest request)

类别: Nginx |  评论(0) |  浏览(861) |  收藏
2009年02月18日 11:12:13

where gcc's includes is in PATH

For unix-like systems where gcc is in PATH.
try to call
#gcc -E -v -x c++ /dev/null
and you will see output like
...
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.1.0
/usr/include/c++/4.1.0/x86_64-suse-linux
/usr/include/c++/4.1.0/backward
/usr/local/include
/usr/include
...
On Windows, Cygwin or MinGW, gcc gives the same output, but it's clear, that paths are incorrect for Windows path conventions.

类别: GCC |  评论(0) |  浏览(469) |  收藏
2009年02月16日 17:35:35

ApacheBench:apache AB测试介绍(本文大部分内容是转发)

简介
ab的全称是ApacheBench,是 Apache 附带的一个小工具,专门用于 HTTP Server 的benchmark testing,可以同时模拟多个并发请求。前段时间看到公司的开发人员也在用它作一些测试,看起来也不错,很简单,也很容易使用,所以今天花一点时间看了一下。
通过下面的一个简单的例子和注释,相信大家可以更容易理解这个工具的使用。
一个简单的例子
ab.exe 命令行参数中,-c 的最大值是64 (我用的是这个数字,写多了不能执行,提示参数错误)
/*在这个例子的一开始,我执行了这样一个命令 ab -n 10 -c 10 http://www.#somedomain.com/这个命令的意思是启动 ab ,向 www.#somedomain.com 发送10个请求(-n 10) ,并每次发送10个请求(-c 10)——也就是说一次都发过去了。跟着下面的是 ab 输出的测试报告,红色部分是我添加的注释。*/
C:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -n 10 -c 10 http://#somedomain.com/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/

Benchmarking #somedomain.com (be patient).....done


Server Software:        NGWS/2.1
Server Hostname:        #somedomain.com
Server Port:            80

Document Path:          /
Document Length:        230 bytes

Concurrency Level:      10
/*整个测试持续的时间*/
Time taken for tests:  3.234651 seconds
/*完成的请求数量*/
Complete requests:      10
/*失败的请求数量*/
Failed requests:        0
Write errors:          0
Non-2xx responses:      10
Keep-Alive requests:    10
/*整个场景中的网络传输量*/
Total transferred:      6020 bytes
/*整个场景中的HTML内容传输量*/
HTML transferred:      2300 bytes
/*大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值*/
Requests per second:    3.09 [#/sec] (mean)
/*大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值*/
Time per request:      3234.651 [ms] (mean)
Time per request:      323.465 [ms] (mean, 根据并发请求)
/*平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题*/
Transfer rate:          1.55 [Kbytes/sec] received
/*网络上消耗的时间的分解,各项数据的具体算法还不是很清楚*/
Connection Times (ms)
              min mean[+/-sd] median  max
Connect:      20 318 926.1    30    2954
Processing:    40 2160 1462.0  3034    3154
Waiting:      40 2160 1462.0  3034    3154
Total:        60 2479 1276.4  3064    3184

/*下面的内容为整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中 50% 的用户响应时间小于 3064 毫秒,60 % 的用户响应时间小于 3094 毫秒,最大的响应时间小于 3184 毫秒*/
Percentage of the requests served within a certain time (ms)
50%  3064
66%  3094
75%  3124
80%  3154
90%  3184
95%  3184
98%  3184
99%  3184
100%  3184 (longest request)

更多信息
ab 不像 LR 那么强大,但是它足够轻便,如果只是在开发过程中想检查一下某个模块的响应情况,或者做一些场景比较简单的测试,ab 还是一个不错的选择——至少不用花费很多时间去学习 LR 那些复杂的功能,就更别说那 License 的价格了。
下面是 ab 的详细参数解释,大家有兴趣的可以研究一下,最近没有足够多的时间研究,如果哪位朋友有兴趣希望可以帮忙翻译一下每个参数的含义,有问题讨论也欢迎在这里回帖 ^_^
相关链接
ab 是 Apache 的一个安装组件,所以需要下载 Apache 安装后才能使用,可以访问 Apache 的项目主页来下载 http://httpd.apache.org/download.cgi
ab 的更多信息可以参加 Apache 主页上的描述
http://httpd.apache.org/docs/2.0/programs/ab.html

类别: etc. |  评论(0) |  浏览(3624) |  收藏
2009年02月15日 23:53:17

导致CPU百分百问题原因?留待考证

这个是从网上看到的,留待考证,认为不对,nginx应该不会陷入死循环。

导致CPU百分百问题原因??
配置404错误时,指定的文件也不存在时,如:
error_page 404 /404.htm
假如并不存在404.htm文件,则会导致死循环。

类别: Nginx |  评论(0) |  浏览(655) |  收藏
2009年02月15日 23:30:00

How to debug Nginx? 如何调试Nginx

You need to build nginx with the option: --with-debug.
Then in nginx.conf, you should write
    error_log  logs/error.log debug;
And you should set
    master_process  off;
    daemon          off;
in nginx.conf to simplify debugging.
Then load some pages to test, and look up the logs/error.log for what happen.

如果需要调试Nginx,你需要增加--with-debug选项重新编译一个Nginx,同时,nginx.conf如下配置:

    error_log  logs/error.log debug; # 只记录调试日志
    master_process  off; # 简化调试 此指令不得用于生产环境
    daemon          off; # 简化调试 此指令可以用到生产环境

类别: Nginx |  评论(0) |  浏览(1377) |  收藏
2009年02月15日 22:51:21

[转]Cygwin的IPv6补丁 cygwin下编译haproxy

作者:肥三ID:FeiSan
http://blog.csdn.net/FeiSan/archive/2008/04/16/2296481.aspx
最近在cygwin下编译安装了不少程序软件,比如nginx、mysql、php、mysql-proxy之类的,基本都很顺利。今天编译haproxy的时候遇到了一些问题。
我下载的是haproxy 1.3.14.4。编译命令:
make TARGET=generic USE_STATIC_PCRE=1

结果抛出这些错误信息
$ make TARGET=generic USE_STATIC_PCRE=1
gcc -Iinclude -Wall -O2 -g      -DTPROXY -DENABLE_POLL -DUSE_PCRE -I/usr/include  -DCONFIG_HAPROXY_VERSION=\"1.3.14.4\"
-DCONFIG_HAPROXY_DATE=\"2008/03/20\" -c -o src/log.o src/log.c
src/log.c: In function `tcp_sess_log':
src/log.c:321: error: `INET6_ADDRSTRLEN' undeclared (first use in this function)
src/log.c:321: error: (Each undeclared identifier is reported only once
src/log.c:321: error: for each function it appears in.)
src/log.c:334: error: `AF_INET6' undeclared (first use in this function)
src/log.c:335: error: dereferencing pointer to incomplete type
src/log.c:363: error: dereferencing pointer to incomplete type
src/log.c:363: error: dereferencing pointer to incomplete type
src/log.c:363: error: dereferencing pointer to incomplete type
src/log.c:363: error: dereferencing pointer to incomplete type
src/log.c:321: warning: unused variable `pn'
make: *** [src/log.o] 错误 1

原因应该是cygwin还不支持ipv6吧。

在google查询了一下,找到一个cygwin ipv6的补丁,下载下来,解压到cygwin安装目录,覆盖掉一些文件。
再编译,提示:
$ make TARGET=generic USE_STATIC_PCRE=1
gcc -Iinclude -Wall -O2 -g      -DTPROXY -DENABLE_POLL -DUSE_PCRE -I/usr/include  -DCONFIG_HAPROXY_VERSION=\"1.3.14.4\"
-DCONFIG_HAPROXY_DATE=\"2008/03/20\" \
              -DBUILD_TARGET='"generic"' \
              -DBUILD_CPU='"generic"' \
              -DBUILD_CC='"gcc"' \
              -DBUILD_CFLAGS='"-O2 -g"' \
              -DBUILD_OPTIONS='"USE_STATIC_PCRE=1"' \
              -c -o src/haproxy.o src/haproxy.c
In file included from /usr/include/sys/socket.h:15,
                from src/haproxy.c:44:
/usr/include/cygwin/socket.h:50:47: cygwin/uio.h: No such file or directory
make: *** [src/haproxy.o] 错误 1
找不到uio.h头文件?奇怪我记得这个文件在cygwin下是有的啊。找了一下,果然在/usr/include/sys下有这个文件,把它复制到/usr/include/cygwin目录下,再编译,O啦。
顺便说一下,我觉得cygwin真是挺强大的。还有,C语言写的东西,跨平台能力真强。

===============================
下面是那个IPv6补丁的网站内容,注意:补丁是和Cygwin的版本密切对应的,补丁直接打在了Cygwin1.DLL等文件上。http://win6.jp/Cygwin/index.html
===============================

Cygwin/w32api 1.5.25-15 IPv6 extension 0.22 (2008/07/05)
FUTURE PLAN AND CURRENT STATUS:
IPv6 additional code should be contributed to Cygwin@redhat tree as soon as possible. However IPv6 code doesn't reach enough to contribute yet. Cygwin supports most of Win32 environments such as Win95/98/Me. However, there are still many problems on these environment. Unfortunately current code has bad effects when running on non-IPv6 environment.
THE LATEST:

PREVIOUS RELEASE:
Cygwin/w32api IPv6 extension provides API subset in RFC2553 using Windows XP or Technology Preview IPv6 by Microsoft. IPv6 extension provides following APIs:
data types and constantsstruct in6_addr
struct sockaddr_in6
struct sockaddr_storage
struct addrinfo
struct in6_addr in6addr_loopback
struct in6_addr in6addr_any
resolver APIsgetaddrinfo()
gai_strerror()
freeaddrinfo()
getnameinfo()
gethostbyname2() (incomplete)
inet_pton()
inet_ntop()
address test functionsIN6_IS_ADDR_LOOPBACK()
IN6_IS_ADDR_UNSPECIFIED()
...
APPLICATION:
IPv6 enabled application list on Cygwin/w32api
BINARY PACKAGE:
IPv6 enabled package list
  • cygwin-1.5.25-15.tar.bz2
  • openssh-5.0p1-1.tar.bz2
Only above packages are prepareed. These installation procedure should be performed after installed original Cygwin kit. Reinstall above packages against original package using netowork install of setup.exe. The URI of IPv6 package is follows.
http://cygwin.win6.jp/cygwin-ipv6/
TODO:
Not implemented features:
  • Compatibility with IPv4 Nodes (mapped address)
  • Name-to-Index
  • Socket Options
    • Set Hop Limit
    • Multicast Operation
  • ioctl operation for IPv6 network interface
  • w32api isn't fully functional
  • On Windows 2000, gethostbyaddr(..., AF_INET6): if address family AF_INET6 is given, it can't return correct hostent.
WARNING:
IPv6 extension is very tentative stage.

类别: Cygwin |  评论(0) |  浏览(1103) |  收藏
2009年02月15日 14:49:00

[转]Cygwin1.dll版本不正确导致cpu占用率过高问题解决

    最近发现服务器总是不工作不正常,cygwinsvr.exe进程cpu占用率过高,因为cygwin装上去以后就没有用过,打算将其删除,可是找了半天没有找到卸载程序,这时才想到毕竟是*nix移植过来的程序。好容易在网上发现的卸载需要在cygwin shell下运行,执行以后报可能存在多个Cygwin1.dll。搜索了一下发现安装的OpenSSH下面还有一个Cygwin1.dll,停止Opensshd服务,删除Cygwin1.dll。执行Cygwin Shell,问题解决,cpu占用率恢复正常。

类别: Cygwin |  评论(0) |  浏览(708) |  收藏
« 1 2» Pages: ( 1/2 total )