ulimit使用简介

src: http://www.chinaitpower.com/2005September/2005-09-13/204427.html

1,说明:
ulimit用于shell启动进程所占用的资源.
2,类别:
shell内建命令
3,语法格式:
ulimit [-acdfHlmnpsStvw] [size]

4,参数介绍:

-H 设置硬件资源限制.
-S 设置软件资源限制.
-a 显示当前所有的资源限制.
-c size:设置core文件的最大值.单位:blocks
-d size:设置数据段的最大值.单位:kbytes
-f size:设置创建文件的最大值.单位:blocks
-l size:设置在内存中锁定进程的最大值.单位:kbytes
-m size:设置可以使用的常驻内存的最大值.单位:kbytes
-n size:设置内核可以同时打开的文件描述符的最大值.单位:n
-p size:设置管道缓冲区的最大值.单位:kbytes
-s size:设置堆栈的最大值.单位:kbytes
-t size:设置CPU使用时间的最大上限.单位:seconds
-v size:设置虚拟内存的最大值.单位:kbytes 5,简单实例:

1]在RH8的环境文件/etc/profile中,我们可以看到系统是如何配置ulimit的:
#grep ulimit /etc/profile
ulimit -S -c 0 > /dev/null 2>&1
这条语句设置了对软件资源和对core文件大小的设置
2]如果我们想要对由shell创建的文件大小作些限制,如:
#ll h
-rw-r–r– 1 lee lee 150062 7月 22 02:39 h
#ulimit -f 100 #设置创建文件的最大块(一块=512字节)
#cat h>newh
File size limit exceeded
#ll newh
-rw-r–r– 1 lee lee 51200 11月 8 11:47 newh
文件h的大小是150062字节,而我们设定的创建文件的大小是512字节x100块=51200字节
当然系统就会根据你的设置生成了51200字节的newh文件.
3]可以像实例1]一样,把你要设置的ulimit放在/etc/profile这个环境文件中.

Read: 750

哦?..被点名了? 点名是啥?

….被流水点名了…真难得…

…点名纳….点名了…..

传递规则:
 1.被传到的博主要珍惜自己百度空间的火炬手机会!复制奥运火炬图!要在自己的博客里写下对奥运的 祝福,然后传给另外一个人1个人,写出自己是第几棒!保留上一棒火炬手的名字!还要到被传百度空间火炬手的博客里留言通知对方——火炬传到你这里了,请往 下传!被点名者不得拒绝传递,完成传递的人将会永远得到大家的祝福。

 2.这个百度空间火炬手要在自己的博客里注明是从哪里接到的火炬,让奥运火炬继续传递下去,不得回传

祝北京奥运一切顺利,中国选手全拿金牌….我入场免门票…&(!@#!^~~~

呵呵…..

那我点谁呢?

恩…第八棒是..:

onlyroslinan 比尔盖茨稀飯

……突然发现我百度上认识的人实在是没几个…算了算了…

Read: 607

Monkeys Audio (APE) for gstreamer 0.10

src:http://www.linuxsir.org/bbs/thread320386.html

内容原文:
可以在rhythmbox和exaile里播放ape文件了。请大家下载测试

我写了一个monkeys audio的gst 0.10的插件,在我这里基本可用了。一年前我跟0.82插件的作者联系过,他比较忙没空移植,我当时写了一个结果总是崩溃,工作上脱不开身就忘记了。最 近想起来仔细阅读了一下gstreamer plugin developer’s guide,参考了flac的代码写了这个 gstmonkeysdec。编译前请安装mac和mac-devel包,在哪装的我也忘了,rpmfind.net找一下吧。

请把代码下载在目录下执行

代码:
$./configure --prefix=/usr
$su -c "make install"

另外需要安装我打过补丁的gstreamer-plugins-base包,补丁也一并奉上。这是因为gstreamer-plugins- good中已经有一个apetag插件,而且在typefind中的优先级极高,会导致rhythmbox等程序优先调用apetag插件匹配 application/x-apetag类型解析apetag,而不是先匹配application/x-ape来调用 gstapemonkeysdec,就放不了歌曲啦。搞笑的是即使调用了它rhythmbox也显示不出ape tag来。。

还存在两个问题:
1、在seeking的时候反应太慢。经过我的测试,每次seeking需要处理两次EVENT_SEEK,每次都要调用libmac里的CIO->Seek,每次Seek耗费cpu 800,000次,折合0.8秒,这样每次seeking需要近两秒的时间,这是libmac的问题,我无法解决了~
2、在rhythmbox里无法显示apetag。我的插件中已经注册了ape的tag并且实现了读取,使用gst-launch播放时可 以显示tag已经正确解析完毕,但是rhythmbox里就不行,可以在以下对比图中看出。还可以看到ogg的tag也显示不了,flac和mp3正常。 不知道rhythmbox是不是有其他的机制没有使用gstreamer的tag接口,谁乐意的话hack一下rhythmbox吧 ^_^

下载地址

http://gforge.oss.org.cn/projects/gstmac/

Read: 1359

[转]如何修复 “Internet Explorer 无法打开 Internet 站点….”

src:http://www.nirmaltv.com/2007/08/08/how-to-fix-internet-explorer-cannot-open-the-internet-site-operation-aborted-error/

How to Fix “Internet Explorer Cannot Open the Internet Site- Operation Aborted” Error

Of late few of my blog readers using Internet explorer pointed out to me that there was some error happening while loading my blog in IE. Around 25% of my readers use Internet Explorer to read my blog. I check my blog frequently in IE and many times I too encountered this error, but initially I thought it was some error in my browser. The error is really frustrating as it shows only in IE and not in Firefox or Opera or any other browser for that matter.

The nature of error is that it shows up when the site is loads completely. This is what you see when the error occurs.

Internet Explorer Error

Once you click OK, the page is replaced with “The Page cannot be Displayed” error. How to fix this error?

A bit of Googling gave me some idea into this error. This error can happen because of many reasons. Microsoft has even a patch for solving this error in IE.

1. This error can happen if Google Map API is present in the code. If you are getting this error because of Google Map API, then the fix for the problem is available here.

2. If you are not using Google API and still getting the error, then it could be because of this reason.

It is not possible append to the BODY element from script that isn’t a direct child to the BODY element

If there are any Javascripts running inside the body tag or inside a table which is directly a child of body, then most of the times this error is bound to happen. The solution is to move the script to the top or bottom of the body tag or even moving it after the body. The script can also be put inside a function and then calling it from window.onload. Another solution to this problem is to add defer=”defer” in the script tag.

I checked my code for scripts which were running inside the body tag and was a direct child to it. Then I moved all my Javascript codes to bottom of the body tag so that it will not interfere while parsing the page. I tested my blog in IE after I made the change and I could see the difference, the error was not happening any more. I checked in different versions of IE to confirm. In case you are using IE and still getting the error on my blog, please do inform me.

Read: 2038