服务器 频道

solaris基础和常用知识FAQ下篇

  【IT168 服务器学院】86 Q: 我希望在一台ultra机器为以下网络配置路由
  子网:10.1.0.0
  掩码:255.255.0.0
  网关:10.220.10.113
  应该如何配置?
  用以下命令可以吗?如果永久配置需要修改那些文件?
  %route add 10.1.0.0 10.220.10.113
  A: no,try this commond:
  #route add default 10.220.10.113
  
  87 Q: 有个patch 107311-09,能解决CC4.2不能处理#pragma pack()的问题吗?
  A: the right patch is 104631, but you should add all related patch
  to avoid other problem,find them at: sunsolve.sun.com
  
  88 Q: 在CSH下我输入以下命令?
  $setenv IWAVE ''pwd''
  $echo $IWAVE
  结果显示为:pwd
  在我的理解中应该是将pwd的输出(如/tmp)赋值给变量IWAVE,所以我想象的
  输出是/tmp
  A: use ` instead '' apparently,they are different. read some unix books
  for reference
  
  89 Q: 为什么有时普通用户不能登录CDE?
  A: 这个错误可能是由于CDE的不正确设置造成的。在每一个用户的home目录下有一
  个.dt子目录.在此目录下有一个errorlog文件记录了CDE登录失败的原因.查
  看此文件可以找到失败的原因.一个可行的方法是:使用root登录并且删除对
  应用户home目录下的.dt目录,同时可以删除<home>/.dtprofile文件, 然后使用
  用户口令登录即可.外检查/usr/dt/bin/dtsessoin的使用权限.正确的权限应
  当是-r-sr-xr-x
  
  90 Q: 关于Solaris8上DHCP的配置问题安装Solaris8后,进程dhcpagent的CPU占用率一
  直都超过88%, 请问有什么方法可以解决.谢谢.
  A: I solve this program by going to the field sit.
  The update period parameter can not be set longer than 2 weeks in the
  DHCP server side.
  
  91 Q(1)能否在Ultra60上只安装64位的Solaris8?
  (2) Solaris8安装在Ultra60上,内核是32位还是64位?
  (3)在其上安装的Oracle 8是安装的32位版本还是64位版本?
  A: Solaris8 的内核是64位的, 但是,它同时带有32位程序的解释器,也就是说32位
  的程序也可以在Solaris8上面运行。事实上Solaris8上面有一些系统命令就是
  32位的程序,如link等。所有的Solaris8都是64位的,但是都带有32位的解释
  器。(就现在的情况而言,32位的解释器是必 须的)。在Solairs 8上面运行
  的应用程序可以是64位,也可以是32位的,包括Oracle 8在内
  
  92 Q: 很感谢你的答复。原来不能创建用户的原因应该是文件系统已满,我删除了一
  些用户账号后,创建正常。现在的问题是c0d0t0s0文件系统的容量太小,现在
  已经达到100%,如何扩展这个文件系统,是否只有重装系统这一个办法?
  A: 在系统安装时,各个分区划分的有些不太合理。/ 目录和 /usr 太小
  /export/home和/tmp 太大。实际上在安装时,比较合理的办法是只设置 / 和
  /tmp,/tmp最多 500M即可。然后在 / 上面建立/usr,/opt 和/export/home。
  现在补救的办法是利用软link的办法:首先将一些在/或/usr中不太是系统直接
  使用的目录(一定不可以包含/usr/sbin,/sbin, /etc,等等)转移到有空间的分
  区上面,然后使用ln建立软连接。关于ln的使用可以man.这种办法是不得已而
  为之。不是很好把握,搞不好就会死机,并且启动不起来。所以在进行此项活
  动时,首先要备份数据,以免发生以上情况时丢失。如果您在下午下班的时间
  可以抽出一点时间,最好还是将系统重新安装一遍的好。因为,每一个目录都
  有一定的用意,一些软件的安装不是地方会让人感到很别扭。而使用软连接又
  会降低系统的运行速度。
  
  93 Q: 求助--请教一个多线程编程问题。关于我们发现的问题具体现象如下:
  函数 void* A(void *pInput)
  {
  char szBuf[30000]; //this buffer maybe larger than 30,000
  ...
  ...
  }
  在多线程程序中,该函数在main中运行(此时相当于在主线程中运行)正常。
  如果使用pthread_create创建一个线程,以A作为线程入口函数,用内存测试工
  具purify可以观察到该线程运行过程中出现Beyond Stack Read、Beyond Stack
  Write错误。如果把szBuf改为堆中分配的内存,则无此问题。据此,我们判断
  是线程的栈空间溢出造成该问题。按资料描述,主线程的缺省栈空间大小为8M
  ,子线程缺省栈空间为2M;我们使用pthread_attr_setstack函数将子线程的栈
  空间设置为8M,但仍未解决问题。后又将线程属 性设置为
  PTHREAD_SCOPE_SYSTEM, 问题仍然存在。函数A以静态库方式由第三方提供,
  我们现需要使之在一个子线程中运行,因此希望能够提供主线程与子线程差异
  的资料,除堆栈空间、调度方式外,是否还有其他差别,造成以上错误的发生
  A: In fact, there is no problem in the program. I think there is a bug
  in their debug tool: purify. You can use dbx to debug your program.
  
  94 Q: 请问一块硬盘上可以有两个Solaris分区吗?在一块硬盘上分了两个solaris分
  区,一个是active的系统安装分区,另一个是后来用fdisk创建的,请问怎样把
  第二个分区加入到solaris系统中使用。谢谢。
  A: Yes, There can be up to six partitions in a disk. you can see the
  partition using utility format. Command list:
  #format
  Then you will see the disks installed in you system.then select the
  disks you are interested in. then print "partition" and then "print"
  to see the partition information. The partition you want to add to
  the system can be identified as c#t#d#s#. Make sure the mount point(
  a empty directory in file system). such as /disk1.then run the
  command:
  #mount /dev/dsk/c#t#d#s# /disk1
  
  run the command
  #df -k
  to verify the slice(partition) is properly installed.
  
  95 Q: 请问在Solaris 2.7上,可以动态改变分区大小吗? 我的工作站划分分区不合理,
  根分区太小,已经满了,可以使用工具动态改变吗?
  A: No, If you want to modify it, the whole disk data will be lost.
  In fact, I think it high time for you to re-instal the solaris
  system. In the new installation. You really need just two partitions
  swap and root. Leave no more than 1G to swap partition and all the
  left to root.Don''t forget to backup all you data before re-installation.
  
  96 Q: 用CC编译器如何实现结构成员按字节对齐,类似于其他编译器的#pragma pack(1)
  功能。
  A: It is a standard compilation option(#pragma pack). It is also
  supported in Solaris C.You can get documents about SC options from
  http://sunlibray under workshop directory.
  
  97 Q: 为什么SUN的本地界面有时候会出现死掉的情况,此时kill掉用户的dtsession
  是否就可以恢复正常。如不能恢复正常还需要做那些操作。
  A: In my experince, the interface dying, may be caused by other
  application other than dtsession. You should determine which
  program''s interface causes the interface dying. This situation is not
  often happens, and most of them happened when you are manipulating a
  program''s interface by mouse. When it happen, login the system from
  network as "root" or the account which cause the dying, kill the
  program.
  
  98 Q: 系统不能启动, 任何二级目录都没有了,但用户下,所有命令都不能用,怎么
  安装Solaris,能直接从光盘启动吗?
  A: You harddisk is damaged. It may be salvaged manually, or can not.
  You should restall the system. Or even worse, you should change your
  harddisk.
  
  99 Q: Can you tell me if I want to add a new CPU chip to a only one CPU
  chip machine on solaris system,Can the application run continually in
  the old cpu chip without interruption on solaris system ?
  A: Please tell me the machine''s type. If your machine is a workstation.
  CPU chips can not be added without turning down the power. I don''t
  know so much in this field. But, I have forwarded this message to the
  specitest in our company. You will get much more detailed answers.
  But you should wait several days. Another way for you is to consult
  the vender who sell you the machine directly.
  
  100 Q: what''s deference between the processor_bind() and pset_bind()?
  A: You can get the differences between two functions by seeing the
  manual:
  # man processor_bind
  # man pset_bind
  

  101 Q: 我们有一个产品在移植到SOLARIS的过程中出现了大量难以理解的问题,请给
  我们现场支援一下,非常感谢!使用Forte Develop6编译C++程序的时候出现
  以下信息:
  
  "mit/../teglobal.h", line 39: Warning (Anachronism): Attempt to redefine TRUE without using #undef.
  "mit/../teglobal.h", line 40: Warning (Anachronism): Attempt to redefine FALSE without using #undef.
  >> Assertion: (../links/prepexpression.cc, line 65)
  while processing mit/multilock.cpp at line 0.
  
  请问是什么意思,难道编译器还要assert吗?
  A: CC 编译器要求被编译的文件以两个新行结束,请在相关头文件末尾加上新行。
  
  102 Q: solaris的问题:激活小键盘上的Numlock,激活中文输入法,按小键盘上的0
  键,中文输入法自行关闭,请问是何原因?
  A: You can solve the problem you metioned by trying the following three
  ways:
  1. Make sure using GB locale, instead of GBK.
  2. Visit http://sunsolve.sun.com to get the "recommended patches"
  package for the your solaris platform, and add it.
  3. If possible, you can change the solaris platform from solaris 2.7
  to solaris 2.8
  
  103 Q: 有关在SOLARIS上使用NETSCAPE问题
  问题描述:
  1.在SOLARIS2.6上安装NETSCAP4.04后,安装提示成功后,运行netscape,出现以
  下错误信息:
  xlib:connection to "0.0" refused by server
  xlib:client is not authorized to server
  can''t open display : :0.0
  2.在SOLARIS2.6上安装Acroread后,如何设置能直接点击打开.pdf文件,而无需
  每次要先启动Acroread,然后再打开? 请问上述问题如何解决?
  A: 1. You run the command:
  #xhost <hostname> :0.0
  and then, you can use NETSCAPE In the terminal, in which the
  netscape is launched, please set the envrionment DISPLAY as :0.0
  2. Actually, I don''t know how to configure it. If you are interested
  in it. You can read some topics in AnswerBook2 User Collection.
  
  104 Q: syslogd 如何支持汉字? syslogd 好像会把汉字拆分成两个字节,并去掉高位
  如何解决?
  A: How the background service provider syslogd supports character set
  depends on the locale environment it starts. So, if you want Chinese
  characters transferring by syslog. You can restart syslogd in
  Chinese environment by issuing the following commands:
  # LANG=zh; export LANG # set the locale environment in Chinese.
  # kill -9 `cat /etc/syslog.pid` # to kill the former syslogd
  # /usr/sbin/syslogd
  
  If you want syslogd to support Chinese characters whenever the
  machine boot. Put the attacted file in the /etc/rc3.d directory.Make
  sure this file''s mode is "rwxr-xr-x" and the owner is root.
  
  105 Q: 我的工作站的交换分区分的太小了,除重装系统外,是否有其它办法将空间调
  整一下。
  A: You can extend your swap region by issueing the following command:
  #mkfile <filename> -m <size in million>
  #swap -a <filename>
  Note: the <filename> should be the full path name.
  
  106 Q: 用vi打开一个script文件,发现里面有非法字符^M,在vi命令行如何全程替代
  掉该字符?我试了一下用以下命令来做,却不行:0,$s/^M//
  A: 1,$s/^M//g ,其中,^M是 ctrl+V ,ctrl+M,或者,用下面这个命令。
  %unix2dos $filename > $newfilename
  
  107 Q: How to add space to a filesystem in solaris2.5.7 ? When I patchadd a
  patch,It tell me that there is no sufficient filesystem capacity.
  A: It seems like your root partition too small. Please check it
  availiable size. If it is small, I think you would better to
  reinstall the system. Please store all the data in the disk.
  In the new installation, you need really to partitions, one is for
  swap, and another is for /. The swap partition /tmp needs about 200M
  to 500M. Then all the left should be given to /.
  
  108 Q: 请教关于Solaris Patch的问题。我们在安装一些软件时,经常需要先安装一
  些Patch,有一事不明,向您请教一下,比如某个软件需要Patch : 107546-02,
  现在我的机器上已经安装107546-08,是不是就不用再安装107546-02了Patch
  后面的那部分是什么意思?是不是大的数字可以包含小的数字的功能了? 同一
  个Patch的不同版本之间会不会有冲突?
  A: You are right. If you have installed a bigger version of the same
  patch, it not necessary for you to install the smaller one. The
  bigger version will override the earlier one if it installed before.
  You need not worry about any collision.
  
  109 Q: 关于sun的SunNet 我目前想了解关于sun的SunNet。我从sun的网站上了解到
  SunNet已经被合并入到Solstice里了,我目前想试着把我做得程序集成到
  SunNet或Solstice里,我看了Slostice得White Paper,但里边只提到了一点点
  相关得Api,我从哪里,怎么才能到比较完全得文档呢?
  
  A: To my knowledge, you can go to the following for a detailed info:
  http://www.sun.com/software/solstice/em-products/network/sunnetmgr.html.
  
  110 Q: 关于SUN机器root口令丢失问题,如何解决?
  A: 办法如下:
  利用SOLARIS的启动盘来启动,然后把硬盘mount上去,修改硬盘上原etc目录
  下的shadow文件,将root项里的password域内容删除,变成无密码。然后重新
  启动主机,以无密码的root登陆后,重新设置root口令。具体步骤如下:
  1.把你的solaris光盘放进cdrom
  2.键入stop+a
  3.当出现''ok''字样时,键入boot cdrom -s
  4.cd /tmp/root
  5.mkdir /tmp/root/xxx (xxx是什么鬼东西就无关紧要了)
  6.mount /dev/dsk/c0t0d0s0 /tmp/root/xxx (在这里c0t0d0s0是你的root盘)
  7.运行csh
  8.setenv TERM vt220
  9.cp /tmp/root/xxx/etc/shadow /tmp/root/xxx/shadow/shadow.bak
  10.vi /tmp/root/xxx/shadow,并且将root项里的password域删除即可。
  11.重启动,你就可以以无密码的root登陆了,登录后,更改root的密码。
  

  111 Q: In solaris 2.6. when i use command "killall" ,all process started in
  CDE will be killed and the eviroment will change to CDE login. I
  looked up the man manual about "killall" ,it told me that "only root
  can use the command".But I really use it with common id.In
  solaris7 and solairs 8, with common id,i can''t use the common.can
  you tell me why i can execute "killall" successfully in solaris 2.6?
  A: Just see the access mode of /usr/sbin/killall. If you can use it
  with a common account identity, the access mode should be x-rsx-rx-r.
  If you can not use it in a common account identity, the mode should
  be x-r--r--r. You can change the mode as you like, whenever in 2.6,
  or 2.7 or 2.8.
  
  112 Q: I downloaded the SDM2.3 from the Download Center of "www.sun.com"
  ,read the White Paper and web detailed describing.But it is only the
  outlook of the software. I need the detailed document about how to
  integrated my own network management application to Solstice.
  A: I transfer this messag to Sun Service in Guangdong.
  
  113 Q: 请问有没有磁盘管理工具。我们有一台E450,有5块硬盘,想做RAID,但是没有工
  具.
  A: If the machine''s OS is solaris 2.8, the storage management software
  is also installed in you machine. You can make the RAID by issuing
  the command family: /usr/sbin/meta*; If you are not so familiar with
  these commands. I can do it for you. or you can use solstice
  disksuite, it is a GUI tool.
  
  114 Q: 怎样强制更改NIS客户端的本地NIS数据表?有时候NIS客户端和NIS服务器端有
  时会出现不一致的情况.NIS服务器和NIS slave 服务器也会出现这种情况。
  A: 你可以用yppush和 ypxfr 来做这种工作,更常见的方法是把它们写进cron,定
  期更新,具体步骤请查阅Answerbook.
  
  
  115 Q: 为了将工作站设为从DHCP动态分配IP,并且将主机名由"unknown"改为原名
  修改了/etc/init.d/rootusr,将dhcpinfo后面三行(不是四行)注释掉;
  hostname=`/sbin/dhcpinfo Hostname`
  # case $? in
  # 0) [ -z "$hostname" ] && hostname=''unknown'' ;;
  # 2) try_dhcp=no ;;
  esac
  重启后,提示:
  /sbin/rcs:ysntax error at line 143 : ''esac'' unexpected
  INIT:cannot creat /var/adm/utmp or /var/adm/utmpx
  INIT:SINGLE USER MODE
  输入root口令后,只能运行在单用户模式,且vi、ls等都不能用(#vi:not found)
  如何才能打开/etc/init.d/rootusr文件进行修改,恢复正常状态。
  A: 请找一个SOLARIS的安装启动盘,使用以下方法可以修改rootusr文件,步骤如
  下:
  1.把你的solaris光盘放进cdrom
  2.键入stop+a
  3.当出现''ok''字样时,键入boot cdrom -s
  4.cd /tmp
  5.mkdir /tmp/xxx (xxx是什么东西无关紧要,随便取一个名字,如test)
  6.mount /dev/dsk/c0t0d0s0 /tmp/xxx (在这里c0t0d0s0是你的root盘)
  7.运行csh
  8.setenv TERM vt220
  9.vi /tmp/xxx/etc/init.d/rootusr,把esac那行也注释掉即可。
  10.把solaris光盘拿出,reboot,重启动即可。
  
  116 Q: 一台Ultra60工作站,其固定IP为10.11.105.247,用ifconfig hme0 dhcp
  start总是失败,如下所示。
  # netstat -a|grep 4999
  # ifconfig hme0 dhcp start
  May 7 20:11:11 hwMusa01 dhcpagent[478]: ERROR! Address 10.11.105.147
  is already in use ifconfig: internal error in DHCP agent
  # netstat -a|grep 4999
  localhost.4999 *.* 0 0 0 0 LISTEN
  localhost.4999 localhost.1023 32768 0 32768 0 TIME_WAIT
  
  抓包发现是dhcp服务器offer的IP地址10.11.105.147被decline了。手工运行
  dhcpagent,提示4999端口被使用了。以前此工作站曾配置为固定IP:
  10.11.105.147,但现在已改为10.11.105.247并重启过多次。请问,可能是什
  么原因导致dhcp失败??
  
  A: 导致问题出现的原因是,由于客户机在申请原来的被保留分配的IP时,服务器
  发现这个IP不能够被使用(已经有其它机器使用了这个IP地址)。使客户机申
  请失败,并且使其中的某些进程不能正常退出,继续占用了端口4999而使后面
  的申请不能进行。办法是找到占用端口4999的进程,杀掉即可。找到这个进程
  的办法是,这个申请进程是带有dhcp字样的。
  # ps -e | grep dhcp
  会出现一到两个进程号。验证这些进程是否占用了4999是看进程打开的文件:
  # /usr/proc/bin/pfiles #pid
  早到进程然后杀掉。这样就可以继续启动Client 端的dhcp申请。注意,修改
  服务器的设置使新的申请可以成功。
  
  117 Q: 我们有一台Natra T1,它的/tmp目录已经长到90%,如果目录满了是否会使系统
  运行异常.(因为我们运行的业务不能停,故不能重启SUN机器来让系统清空该目
  录,也不能直接清空该目录,应为应用程序正在运行.)下面是一些数据:
  
  # df -k
  Filesystem kbytes used avail capacity Mounted on
  /proc 0 0 0 0% /proc
  /dev/dsk/c0t0d0s0 1258491 51942 1143625 5% /
  /dev/dsk/c0t0d0s6 1612343 500741 1063232 33% /usr
  fd 0 0 0 0% /dev/fd
  /dev/dsk/c0t0d0s3 33099 9211 20579 31% /var
  /dev/dsk/c0t0d0s7 13550703 838475 12576721 7% /export/home
  /dev/dsk/c0t0d0s5 30743 10319 17350 38% /opt
  /dev/dsk/c0t0d0s1 548687 369368 124451 75% /usr/openwin
  swap 627864 563360 64504 90% /tmp
  # cd tmp
  # ls
  ps_data
  # ls -a -l
  total 98
  drwxrwxrwt 6 sys sys 443 May 7 15:29 .
  drwxr-xr-x 22 root root 512 Mar 20 17:45 ..
  drwxrwxr-x 2 root root 176 Feb 27 23:18 .X11-pipe
  drwxrwxr-x 2 root root 176 Feb 27 23:18 .X11-unix
  drwxrwxrwx 2 root root 179 Feb 27 23:18 .pcmcia
  drwxrwxrwt 2 root root 327 Feb 27 23:18 .rpc_door
  -rw-rw-r-- 1 root sys 5056 Feb 27 23:18 ps_data
  # cd .pcmcia
  # ls -a -l
  total 32
  drwxrwxrwx 2 root root 179 Feb 27 23:18 .
  drwxrwxrwt 6 sys sys 443 May 7 15:35 ..
  prw-rw-rw- 1 root root 0 Feb 27 23:18 pcram
  # cd ..
  # pwd
  /tmp
  # cd .rpc_door
  # ls -a -l
  total 32
  drwxrwxrwt 2 root root 327 Feb 27 23:18 .
  drwxrwxrwt 6 sys sys 443 May 7 15:36 ..
  Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.1
  Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.2
  Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.3
  # cd ..
  # cd .X11-pipe
  # ls -a -l
  total 32
  drwxrwxr-x 2 root root 176 Feb 27 23:18 .
  drwxrwxrwt 6 sys sys 443 May 7 15:37 ..
  -rw-rw-rw- 1 root root 0 Feb 27 23:18 X0
  # cd ..
  # ls
  ps_data
  # cd .X11-unix
  # ls -al
  total 32
  drwxrwxr-x 2 root root 176 Feb 27 23:18 .
  drwxrwxrwt 6 sys sys 443 May 7 15:38 ..
  srwxrwxrwx 1 root root 0 Feb 27 23:18 X0
  等待您的回答,谢谢
  
  A: 我认为是系统统计信息错误的, 本人的经验是当/tmp的使用率超过10%时,系统就
  变的很慢了。出现这种情况,首先,要检查系统中运行的程序有没有不停分配内存,
  却没有释放(指自己开发的程序)。另外看一下系统对/tmp的swap交换情况。使用工
  具sar 和iostat 都可以看到。关于sar和iostat的用法, 可以看man即可。
  
  118 Q: 有一用MOTIF 写的程序,运行之后不能显示中文(乱码),由于显示的信息是
  不固定的,故不能使用资源文件.怀疑程序中与创建字体时使用了以下的函数
  有关,但注释掉后也一样:
  font1=XLoadQueryFont(XtDisplay(toplevel), "-*-screen-bold-r-normal--12-*");
  font2=XLoadQueryFont(XtDisplay(toplevel), "-*-screen-bold-r-normal--14-*");
  font3=XLoadQueryFont(XtDisplay(toplevel), "-*-screen-bold-r-normal--16-*");
  fontlist=XmFontListCreate(font1, "charset1");
  fontlist=XmFontListAdd(fontlist, font2, "charset2");
  fontlist=XmFontListAdd(fontlist, font3, "charset3");
  运行环境是ULTRA 60 ,Solaris 2.6 ,安装了中文环境。编译环境是SUN C++ 4.0 。
  还怀疑与LANG 相关,曾试过设置为zh ,chinese 等也不行,请教此问题如何解决?
  
  A: 实际上,关于选择字体和字符集可以看<Font Administrator Guide>这个资料,使
  用系统提供的标准工具来从中间找到系统中存在的字体和字体的名称。这个资料在
  Answer Book 的System Administration Collection 中。 实际上,上面的问题不
  出现在字体的选择上面, 而是在MOTIF中在选择框的使用设置中还要设置一次字体
  
  119 Q: 请问SUN的E250以上机器支持“双机热备+磁盘阵列”的使用方式吗?Ultra系
  列的机器是否也能支持呢?
  A: SUN的E250以上机器支持“双机热备+磁盘阵列”的使用方式,可以使用
  SunCluster软件实现;Netrat系列电信服务器也支持;Ultra系列的机器,不
  在支持的列表中。但是,“双机热备+磁盘阵列”的具体含义应该搞清楚。推
  荐的文档在sun cluster collection 中。
  
  120 Q: 我在一个JAVA程序中打开50个SOCKET端口,结果出现异常:
  java.net.SocketException:Too many open files
  请问如何解决此问题?谢谢!另外,请问在一个JAVA进程中可以同时启动的线
  程数是多少?最大线程数受什么限制?能否达到240个线程?谢谢!如上问题
  如果可以通过修改配置来解决的话,会有什么样的负面影响?
  A: You have two ways to modify the limit number of files that a process
  can open simutanously.
  One: modify the /etc/system file add the following entry:
  set rlim_fd_cur = #n
  #n is the number you want. Should be no more than 1024.
  You should reboot the machine.
  Two: Use the system command: ulimit
  $ulimit -n #n
  Note: You should use B-shell.
  And using the same terminal session(in the same terminal
  window) to run the your application program( to guarantee your
  application process is a child process of the setting
  terminal.)You can man ulimit to see the detailed usaged.
  The disadvantage brought by incread the file limite for a
  process or the whole system is increasing the system memory
  usage. But, for today''s machine, this disadvantage is not too
  expensive. (William said:) There is no limit for max open
  socket number in Java. But the operating system has a limit for
  max open file descriptors.A socket resource is treated as a
  file descriptor in Unix. The previous email answered your
  question. You can try as said.
  
  121 Q: 我想把一个HP平台上运行的B SHELL 脚本在SOLARIS 2。6上运行,但是出现了
  问题:要运行的脚本部分:
  command_count = 0
  command_item[$command_count]=check_AutoRaid
  command_count=`expr $command_count + 1`
  command_item[$command_count] = check_system_resource
  command_count=`expr $command_count + 1`
  command_item[$command_count]= check_diskspace
  command_count=`expr $command_count + 1`
  command_item[$command_count]= check_bill_record
  command_count=`expr $command_count + 1`
  
0
相关文章