-
Notifications
You must be signed in to change notification settings - Fork 425
/
Copy pathfaq.html
executable file
·140 lines (123 loc) · 16.3 KB
/
faq.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>第 24 章 FAQ</title><link rel="stylesheet" type="text/css" href="/docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><meta name="keywords" content=" cat,chflags,chio,chmod,cp,csh,date,dd,df,domainname,echo,ed,expr,getfacl,hostname,kenv,kill,link,ln,ls,mkdir,mv,pax,pgrep,pkill,ps,pwait,pwd,rcp,realpath,red,rm,rmail,rmdir,setfacl,sh,sleep,stty,sync,tcsh,test,unlink,uuidgen,,/sbin/:,adjkerntz,atacontrol,atmconfig,badsect,bsdlabel,camcontrol,ccdconfig,clri,comcontrol,conscontrol,ddb,devd,devfs,dhclient,dhclient-script,disklabel,dmesg,dump,dumpfs,dumpon,fastboot,fasthalt,fdisk,ffsinfo,fsck,fsck_4.2bsd,fsck_ffs,fsck_msdosfs,fsck_ufs,fsdb,fsirand,gbde,gcache,gconcat,geli,geom,ggatec,ggated,ggatel,gjournal,glabel,gmirror,gmultipath,gnop,gpart,graid3,growfs,gsched,gshsec,gstripe,gvinum,gvirstor,halt,hastctl,hastd,ifconfig,init,ipf,ipfs,ipfstat,ipftest,ipfw,ipmon,ipnat,ippool,ipresend,iscontrol,kldconfig,kldload,kldstat,kldunload,ldconfig,md5,mdconfig,mdmfs,mknod,mksnap_ffs,mount,mount_cd9660,mount_mfs,mount_msdosfs,mount_newnfs,mount_nfs,mount_ntfs,mount_nullfs,mount_udf,mount_unionfs,natd,newfs,newfs_msdos,nextboot,nfsiod,nologin,nos-tun,pfctl,pflogd,ping,ping6,quotacheck,rcorder,rdump,reboot,recoverdisk,restore,rmd160,route,routed,rrestore,rtquery,rtsol,savecore,setkey,sha1,sha256,shutdown,spppcontrol,swapctl,swapoff,swapon,sysctl,tunefs,umount,zfs,zpool 			, addftinfo,addr2line,afmtodit,alias,apply,apropos,ar,as,asa,at,atq,atrm,awk,b64decode,b64encode,banner,basename,batch,bc,bdes,bg,biff,brandelf,bsdcpio,bsdiff,bsdtar,bspatch,bthost,btsockstat,bunzip2,byacc,bzcat,bzegrep,bzfgrep,bzgrep,bzip2,bzip2recover,bzless,c++,c++filt,c89,c99,cal,calendar,cap_mkdb,catman,cc,cd,chat,checknr,chfn,chgrp,chkey,chpass,chsh,ci,cksum,clear,cmp,co,col,colcrt,colldef,colrm,column,comm,command,compile_et,compress,cpio,cpp,cpuset,crontab,crunchgen,crunchide,crypt,csplit,csup,ctags,ctfconvert,ctfdump,ctfmerge,cu,cut,cvs,cvsbug,dc,dialog,diff,diff3,dig,dirname,du,edit,ee,egrep,elf2aout,elfdump,enigma,env,eqn,ex,expand,false,fc,fetch,fg,fgrep,file,file2c,find,finger,flex,flex++,fmt,fold,from,fstat,fsync,ftp,g++,gate-ftp,gcc,gcore,gcov,gdb,gdbtui,gencat,getconf,getent,getopt,getopts,gnu-ar,gnu-ranlib,gperf,gprof,grep,grn,grodvi,groff,grog,grolbp,grolj4,grops,grotty,groups,gunzip,gzcat,gzexe,gzip,hd,head,hexdump,host,hpftodit,id,ident,indent,indxbib,info,infokey,install,install-info,ipcrm,ipcs,jobs,join,jot,kadmin,kdestroy,kdump,keylogin,keylogout,kgdb,killall,kinit,klist,kpasswd,krb5-config,ksu,ktrace,ktrdump,lam,last,lastcomm,ld,ldd,leave,less,lessecho,lesskey,lesspipe.sh,lex,lex++,limits,lint,lkbib,locale,locate,lock,lockf,logger,login,logins,logname,look,lookbib,lorder,lp,lpq,lpr,lprm,lsvfs,lzcat,lzdec,lzless,lzma,lzmainfo,m4,mail,mailq,mailx,make,makeinfo,makewhatis,man,manpath,merge,mesg,minigzip,ministat,mkdep,mkfifo,mklocale,mkstr,mktemp,mkuzip,mmroff,more,msgs,mt,nawk,nc,ncal,ncplist,ncplogin,ncplogout,neqn,netstat,newaliases,newgrp,newkey,nex,nfsstat,nice,nl,nm,nohup,nroff,nslookup,nsupdate,ntpq,nvi,nview,objcopy,objdump,od,openssl,opieinfo,opiekey,opiepasswd,otp-md4,otp-md5,otp-sha,pagesize,passwd,paste,patch,pathchk,pawd,perl,perl5,perror,pfbtops,pftp,pgrep,pic,pkill,post-grohtml,pr,pre-grohtml,printenv,printf,procstat,psroff,quota,ranlib,rcs,rcsclean,rcsdiff,rcsfreeze,rcsmerge,read,readelf,readlink,ree,refer,renice,reset,rev,revoke,rfcomm_sppd,rlog,rlogin,rpcgen,rpcinfo,rs,rsh,rup,ruptime,rusers,rwall,rwho,scp,script,sdiff,sed,send-pr,sendbug,sftp,sgsmsg,shar,showmount,size,slogin,smbutil,sockstat,soelim,sort,split,sscop,ssh,ssh-add,ssh-agent,ssh-keygen,ssh-keyscan,stat,strings,strip,su,sum,systat,tabs,tail,talk,tar,tbl,tcopy,tee,telnet,texindex,tfmtodit,tftp,time,tip,top,touch,tput,tr,troff,true,truncate,truss,tset,tsort,tty,ul,umask,unalias,uname,uncompress,unexpand,unifdef,unifdefall,uniq,units,unlzma,unvis,unxz,uptime,usbhidaction,usbhidctl,users,uudecode,uuencode,vacation,verify_krb5_conf,vgrind,vi,view,vis,vmstat,w,wait,wall,wc,what,whatis,whereis,which,who,whoami,whois,write,xargs,xstr,xz,xzcat,xzdec,xzless,yacc,yes,ypcat,ypchfn,ypchpass,ypchsh,ypmatch,yppasswd,ypwhich,yyfix,zcat,zcmp,zdiff,zegrep,zfgrep,zforce,zgrep,zinject,zless,zmore,znew,ztest,,/usr/sbin/:,IPXrouted,ac,accton,acpiconf,acpidb,acpidump,adduser,amd,amq,ancontrol,arp,asf,audit,auditd,auditreduce,authpf,bcmfw,boot0cfg,bootparamd,bootpef,bootptest,bsnmpd,bt3cfw,bthidcontrol,bthidd,btpand,btxld,burncd,callbootd,cdcontrol,chkgrp,chkprintcap,chown,chroot,ckdist,clear_locks,config,cpucontrol,crashinfo,cron,ctm,ctm_dequeue,ctm_rmail,ctm_smail,daemon,dconschat,devinfo,digictl,diskinfo,dnssec-dsfromkey,dnssec-keyfromlabel,dnssec-keygen,dnssec-signzone,dtrace,dumpcis,editmap,edquota,extattrctl,faithd,fdcontrol,fdformat,fdread,fdwrite,fifolog_create,fifolog_reader,fifolog_writer,fixmount,flowctl,freebsd-update,fsinfo,ftp-proxy,fwcontrol,gensnmptree,getextattr,getfmac,getpmac,gssd,gstat,hccontrol,hcsecd,hcseriald,hlfsd,hostapd,hostapd_cli,hoststat,i2c,iasl,idprio,ifmcstat,inetd,iostat,ip6addrctl,ipfwpcap,jail,jexec,jls,kbdcontrol,kbdmap,keyserv,kgmon,kldxref,kstash,ktutil,l2control,l2ping,lastlogin,lmcconfig,lockstat,lpc,lpd,lptcontrol,lptest,lsextattr,lwresd,mailstats,mailwrapper,makefs,makemap,manctl,memcontrol,mergemaster,mfiutil,mixer,mk-amd-map,mld6query,mlxcontrol,mount_nwfs,mount_portalfs,mount_smbfs,mountd,moused,mptable,mptutil,mtest,mtree,named,named-checkconf,named-checkzone,named-compilezone,named.reconfig,named.reload,ndis_events,ndiscvt,ndisgen,ndp,newsyslog,nfscbd,nfsd,nfsdumpstate,nfsrevoke,nfsuserd,ngctl,nghook,nologin,nscd,ntp-keygen,ntpd,ntpdate,ntpdc,ntptime,ntptrace,pac,pciconf,periodic,pkg_add,pkg_create,pkg_delete,pkg_info,pkg_updating,pkg_version,pmcannotate,pmccontrol,pmcstat,portsnap,powerd,ppp,pppctl,praliases,praudit,procctl,pstat,purgestat,pw,pwd_mkdb,quot,quotaoff,quotaon,rarpd,repquota,rfcomm_pppd,rip6query,rmextattr,rmt,rmuser,rndc,rndc-confgen,route6d,rpc.lockd,rpc.statd,rpc.umntall,rpc.yppasswdd,rpc.ypupdated,rpc.ypxfrd,rpcbind,rrenumd,rtadvd,rtprio,rtsold,rwhod,sa,sade,sdpcontrol,sdpd,sendmail,service,services_mkdb,setextattr,setfib,setfmac,setfsmac,setpmac,sicontrol,smbmsg,snapinfo,sntp,spkrtest,spray,sshd,swapinfo,sysinstall,syslogd,tcpdchk,tcpdmatch,tcpdrop,tcpdump,timed,timedc,traceroute,traceroute6,trpt,tzsetup,uathload,ugidfw,uhsoctl,usbconfig,vidcontrol,vidfont,vipw,wake,watch,watchdog,watchdogd,wire-test,wlandebug,wpa_cli,wpa_passphrase,wpa_supplicant,yp_mkdb,ypbind,ypinit,yppoll,yppush,ypserv,ypset,zdb,zdump,zic,zzz 			, a2p,autoconf,autoconf-2.62,autoconf-wrapper,autoheader,autoheader-2.62,autom4te,autom4te-2.62,autopoint,autoreconf,autoreconf-2.62,autoscan,autoscan-2.62,autoupdate-2.62,autoupdates,c2ph,cjpeg,config_data,corelist,cpan,cpan2dist,cpanp,cpanp-run-perl,curl,curl-config,cxpm,djpeg,dprofpp,enc2xs,encode_keychange,envsubst,eview,evim,exifautotran,find2perl,fixproc,freetype-config,gettext,gettext.sh,gettextize,gm4,gmake,gview,gvim,gvimdiff,gvimtutor,h2ph,h2xs,help2man,iconv,idle3,idle3-3.1,ifnames,ifnames-2.62,instmodsh,ipf-mod.pl,jpegexiforient,jpegtran,libmcrypt-config,libnetcfg,libpng-config,libpng14-config,libtool,libtoolize,makestrs,mib2c,mib2c-update,msgattrib,msgcat,msgcmp,msgcomm,msgconv,msgen,msgexec,msgfilter,msgfmt,msggrep,msginit,msgmerge,msgunfmt,msguniq,mysql,mysql_config,mysql_fix_privilege_tables,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlbug,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest,net-snmp-config,net-snmp-create-v3-user,ngettext,onig-config,pcre-config,pcregrep,pcretest,perl,perl-after-upgrade,perl5,perl5.10.1,perlbug,perldoc,perlivp,perlthanks,php,php-cgi,php-config,phpize,piconv,pkg-config,pl2pm,pod2html,pod2latex,pod2man,pod2text,pod2usage,podchecker,podselect,prove,psed,pstruct,ptar,ptardiff,pydoc3,pydoc3-3.1,python,python-config,python-shared,python-shared-config,python-shared3.1,python-shared3.1-config,python3.1,python3.1-config,rdjpgcom,recode-sr-latin,rgview,rgvim,rpc,rsync,rview,rvim,rzsh,s2p,shasum,snmpbulkget,snmpbulkwalk,snmpcheck,snmpconf,snmpdelta,snmpdf,snmpget,snmpgetnext,snmpinform,snmpnetstat,snmpset,snmpstatus,snmptable,snmptest,snmptranslate,snmptrap,snmpusm,snmpvacm,snmpwalk,spawn-fcgi,splain,sqlite3,sxpm,tclsh8.5,traptoemail,type1afm,vim,vimdiff,vimtutor,wrjpgcom,xgettext,xglyph,xml2-config,xmlcatalog,xmllint,xsubpp,xxd,zsh,zsh-4.3.10,,/usr/local/sbin:,cronolog,cronosplit,lighttpd,lighttpd-angel,lsof,snmpd,snmptrapd 			" /><link rel="home" href="index.html" title="Netkiller FreeBSD 手札" /><link rel="up" href="index.html" title="Netkiller FreeBSD 手札" /><link rel="prev" href="ports.devel.html" title="第 23 章 devel" /><link rel="next" href="su.sorry.html" title="24.2. su: Sorry" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> |
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
<a xmlns="" href="/journal/index.html">杂文</a> |
<a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> |
<a xmlns="" href="http://netkiller-github-com.iteye.com/">ITEYE 博客</a> |
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
<a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> |
<a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> |
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
<a xmlns="" href="/search.html">Search</a> |
<a xmlns="" href="mailto:netkiller@msn.com">Email</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 24 章 FAQ</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ports.devel.html">上一页</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="su.sorry.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=fork&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&type=follow&count=true&size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="faq"></a>第 24 章 FAQ</h1></div></div></div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="section"><a href="faq.html#faq.limit">24.1. Linux用户使用FreeBSD,问FreeBSD ulimit怎么设置?</a></span></dt><dt><span class="section"><a href="su.sorry.html">24.2. su: Sorry</a></span></dt></dl></div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="faq.limit"></a>24.1. Linux用户使用FreeBSD,问FreeBSD ulimit怎么设置?</h2></div></div></div>
<p>首先说明FreeBSD默认Shell是csh没有ulimit命令,但C Shell有limit命令。如果你想使用ulimit命令可以安装Bourne shell,Bash,Zsh</p>
<p>limit,ulimit比较</p>
<pre class="screen">
[neo@freebsd:~] limit
cputime unlimited
filesize unlimited
datasize 32768MB
stacksize 512MB
coredumpsize unlimited
memoryuse unlimited
memorylocked unlimited
maxproc 5547
descriptors 65536
sockbufsize unlimited
vmemorysize unlimited
NPTS unlimited
SWAP unlimited
[neo@freebsd:~] env | grep SHELL
SHELL=/usr/local/bin/zsh
[neo@freebsd:~] ulimit -a
-t: cpu time (seconds) unlimited
-f: file size (blocks) unlimited
-d: data seg size (kbytes) 33554432
-s: stack size (kbytes) 524288
-c: core file size (blocks) unlimited
-m: resident set size (kbytes) unlimited
-l: locked-in-memory size (kb) unlimited
-u: processes 5547
-n: file descriptors 65536
-N 9: socket buffer size (kb) unlimited
-v: virtual memory size (kb) unlimited
-N 11: unlimited
-N 12: unlimited
在Freebsd上,你能使用sysctl命令:
</pre>
<p>以 nofile - max number of open files 为例,limit、ulimit、sysctl实现同样的功能。</p>
<pre class="screen">
csh% limit descriptors unlimited
或者
csh% limit descriptors 4096
sh$ ulimit -n unlimited
或者
sh$ ulimit -n 4096
sysctl kern.maxfiles=65536
sysctl kern.maxfilesperproc=65536
</pre>
<p>写入配置文件 sysctl.conf</p>
<pre class="screen">
[neo@freebsd:~] cat /etc/sysctl.conf
# $FreeBSD: src/etc/sysctl.conf,v 1.8.34.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
#vm.pmap.shpgperproc: 2000
#vm.pmap.pv_entry_max: 13338058
kern.ipc.shm_use_phys=1
kern.maxfiles=65536
kern.maxfilesperproc=65536
kern.ipc.somaxconn=2048
[neo@freebsd:~] /etc/rc.d/sysctl reload
[neo@freebsd:~] sysctl -a | grep maxfiles
kern.maxfiles: 65536
kern.maxfilesperproc: 65536
</pre>
</div>
</div><div xmlns="" id="disqus_thread"></div><script xmlns="">
var disqus_config = function () {
this.page.url = "http://www.netkiller.cn"; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = 'netkiller'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//netkiller.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ports.devel.html">上一页</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="su.sorry.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">第 23 章 devel </td><td width="20%" align="center"><a accesskey="h" href="index.html">起始页</a></td><td width="40%" align="right" valign="top"> 24.2. su: Sorry</td></tr></table></div><script xmlns="">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-11694057-1', 'auto');
ga('send', 'pageview');
</script><script xmlns="" async="async">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script><script xmlns="" async="async">
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script><script xmlns="" type="text/javascript" src="/js/q.js" async="async"></script></body></html>