Solaris新手必读-121个问题解答
(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun)
117 Q: 我们有一台Natra T1,它的/tmp目录已经长到90%,如果目录满了是否会使系统
运行异常.(因为我们运行的业务不能停,故不能重启SUN机器来让系统清空该目
录,也不能直接清空该目录,应为应用程序正在运行.)下面是一些数据:
# df -k
Filesystem kbytes used a vail 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: 我在一个JA VA程序中打开50个SOCKET端口,结果出现异常:
ja va.net.SocketException:Too many open files
请问如何解决此问题?谢谢!另外,请问在一个JA VA进程中可以同时启动的线
程数是多少?最大线程数受什么限制?能否达到240个线程?谢谢!如上问题
如果可以通过修改配置来解决的话,会有什么样的负面影响?
A: You ha ve 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 Ja va. 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`
相关文章
- Solaris是Sun公司开发和发布的一种现代操作系统,是UNIX系统的一个重要分支,今天小编为大家带来的是Solaris线程模型详解,希望对大家会有帮助,有需要的朋友一起去看看吧2017-04-06
- 今天小编为大家带来的是Solaris iostat详解,希望对大家会有帮助 ,有需要的朋友一起去看看吧2017-04-06
- 今天小编为大家带来的是浅谈Solaris技术,希望对大家会有帮助,有需要的朋友一起去看看吧2017-04-06
solaris11如何扩展资源池?solaris11扩展资源池的方法
最近一些朋友问小编solaris11如何扩展资源池?今天小编将为大家分享solaris11扩展资源池的方法!希望对大家会有帮助,有需要的朋友一起去看看吧2017-04-06Solaris10如何更改子网掩码?Solaris10更改子网掩码的方法
最近一些朋友在问Solaris10如何更改子网掩码?下面小编将为大家分享Solaris10更改子网掩码的方法!希望对大家会有帮助!有需要的朋友一起去看看吧2017-03-19- 今天小编将要为大家带来的是Solaris中对tar.z进行安装卸载详解!希望对大家会有帮助!有需要的朋友一起去看看吧2017-03-16
如何在solaris中设置分辨率?在solaris中设置分辨率的方法
最近有些朋友问小编如何在solaris中设置分辨率?下面小编将为大家带来的是在solaris中设置分辨率的方法!希望对大家会有帮助,感兴趣的朋友一起去看看吧2017-03-15- 最近一些朋友问小编如何查看solaris系统的版本和位数?今天小编将为大家分享查看solaris系统的版本和位数的方法!希望对大家会有帮助,有需要的朋友一起去看看吧2017-03-14
- 这篇文章主要介绍了Solaris系统与Linux系统常用命令的区别,Linux作为Unix的仿制品,其命令会与作为Unix发行版的Solaris有诸多相同点,而本文则关注它们的相异之处,需要的朋友2016-02-05
windows XP+Fedora 8+solaris 11三系统安装攻略
介绍windows XP+Fedora 8+solaris 11三系统安装攻略2014-06-16
最新评论